@espresso-lab/mantine-data-table 1.5.2 → 1.5.3

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/index.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(Ue,ye){typeof exports=="object"&&typeof module<"u"?ye(exports,require("react"),require("@mantine/core"),require("@mantine/form"),require("@tabler/icons-react"),require("@mantine/hooks")):typeof define=="function"&&define.amd?define(["exports","react","@mantine/core","@mantine/form","@tabler/icons-react","@mantine/hooks"],ye):(Ue=typeof globalThis<"u"?globalThis:Ue||self,ye(Ue.MantineDataTable={},Ue.React,Ue.MantineCore,Ue.MantineForm,Ue.TablerIconsReact,Ue.MantineHooks))})(this,function(Ue,ye,B,Mi,Ei,At){"use strict";var ud=Ue=>{throw TypeError(Ue)};var Vu=(Ue,ye,B)=>ye.has(Ue)||ud("Cannot "+B);var ve=(Ue,ye,B)=>(Vu(Ue,ye,"read from private field"),B?B.call(Ue):ye.get(Ue)),at=(Ue,ye,B)=>ye.has(Ue)?ud("Cannot add the same private member more than once"):ye instanceof WeakSet?ye.add(Ue):ye.set(Ue,B),Ke=(Ue,ye,B,Mi)=>(Vu(Ue,ye,"write to private field"),Mi?Mi.call(Ue,B):ye.set(Ue,B),B),ht=(Ue,ye,B)=>(Vu(Ue,ye,"access private method"),B);var Ir,sr,ri,Kc,ii,ar,oi,Qc,Wt,et,qi,jt,Pr,si,ur,lr,Hi,ai,ui,Nr,$r,cr,li,rt,wo,Zu,Ku,Qu,Ju,Xu,el,tl,ld,Jc,fr,hr,zt,Pn,Nn,Vs,nl,Xc;function cd(i){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const r in i)if(r!=="default"){const s=Object.getOwnPropertyDescriptor(i,r);Object.defineProperty(n,r,s.get?s:{enumerable:!0,get:()=>i[r]})}}return n.default=i,Object.freeze(n)}const Tt=cd(ye);var bo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function rl(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var xo={exports:{}},Zs={};/**
1
+ (function(Ue,ye){typeof exports=="object"&&typeof module<"u"?ye(exports,require("react"),require("@mantine/core"),require("@mantine/form"),require("@tabler/icons-react"),require("@mantine/hooks")):typeof define=="function"&&define.amd?define(["exports","react","@mantine/core","@mantine/form","@tabler/icons-react","@mantine/hooks"],ye):(Ue=typeof globalThis<"u"?globalThis:Ue||self,ye(Ue.MantineDataTable={},Ue.React,Ue.MantineCore,Ue.MantineForm,Ue.TablerIconsReact,Ue.MantineHooks))})(this,function(Ue,ye,B,Mi,Ei,At){"use strict";var ud=Ue=>{throw TypeError(Ue)};var Zu=(Ue,ye,B)=>ye.has(Ue)||ud("Cannot "+B);var ve=(Ue,ye,B)=>(Zu(Ue,ye,"read from private field"),B?B.call(Ue):ye.get(Ue)),at=(Ue,ye,B)=>ye.has(Ue)?ud("Cannot add the same private member more than once"):ye instanceof WeakSet?ye.add(Ue):ye.set(Ue,B),Ke=(Ue,ye,B,Mi)=>(Zu(Ue,ye,"write to private field"),Mi?Mi.call(Ue,B):ye.set(Ue,B),B),ht=(Ue,ye,B)=>(Zu(Ue,ye,"access private method"),B);var Ir,sr,ri,Kc,ii,ar,oi,Qc,Wt,et,Hi,jt,Pr,si,ur,lr,Gi,ai,ui,Nr,$r,cr,li,rt,bo,Ku,Qu,Ju,Xu,el,tl,nl,ld,Jc,fr,hr,zt,Pn,Nn,Vs,rl,Xc;function cd(i){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const r in i)if(r!=="default"){const s=Object.getOwnPropertyDescriptor(i,r);Object.defineProperty(n,r,s.get?s:{enumerable:!0,get:()=>i[r]})}}return n.default=i,Object.freeze(n)}const Tt=cd(ye);var xo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function il(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var So={exports:{}},Zs={};/**
2
2
  * @license React
3
3
  * react-compiler-runtime.production.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var il;function fd(){if(il)return Zs;il=1;var i=ye.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return Zs.c=function(n){return i.H.useMemoCache(n)},Zs}var Ks={};/**
9
+ */var ol;function fd(){if(ol)return Zs;ol=1;var i=ye.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return Zs.c=function(n){return i.H.useMemoCache(n)},Zs}var Ks={};/**
10
10
  * @license React
11
11
  * react-compiler-runtime.development.js
12
12
  *
@@ -14,11 +14,11 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var ol;function hd(){return ol||(ol=1,process.env.NODE_ENV!=="production"&&function(){var i=ye.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;Ks.c=function(n){var r=i.H;return r===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
17
+ */var sl;function hd(){return sl||(sl=1,process.env.NODE_ENV!=="production"&&function(){var i=ye.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;Ks.c=function(n){var r=i.H;return r===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
18
18
  1. You might have mismatching versions of React and the renderer (such as React DOM)
19
19
  2. You might be breaking the Rules of Hooks
20
20
  3. You might have more than one copy of React in the same app
21
- See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),r.useMemoCache(n)}}()),Ks}var sl;function dd(){return sl||(sl=1,process.env.NODE_ENV==="production"?xo.exports=fd():xo.exports=hd()),xo.exports}var an=dd(),So=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(i){return this.listeners.add(i),this.onSubscribe(),()=>{this.listeners.delete(i),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Ri=typeof window>"u"||"Deno"in globalThis;function Co(){}function al(i){return typeof i=="number"&&i>=0&&i!==1/0}function pd(i,n){return Math.max(i+(n||0)-Date.now(),0)}function Ao(i,n){return typeof i=="function"?i(n):i}function Mn(i,n){return typeof i=="function"?i(n):i}function ul(i){return JSON.stringify(i,(n,r)=>Js(r)?Object.keys(r).sort().reduce((s,l)=>(s[l]=r[l],s),{}):r)}function Qs(i,n){if(i===n)return i;const r=ll(i)&&ll(n);if(r||Js(i)&&Js(n)){const s=r?i:Object.keys(i),l=s.length,d=r?n:Object.keys(n),m=d.length,c=r?[]:{};let x=0;for(let C=0;C<m;C++){const O=r?C:d[C];(!r&&s.includes(O)||r)&&i[O]===void 0&&n[O]===void 0?(c[O]=void 0,x++):(c[O]=Qs(i[O],n[O]),c[O]===i[O]&&i[O]!==void 0&&x++)}return l===m&&x===l?i:c}return n}function Do(i,n){if(!n||Object.keys(i).length!==Object.keys(n).length)return!1;for(const r in i)if(i[r]!==n[r])return!1;return!0}function ll(i){return Array.isArray(i)&&i.length===Object.keys(i).length}function Js(i){if(!cl(i))return!1;const n=i.constructor;if(n===void 0)return!0;const r=n.prototype;return!(!cl(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(i)!==Object.prototype)}function cl(i){return Object.prototype.toString.call(i)==="[object Object]"}function fl(i,n,r){if(typeof r.structuralSharing=="function")return r.structuralSharing(i,n);if(r.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return Qs(i,n)}catch(s){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${r.queryHash}]: ${s}`),s}return Qs(i,n)}return n}function hl(i,n){return typeof i=="function"?i(...n):!!i}var gd=(Kc=class extends So{constructor(){super();at(this,Ir);at(this,sr);at(this,ri);Ke(this,ri,n=>{if(!Ri&&window.addEventListener){const r=()=>n();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){ve(this,sr)||this.setEventListener(ve(this,ri))}onUnsubscribe(){var n;this.hasListeners()||((n=ve(this,sr))==null||n.call(this),Ke(this,sr,void 0))}setEventListener(n){var r;Ke(this,ri,n),(r=ve(this,sr))==null||r.call(this),Ke(this,sr,n(s=>{typeof s=="boolean"?this.setFocused(s):this.onFocus()}))}setFocused(n){ve(this,Ir)!==n&&(Ke(this,Ir,n),this.onFocus())}onFocus(){const n=this.isFocused();this.listeners.forEach(r=>{r(n)})}isFocused(){var n;return typeof ve(this,Ir)=="boolean"?ve(this,Ir):((n=globalThis.document)==null?void 0:n.visibilityState)!=="hidden"}},Ir=new WeakMap,sr=new WeakMap,ri=new WeakMap,Kc),md=new gd,vd=(Qc=class extends So{constructor(){super();at(this,ii,!0);at(this,ar);at(this,oi);Ke(this,oi,n=>{if(!Ri&&window.addEventListener){const r=()=>n(!0),s=()=>n(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",s)}}})}onSubscribe(){ve(this,ar)||this.setEventListener(ve(this,oi))}onUnsubscribe(){var n;this.hasListeners()||((n=ve(this,ar))==null||n.call(this),Ke(this,ar,void 0))}setEventListener(n){var r;Ke(this,oi,n),(r=ve(this,ar))==null||r.call(this),Ke(this,ar,n(this.setOnline.bind(this)))}setOnline(n){ve(this,ii)!==n&&(Ke(this,ii,n),this.listeners.forEach(s=>{s(n)}))}isOnline(){return ve(this,ii)}},ii=new WeakMap,ar=new WeakMap,oi=new WeakMap,Qc),yd=new vd;function dl(){let i,n;const r=new Promise((l,d)=>{i=l,n=d});r.status="pending",r.catch(()=>{});function s(l){Object.assign(r,l),delete r.resolve,delete r.reject}return r.resolve=l=>{s({status:"fulfilled",value:l}),i(l)},r.reject=l=>{s({status:"rejected",reason:l}),n(l)},r}function _d(i){return(i??"online")==="online"?yd.isOnline():!0}var wd=i=>setTimeout(i,0);function bd(){let i=[],n=0,r=c=>{c()},s=c=>{c()},l=wd;const d=c=>{n?i.push(c):l(()=>{r(c)})},m=()=>{const c=i;i=[],c.length&&l(()=>{s(()=>{c.forEach(x=>{r(x)})})})};return{batch:c=>{let x;n++;try{x=c()}finally{n--,n||m()}return x},batchCalls:c=>(...x)=>{d(()=>{c(...x)})},schedule:d,setNotifyFunction:c=>{r=c},setBatchNotifyFunction:c=>{s=c},setScheduler:c=>{l=c}}}var Oo=bd();function xd(i,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:_d(n.networkMode)?"fetching":"paused",...i===void 0&&{error:null,status:"pending"}}}function Sd(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Cd=(Jc=class extends So{constructor(n,r){super();at(this,rt);at(this,Wt);at(this,et);at(this,qi);at(this,jt);at(this,Pr);at(this,si);at(this,ur);at(this,lr);at(this,Hi);at(this,ai);at(this,ui);at(this,Nr);at(this,$r);at(this,cr);at(this,li,new Set);this.options=r,Ke(this,Wt,n),Ke(this,lr,null),Ke(this,ur,dl()),this.options.experimental_prefetchInRender||ve(this,ur).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(ve(this,et).addObserver(this),pl(ve(this,et),this.options)?ht(this,rt,wo).call(this):this.updateResult(),ht(this,rt,Ju).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Xs(ve(this,et),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Xs(ve(this,et),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ht(this,rt,Xu).call(this),ht(this,rt,el).call(this),ve(this,et).removeObserver(this)}setOptions(n){const r=this.options,s=ve(this,et);if(this.options=ve(this,Wt).defaultQueryOptions(n),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Mn(this.options.enabled,ve(this,et))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ht(this,rt,tl).call(this),ve(this,et).setOptions(this.options),r._defaulted&&!Do(this.options,r)&&ve(this,Wt).getQueryCache().notify({type:"observerOptionsUpdated",query:ve(this,et),observer:this});const l=this.hasListeners();l&&gl(ve(this,et),s,this.options,r)&&ht(this,rt,wo).call(this),this.updateResult(),l&&(ve(this,et)!==s||Mn(this.options.enabled,ve(this,et))!==Mn(r.enabled,ve(this,et))||Ao(this.options.staleTime,ve(this,et))!==Ao(r.staleTime,ve(this,et)))&&ht(this,rt,Zu).call(this);const d=ht(this,rt,Ku).call(this);l&&(ve(this,et)!==s||Mn(this.options.enabled,ve(this,et))!==Mn(r.enabled,ve(this,et))||d!==ve(this,cr))&&ht(this,rt,Qu).call(this,d)}getOptimisticResult(n){const r=ve(this,Wt).getQueryCache().build(ve(this,Wt),n),s=this.createResult(r,n);return Dd(this,s)&&(Ke(this,jt,s),Ke(this,si,this.options),Ke(this,Pr,ve(this,et).state)),s}getCurrentResult(){return ve(this,jt)}trackResult(n,r){return new Proxy(n,{get:(s,l)=>(this.trackProp(l),r==null||r(l),Reflect.get(s,l))})}trackProp(n){ve(this,li).add(n)}getCurrentQuery(){return ve(this,et)}refetch({...n}={}){return this.fetch({...n})}fetchOptimistic(n){const r=ve(this,Wt).defaultQueryOptions(n),s=ve(this,Wt).getQueryCache().build(ve(this,Wt),r);return s.fetch().then(()=>this.createResult(s,r))}fetch(n){return ht(this,rt,wo).call(this,{...n,cancelRefetch:n.cancelRefetch??!0}).then(()=>(this.updateResult(),ve(this,jt)))}createResult(n,r){var de;const s=ve(this,et),l=this.options,d=ve(this,jt),m=ve(this,Pr),c=ve(this,si),C=n!==s?n.state:ve(this,qi),{state:O}=n;let R={...O},N=!1,E;if(r._optimisticResults){const pe=this.hasListeners(),re=!pe&&pl(n,r),Ae=pe&&gl(n,s,r,l);(re||Ae)&&(R={...R,...xd(O.data,n.options)}),r._optimisticResults==="isRestoring"&&(R.fetchStatus="idle")}let{error:I,errorUpdatedAt:$,status:j}=R;E=R.data;let X=!1;if(r.placeholderData!==void 0&&E===void 0&&j==="pending"){let pe;d!=null&&d.isPlaceholderData&&r.placeholderData===(c==null?void 0:c.placeholderData)?(pe=d.data,X=!0):pe=typeof r.placeholderData=="function"?r.placeholderData((de=ve(this,ui))==null?void 0:de.state.data,ve(this,ui)):r.placeholderData,pe!==void 0&&(j="success",E=fl(d==null?void 0:d.data,pe,r),N=!0)}if(r.select&&E!==void 0&&!X)if(d&&E===(m==null?void 0:m.data)&&r.select===ve(this,Hi))E=ve(this,ai);else try{Ke(this,Hi,r.select),E=r.select(E),E=fl(d==null?void 0:d.data,E,r),Ke(this,ai,E),Ke(this,lr,null)}catch(pe){Ke(this,lr,pe)}ve(this,lr)&&(I=ve(this,lr),E=ve(this,ai),$=Date.now(),j="error");const te=R.fetchStatus==="fetching",ne=j==="pending",ue=j==="error",V=ne&&te,ce=E!==void 0,ee={status:j,fetchStatus:R.fetchStatus,isPending:ne,isSuccess:j==="success",isError:ue,isInitialLoading:V,isLoading:V,data:E,dataUpdatedAt:R.dataUpdatedAt,error:I,errorUpdatedAt:$,failureCount:R.fetchFailureCount,failureReason:R.fetchFailureReason,errorUpdateCount:R.errorUpdateCount,isFetched:R.dataUpdateCount>0||R.errorUpdateCount>0,isFetchedAfterMount:R.dataUpdateCount>C.dataUpdateCount||R.errorUpdateCount>C.errorUpdateCount,isFetching:te,isRefetching:te&&!ne,isLoadingError:ue&&!ce,isPaused:R.fetchStatus==="paused",isPlaceholderData:N,isRefetchError:ue&&ce,isStale:ea(n,r),refetch:this.refetch,promise:ve(this,ur)};if(this.options.experimental_prefetchInRender){const pe=Se=>{ee.status==="error"?Se.reject(ee.error):ee.data!==void 0&&Se.resolve(ee.data)},re=()=>{const Se=Ke(this,ur,ee.promise=dl());pe(Se)},Ae=ve(this,ur);switch(Ae.status){case"pending":n.queryHash===s.queryHash&&pe(Ae);break;case"fulfilled":(ee.status==="error"||ee.data!==Ae.value)&&re();break;case"rejected":(ee.status!=="error"||ee.error!==Ae.reason)&&re();break}}return ee}updateResult(){const n=ve(this,jt),r=this.createResult(ve(this,et),this.options);if(Ke(this,Pr,ve(this,et).state),Ke(this,si,this.options),ve(this,Pr).data!==void 0&&Ke(this,ui,ve(this,et)),Do(r,n))return;Ke(this,jt,r);const s=()=>{if(!n)return!0;const{notifyOnChangeProps:l}=this.options,d=typeof l=="function"?l():l;if(d==="all"||!d&&!ve(this,li).size)return!0;const m=new Set(d??ve(this,li));return this.options.throwOnError&&m.add("error"),Object.keys(ve(this,jt)).some(c=>{const x=c;return ve(this,jt)[x]!==n[x]&&m.has(x)})};ht(this,rt,ld).call(this,{listeners:s()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ht(this,rt,Ju).call(this)}},Wt=new WeakMap,et=new WeakMap,qi=new WeakMap,jt=new WeakMap,Pr=new WeakMap,si=new WeakMap,ur=new WeakMap,lr=new WeakMap,Hi=new WeakMap,ai=new WeakMap,ui=new WeakMap,Nr=new WeakMap,$r=new WeakMap,cr=new WeakMap,li=new WeakMap,rt=new WeakSet,wo=function(n){ht(this,rt,tl).call(this);let r=ve(this,et).fetch(this.options,n);return n!=null&&n.throwOnError||(r=r.catch(Co)),r},Zu=function(){ht(this,rt,Xu).call(this);const n=Ao(this.options.staleTime,ve(this,et));if(Ri||ve(this,jt).isStale||!al(n))return;const s=pd(ve(this,jt).dataUpdatedAt,n)+1;Ke(this,Nr,setTimeout(()=>{ve(this,jt).isStale||this.updateResult()},s))},Ku=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(ve(this,et)):this.options.refetchInterval)??!1},Qu=function(n){ht(this,rt,el).call(this),Ke(this,cr,n),!(Ri||Mn(this.options.enabled,ve(this,et))===!1||!al(ve(this,cr))||ve(this,cr)===0)&&Ke(this,$r,setInterval(()=>{(this.options.refetchIntervalInBackground||md.isFocused())&&ht(this,rt,wo).call(this)},ve(this,cr)))},Ju=function(){ht(this,rt,Zu).call(this),ht(this,rt,Qu).call(this,ht(this,rt,Ku).call(this))},Xu=function(){ve(this,Nr)&&(clearTimeout(ve(this,Nr)),Ke(this,Nr,void 0))},el=function(){ve(this,$r)&&(clearInterval(ve(this,$r)),Ke(this,$r,void 0))},tl=function(){const n=ve(this,Wt).getQueryCache().build(ve(this,Wt),this.options);if(n===ve(this,et))return;const r=ve(this,et);Ke(this,et,n),Ke(this,qi,n.state),this.hasListeners()&&(r==null||r.removeObserver(this),n.addObserver(this))},ld=function(n){Oo.batch(()=>{n.listeners&&this.listeners.forEach(r=>{r(ve(this,jt))}),ve(this,Wt).getQueryCache().notify({query:ve(this,et),type:"observerResultsUpdated"})})},Jc);function Ad(i,n){return Mn(n.enabled,i)!==!1&&i.state.data===void 0&&!(i.state.status==="error"&&n.retryOnMount===!1)}function pl(i,n){return Ad(i,n)||i.state.data!==void 0&&Xs(i,n,n.refetchOnMount)}function Xs(i,n,r){if(Mn(n.enabled,i)!==!1){const s=typeof r=="function"?r(i):r;return s==="always"||s!==!1&&ea(i,n)}return!1}function gl(i,n,r,s){return(i!==n||Mn(s.enabled,i)===!1)&&(!r.suspense||i.state.status!=="error")&&ea(i,r)}function ea(i,n){return Mn(n.enabled,i)!==!1&&i.isStaleByTime(Ao(n.staleTime,i))}function Dd(i,n){return!Do(i.getCurrentResult(),n)}var Od=(Xc=class extends So{constructor(n,r){super();at(this,Nn);at(this,fr);at(this,hr);at(this,zt);at(this,Pn);Ke(this,fr,n),this.setOptions(r),this.bindMethods(),ht(this,Nn,Vs).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var s;const r=this.options;this.options=ve(this,fr).defaultMutationOptions(n),Do(this.options,r)||ve(this,fr).getMutationCache().notify({type:"observerOptionsUpdated",mutation:ve(this,zt),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&ul(r.mutationKey)!==ul(this.options.mutationKey)?this.reset():((s=ve(this,zt))==null?void 0:s.state.status)==="pending"&&ve(this,zt).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=ve(this,zt))==null||n.removeObserver(this)}onMutationUpdate(n){ht(this,Nn,Vs).call(this),ht(this,Nn,nl).call(this,n)}getCurrentResult(){return ve(this,hr)}reset(){var n;(n=ve(this,zt))==null||n.removeObserver(this),Ke(this,zt,void 0),ht(this,Nn,Vs).call(this),ht(this,Nn,nl).call(this)}mutate(n,r){var s;return Ke(this,Pn,r),(s=ve(this,zt))==null||s.removeObserver(this),Ke(this,zt,ve(this,fr).getMutationCache().build(ve(this,fr),this.options)),ve(this,zt).addObserver(this),ve(this,zt).execute(n)}},fr=new WeakMap,hr=new WeakMap,zt=new WeakMap,Pn=new WeakMap,Nn=new WeakSet,Vs=function(){var r;const n=((r=ve(this,zt))==null?void 0:r.state)??Sd();Ke(this,hr,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},nl=function(n){Oo.batch(()=>{var r,s,l,d,m,c,x,C;if(ve(this,Pn)&&this.hasListeners()){const O=ve(this,hr).variables,R=ve(this,hr).context;(n==null?void 0:n.type)==="success"?((s=(r=ve(this,Pn)).onSuccess)==null||s.call(r,n.data,O,R),(d=(l=ve(this,Pn)).onSettled)==null||d.call(l,n.data,null,O,R)):(n==null?void 0:n.type)==="error"&&((c=(m=ve(this,Pn)).onError)==null||c.call(m,n.error,O,R),(C=(x=ve(this,Pn)).onSettled)==null||C.call(x,void 0,n.error,O,R))}this.listeners.forEach(O=>{O(ve(this,hr))})})},Xc),To={exports:{}},Li={};/**
21
+ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),r.useMemoCache(n)}}()),Ks}var al;function dd(){return al||(al=1,process.env.NODE_ENV==="production"?So.exports=fd():So.exports=hd()),So.exports}var an=dd(),Co=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(i){return this.listeners.add(i),this.onSubscribe(),()=>{this.listeners.delete(i),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Ri=typeof window>"u"||"Deno"in globalThis;function Ao(){}function ul(i){return typeof i=="number"&&i>=0&&i!==1/0}function pd(i,n){return Math.max(i+(n||0)-Date.now(),0)}function Li(i,n){return typeof i=="function"?i(n):i}function Mn(i,n){return typeof i=="function"?i(n):i}function ll(i){return JSON.stringify(i,(n,r)=>Js(r)?Object.keys(r).sort().reduce((s,l)=>(s[l]=r[l],s),{}):r)}function Qs(i,n){if(i===n)return i;const r=cl(i)&&cl(n);if(r||Js(i)&&Js(n)){const s=r?i:Object.keys(i),l=s.length,d=r?n:Object.keys(n),m=d.length,c=r?[]:{};let x=0;for(let C=0;C<m;C++){const O=r?C:d[C];(!r&&s.includes(O)||r)&&i[O]===void 0&&n[O]===void 0?(c[O]=void 0,x++):(c[O]=Qs(i[O],n[O]),c[O]===i[O]&&i[O]!==void 0&&x++)}return l===m&&x===l?i:c}return n}function Do(i,n){if(!n||Object.keys(i).length!==Object.keys(n).length)return!1;for(const r in i)if(i[r]!==n[r])return!1;return!0}function cl(i){return Array.isArray(i)&&i.length===Object.keys(i).length}function Js(i){if(!fl(i))return!1;const n=i.constructor;if(n===void 0)return!0;const r=n.prototype;return!(!fl(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(i)!==Object.prototype)}function fl(i){return Object.prototype.toString.call(i)==="[object Object]"}function hl(i,n,r){if(typeof r.structuralSharing=="function")return r.structuralSharing(i,n);if(r.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return Qs(i,n)}catch(s){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${r.queryHash}]: ${s}`),s}return Qs(i,n)}return n}function dl(i,n){return typeof i=="function"?i(...n):!!i}var gd=(Kc=class extends Co{constructor(){super();at(this,Ir);at(this,sr);at(this,ri);Ke(this,ri,n=>{if(!Ri&&window.addEventListener){const r=()=>n();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){ve(this,sr)||this.setEventListener(ve(this,ri))}onUnsubscribe(){var n;this.hasListeners()||((n=ve(this,sr))==null||n.call(this),Ke(this,sr,void 0))}setEventListener(n){var r;Ke(this,ri,n),(r=ve(this,sr))==null||r.call(this),Ke(this,sr,n(s=>{typeof s=="boolean"?this.setFocused(s):this.onFocus()}))}setFocused(n){ve(this,Ir)!==n&&(Ke(this,Ir,n),this.onFocus())}onFocus(){const n=this.isFocused();this.listeners.forEach(r=>{r(n)})}isFocused(){var n;return typeof ve(this,Ir)=="boolean"?ve(this,Ir):((n=globalThis.document)==null?void 0:n.visibilityState)!=="hidden"}},Ir=new WeakMap,sr=new WeakMap,ri=new WeakMap,Kc),md=new gd,vd=(Qc=class extends Co{constructor(){super();at(this,ii,!0);at(this,ar);at(this,oi);Ke(this,oi,n=>{if(!Ri&&window.addEventListener){const r=()=>n(!0),s=()=>n(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",s)}}})}onSubscribe(){ve(this,ar)||this.setEventListener(ve(this,oi))}onUnsubscribe(){var n;this.hasListeners()||((n=ve(this,ar))==null||n.call(this),Ke(this,ar,void 0))}setEventListener(n){var r;Ke(this,oi,n),(r=ve(this,ar))==null||r.call(this),Ke(this,ar,n(this.setOnline.bind(this)))}setOnline(n){ve(this,ii)!==n&&(Ke(this,ii,n),this.listeners.forEach(s=>{s(n)}))}isOnline(){return ve(this,ii)}},ii=new WeakMap,ar=new WeakMap,oi=new WeakMap,Qc),yd=new vd;function pl(){let i,n;const r=new Promise((l,d)=>{i=l,n=d});r.status="pending",r.catch(()=>{});function s(l){Object.assign(r,l),delete r.resolve,delete r.reject}return r.resolve=l=>{s({status:"fulfilled",value:l}),i(l)},r.reject=l=>{s({status:"rejected",reason:l}),n(l)},r}function _d(i){return(i??"online")==="online"?yd.isOnline():!0}var wd=i=>setTimeout(i,0);function bd(){let i=[],n=0,r=c=>{c()},s=c=>{c()},l=wd;const d=c=>{n?i.push(c):l(()=>{r(c)})},m=()=>{const c=i;i=[],c.length&&l(()=>{s(()=>{c.forEach(x=>{r(x)})})})};return{batch:c=>{let x;n++;try{x=c()}finally{n--,n||m()}return x},batchCalls:c=>(...x)=>{d(()=>{c(...x)})},schedule:d,setNotifyFunction:c=>{r=c},setBatchNotifyFunction:c=>{s=c},setScheduler:c=>{l=c}}}var Oo=bd();function xd(i,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:_d(n.networkMode)?"fetching":"paused",...i===void 0&&{error:null,status:"pending"}}}function Sd(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Cd=(Jc=class extends Co{constructor(n,r){super();at(this,rt);at(this,Wt);at(this,et);at(this,Hi);at(this,jt);at(this,Pr);at(this,si);at(this,ur);at(this,lr);at(this,Gi);at(this,ai);at(this,ui);at(this,Nr);at(this,$r);at(this,cr);at(this,li,new Set);this.options=r,Ke(this,Wt,n),Ke(this,lr,null),Ke(this,ur,pl()),this.options.experimental_prefetchInRender||ve(this,ur).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(ve(this,et).addObserver(this),gl(ve(this,et),this.options)?ht(this,rt,bo).call(this):this.updateResult(),ht(this,rt,Xu).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Xs(ve(this,et),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Xs(ve(this,et),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ht(this,rt,el).call(this),ht(this,rt,tl).call(this),ve(this,et).removeObserver(this)}setOptions(n){const r=this.options,s=ve(this,et);if(this.options=ve(this,Wt).defaultQueryOptions(n),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Mn(this.options.enabled,ve(this,et))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ht(this,rt,nl).call(this),ve(this,et).setOptions(this.options),r._defaulted&&!Do(this.options,r)&&ve(this,Wt).getQueryCache().notify({type:"observerOptionsUpdated",query:ve(this,et),observer:this});const l=this.hasListeners();l&&ml(ve(this,et),s,this.options,r)&&ht(this,rt,bo).call(this),this.updateResult(),l&&(ve(this,et)!==s||Mn(this.options.enabled,ve(this,et))!==Mn(r.enabled,ve(this,et))||Li(this.options.staleTime,ve(this,et))!==Li(r.staleTime,ve(this,et)))&&ht(this,rt,Ku).call(this);const d=ht(this,rt,Qu).call(this);l&&(ve(this,et)!==s||Mn(this.options.enabled,ve(this,et))!==Mn(r.enabled,ve(this,et))||d!==ve(this,cr))&&ht(this,rt,Ju).call(this,d)}getOptimisticResult(n){const r=ve(this,Wt).getQueryCache().build(ve(this,Wt),n),s=this.createResult(r,n);return Dd(this,s)&&(Ke(this,jt,s),Ke(this,si,this.options),Ke(this,Pr,ve(this,et).state)),s}getCurrentResult(){return ve(this,jt)}trackResult(n,r){return new Proxy(n,{get:(s,l)=>(this.trackProp(l),r==null||r(l),Reflect.get(s,l))})}trackProp(n){ve(this,li).add(n)}getCurrentQuery(){return ve(this,et)}refetch({...n}={}){return this.fetch({...n})}fetchOptimistic(n){const r=ve(this,Wt).defaultQueryOptions(n),s=ve(this,Wt).getQueryCache().build(ve(this,Wt),r);return s.fetch().then(()=>this.createResult(s,r))}fetch(n){return ht(this,rt,bo).call(this,{...n,cancelRefetch:n.cancelRefetch??!0}).then(()=>(this.updateResult(),ve(this,jt)))}createResult(n,r){var me;const s=ve(this,et),l=this.options,d=ve(this,jt),m=ve(this,Pr),c=ve(this,si),C=n!==s?n.state:ve(this,Hi),{state:O}=n;let E={...O},N=!1,M;if(r._optimisticResults){const de=this.hasListeners(),re=!de&&gl(n,r),Oe=de&&ml(n,s,r,l);(re||Oe)&&(E={...E,...xd(O.data,n.options)}),r._optimisticResults==="isRestoring"&&(E.fetchStatus="idle")}let{error:I,errorUpdatedAt:$,status:j}=E;M=E.data;let J=!1;if(r.placeholderData!==void 0&&M===void 0&&j==="pending"){let de;d!=null&&d.isPlaceholderData&&r.placeholderData===(c==null?void 0:c.placeholderData)?(de=d.data,J=!0):de=typeof r.placeholderData=="function"?r.placeholderData((me=ve(this,ui))==null?void 0:me.state.data,ve(this,ui)):r.placeholderData,de!==void 0&&(j="success",M=hl(d==null?void 0:d.data,de,r),N=!0)}if(r.select&&M!==void 0&&!J)if(d&&M===(m==null?void 0:m.data)&&r.select===ve(this,Gi))M=ve(this,ai);else try{Ke(this,Gi,r.select),M=r.select(M),M=hl(d==null?void 0:d.data,M,r),Ke(this,ai,M),Ke(this,lr,null)}catch(de){Ke(this,lr,de)}ve(this,lr)&&(I=ve(this,lr),M=ve(this,ai),$=Date.now(),j="error");const te=E.fetchStatus==="fetching",ne=j==="pending",ue=j==="error",Z=ne&&te,le=M!==void 0,X={status:j,fetchStatus:E.fetchStatus,isPending:ne,isSuccess:j==="success",isError:ue,isInitialLoading:Z,isLoading:Z,data:M,dataUpdatedAt:E.dataUpdatedAt,error:I,errorUpdatedAt:$,failureCount:E.fetchFailureCount,failureReason:E.fetchFailureReason,errorUpdateCount:E.errorUpdateCount,isFetched:E.dataUpdateCount>0||E.errorUpdateCount>0,isFetchedAfterMount:E.dataUpdateCount>C.dataUpdateCount||E.errorUpdateCount>C.errorUpdateCount,isFetching:te,isRefetching:te&&!ne,isLoadingError:ue&&!le,isPaused:E.fetchStatus==="paused",isPlaceholderData:N,isRefetchError:ue&&le,isStale:ea(n,r),refetch:this.refetch,promise:ve(this,ur)};if(this.options.experimental_prefetchInRender){const de=Ae=>{X.status==="error"?Ae.reject(X.error):X.data!==void 0&&Ae.resolve(X.data)},re=()=>{const Ae=Ke(this,ur,X.promise=pl());de(Ae)},Oe=ve(this,ur);switch(Oe.status){case"pending":n.queryHash===s.queryHash&&de(Oe);break;case"fulfilled":(X.status==="error"||X.data!==Oe.value)&&re();break;case"rejected":(X.status!=="error"||X.error!==Oe.reason)&&re();break}}return X}updateResult(){const n=ve(this,jt),r=this.createResult(ve(this,et),this.options);if(Ke(this,Pr,ve(this,et).state),Ke(this,si,this.options),ve(this,Pr).data!==void 0&&Ke(this,ui,ve(this,et)),Do(r,n))return;Ke(this,jt,r);const s=()=>{if(!n)return!0;const{notifyOnChangeProps:l}=this.options,d=typeof l=="function"?l():l;if(d==="all"||!d&&!ve(this,li).size)return!0;const m=new Set(d??ve(this,li));return this.options.throwOnError&&m.add("error"),Object.keys(ve(this,jt)).some(c=>{const x=c;return ve(this,jt)[x]!==n[x]&&m.has(x)})};ht(this,rt,ld).call(this,{listeners:s()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ht(this,rt,Xu).call(this)}},Wt=new WeakMap,et=new WeakMap,Hi=new WeakMap,jt=new WeakMap,Pr=new WeakMap,si=new WeakMap,ur=new WeakMap,lr=new WeakMap,Gi=new WeakMap,ai=new WeakMap,ui=new WeakMap,Nr=new WeakMap,$r=new WeakMap,cr=new WeakMap,li=new WeakMap,rt=new WeakSet,bo=function(n){ht(this,rt,nl).call(this);let r=ve(this,et).fetch(this.options,n);return n!=null&&n.throwOnError||(r=r.catch(Ao)),r},Ku=function(){ht(this,rt,el).call(this);const n=Li(this.options.staleTime,ve(this,et));if(Ri||ve(this,jt).isStale||!ul(n))return;const s=pd(ve(this,jt).dataUpdatedAt,n)+1;Ke(this,Nr,setTimeout(()=>{ve(this,jt).isStale||this.updateResult()},s))},Qu=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(ve(this,et)):this.options.refetchInterval)??!1},Ju=function(n){ht(this,rt,tl).call(this),Ke(this,cr,n),!(Ri||Mn(this.options.enabled,ve(this,et))===!1||!ul(ve(this,cr))||ve(this,cr)===0)&&Ke(this,$r,setInterval(()=>{(this.options.refetchIntervalInBackground||md.isFocused())&&ht(this,rt,bo).call(this)},ve(this,cr)))},Xu=function(){ht(this,rt,Ku).call(this),ht(this,rt,Ju).call(this,ht(this,rt,Qu).call(this))},el=function(){ve(this,Nr)&&(clearTimeout(ve(this,Nr)),Ke(this,Nr,void 0))},tl=function(){ve(this,$r)&&(clearInterval(ve(this,$r)),Ke(this,$r,void 0))},nl=function(){const n=ve(this,Wt).getQueryCache().build(ve(this,Wt),this.options);if(n===ve(this,et))return;const r=ve(this,et);Ke(this,et,n),Ke(this,Hi,n.state),this.hasListeners()&&(r==null||r.removeObserver(this),n.addObserver(this))},ld=function(n){Oo.batch(()=>{n.listeners&&this.listeners.forEach(r=>{r(ve(this,jt))}),ve(this,Wt).getQueryCache().notify({query:ve(this,et),type:"observerResultsUpdated"})})},Jc);function Ad(i,n){return Mn(n.enabled,i)!==!1&&i.state.data===void 0&&!(i.state.status==="error"&&n.retryOnMount===!1)}function gl(i,n){return Ad(i,n)||i.state.data!==void 0&&Xs(i,n,n.refetchOnMount)}function Xs(i,n,r){if(Mn(n.enabled,i)!==!1&&Li(n.staleTime,i)!=="static"){const s=typeof r=="function"?r(i):r;return s==="always"||s!==!1&&ea(i,n)}return!1}function ml(i,n,r,s){return(i!==n||Mn(s.enabled,i)===!1)&&(!r.suspense||i.state.status!=="error")&&ea(i,r)}function ea(i,n){return Mn(n.enabled,i)!==!1&&i.isStaleByTime(Li(n.staleTime,i))}function Dd(i,n){return!Do(i.getCurrentResult(),n)}var Od=(Xc=class extends Co{constructor(n,r){super();at(this,Nn);at(this,fr);at(this,hr);at(this,zt);at(this,Pn);Ke(this,fr,n),this.setOptions(r),this.bindMethods(),ht(this,Nn,Vs).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var s;const r=this.options;this.options=ve(this,fr).defaultMutationOptions(n),Do(this.options,r)||ve(this,fr).getMutationCache().notify({type:"observerOptionsUpdated",mutation:ve(this,zt),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&ll(r.mutationKey)!==ll(this.options.mutationKey)?this.reset():((s=ve(this,zt))==null?void 0:s.state.status)==="pending"&&ve(this,zt).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=ve(this,zt))==null||n.removeObserver(this)}onMutationUpdate(n){ht(this,Nn,Vs).call(this),ht(this,Nn,rl).call(this,n)}getCurrentResult(){return ve(this,hr)}reset(){var n;(n=ve(this,zt))==null||n.removeObserver(this),Ke(this,zt,void 0),ht(this,Nn,Vs).call(this),ht(this,Nn,rl).call(this)}mutate(n,r){var s;return Ke(this,Pn,r),(s=ve(this,zt))==null||s.removeObserver(this),Ke(this,zt,ve(this,fr).getMutationCache().build(ve(this,fr),this.options)),ve(this,zt).addObserver(this),ve(this,zt).execute(n)}},fr=new WeakMap,hr=new WeakMap,zt=new WeakMap,Pn=new WeakMap,Nn=new WeakSet,Vs=function(){var r;const n=((r=ve(this,zt))==null?void 0:r.state)??Sd();Ke(this,hr,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},rl=function(n){Oo.batch(()=>{var r,s,l,d,m,c,x,C;if(ve(this,Pn)&&this.hasListeners()){const O=ve(this,hr).variables,E=ve(this,hr).context;(n==null?void 0:n.type)==="success"?((s=(r=ve(this,Pn)).onSuccess)==null||s.call(r,n.data,O,E),(d=(l=ve(this,Pn)).onSettled)==null||d.call(l,n.data,null,O,E)):(n==null?void 0:n.type)==="error"&&((c=(m=ve(this,Pn)).onError)==null||c.call(m,n.error,O,E),(C=(x=ve(this,Pn)).onSettled)==null||C.call(x,void 0,n.error,O,E))}this.listeners.forEach(O=>{O(ve(this,hr))})})},Xc),To={exports:{}},ki={};/**
22
22
  * @license React
23
23
  * react-jsx-runtime.production.js
24
24
  *
@@ -26,7 +26,7 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
26
26
  *
27
27
  * This source code is licensed under the MIT license found in the
28
28
  * LICENSE file in the root directory of this source tree.
29
- */var ml;function Td(){if(ml)return Li;ml=1;var i=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function r(s,l,d){var m=null;if(d!==void 0&&(m=""+d),l.key!==void 0&&(m=""+l.key),"key"in l){d={};for(var c in l)c!=="key"&&(d[c]=l[c])}else d=l;return l=d.ref,{$$typeof:i,type:s,key:m,ref:l!==void 0?l:null,props:d}}return Li.Fragment=n,Li.jsx=r,Li.jsxs=r,Li}var ki={};/**
29
+ */var vl;function Td(){if(vl)return ki;vl=1;var i=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function r(s,l,d){var m=null;if(d!==void 0&&(m=""+d),l.key!==void 0&&(m=""+l.key),"key"in l){d={};for(var c in l)c!=="key"&&(d[c]=l[c])}else d=l;return l=d.ref,{$$typeof:i,type:s,key:m,ref:l!==void 0?l:null,props:d}}return ki.Fragment=n,ki.jsx=r,ki.jsxs=r,ki}var Ii={};/**
30
30
  * @license React
31
31
  * react-jsx-runtime.development.js
32
32
  *
@@ -34,12 +34,12 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
34
34
  *
35
35
  * This source code is licensed under the MIT license found in the
36
36
  * LICENSE file in the root directory of this source tree.
37
- */var vl;function Md(){return vl||(vl=1,process.env.NODE_ENV!=="production"&&function(){function i(h){if(h==null)return null;if(typeof h=="function")return h.$$typeof===pe?null:h.displayName||h.name||null;if(typeof h=="string")return h;switch(h){case $:return"Fragment";case X:return"Profiler";case j:return"StrictMode";case V:return"Suspense";case ce:return"SuspenseList";case de:return"Activity"}if(typeof h=="object")switch(typeof h.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),h.$$typeof){case I:return"Portal";case ne:return(h.displayName||"Context")+".Provider";case te:return(h._context.displayName||"Context")+".Consumer";case ue:var v=h.render;return h=h.displayName,h||(h=v.displayName||v.name||"",h=h!==""?"ForwardRef("+h+")":"ForwardRef"),h;case oe:return v=h.displayName||null,v!==null?v:i(h.type)||"Memo";case ee:v=h._payload,h=h._init;try{return i(h(v))}catch{}}return null}function n(h){return""+h}function r(h){try{n(h);var v=!1}catch{v=!0}if(v){v=console;var D=v.error,z=typeof Symbol=="function"&&Symbol.toStringTag&&h[Symbol.toStringTag]||h.constructor.name||"Object";return D.call(v,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",z),n(h)}}function s(h){if(h===$)return"<>";if(typeof h=="object"&&h!==null&&h.$$typeof===ee)return"<...>";try{var v=i(h);return v?"<"+v+">":"<...>"}catch{return"<...>"}}function l(){var h=re.A;return h===null?null:h.getOwner()}function d(){return Error("react-stack-top-frame")}function m(h){if(Ae.call(h,"key")){var v=Object.getOwnPropertyDescriptor(h,"key").get;if(v&&v.isReactWarning)return!1}return h.key!==void 0}function c(h,v){function D(){L||(L=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",v))}D.isReactWarning=!0,Object.defineProperty(h,"key",{get:D,configurable:!0})}function x(){var h=i(this.type);return A[h]||(A[h]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),h=this.props.ref,h!==void 0?h:null}function C(h,v,D,z,Z,ae,fe,_e){return D=ae.ref,h={$$typeof:E,type:h,key:v,props:ae,_owner:Z},(D!==void 0?D:null)!==null?Object.defineProperty(h,"ref",{enumerable:!1,get:x}):Object.defineProperty(h,"ref",{enumerable:!1,value:null}),h._store={},Object.defineProperty(h._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(h,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(h,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:fe}),Object.defineProperty(h,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:_e}),Object.freeze&&(Object.freeze(h.props),Object.freeze(h)),h}function O(h,v,D,z,Z,ae,fe,_e){var J=v.children;if(J!==void 0)if(z)if(Se(J)){for(z=0;z<J.length;z++)R(J[z]);Object.freeze&&Object.freeze(J)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else R(J);if(Ae.call(v,"key")){J=i(h);var he=Object.keys(v).filter(function(be){return be!=="key"});z=0<he.length?"{key: someKey, "+he.join(": ..., ")+": ...}":"{key: someKey}",w[J+z]||(he=0<he.length?"{"+he.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
37
+ */var yl;function Md(){return yl||(yl=1,process.env.NODE_ENV!=="production"&&function(){function i(h){if(h==null)return null;if(typeof h=="function")return h.$$typeof===de?null:h.displayName||h.name||null;if(typeof h=="string")return h;switch(h){case $:return"Fragment";case J:return"Profiler";case j:return"StrictMode";case Z:return"Suspense";case le:return"SuspenseList";case me:return"Activity"}if(typeof h=="object")switch(typeof h.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),h.$$typeof){case I:return"Portal";case ne:return(h.displayName||"Context")+".Provider";case te:return(h._context.displayName||"Context")+".Consumer";case ue:var v=h.render;return h=h.displayName,h||(h=v.displayName||v.name||"",h=h!==""?"ForwardRef("+h+")":"ForwardRef"),h;case oe:return v=h.displayName||null,v!==null?v:i(h.type)||"Memo";case X:v=h._payload,h=h._init;try{return i(h(v))}catch{}}return null}function n(h){return""+h}function r(h){try{n(h);var v=!1}catch{v=!0}if(v){v=console;var D=v.error,W=typeof Symbol=="function"&&Symbol.toStringTag&&h[Symbol.toStringTag]||h.constructor.name||"Object";return D.call(v,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",W),n(h)}}function s(h){if(h===$)return"<>";if(typeof h=="object"&&h!==null&&h.$$typeof===X)return"<...>";try{var v=i(h);return v?"<"+v+">":"<...>"}catch{return"<...>"}}function l(){var h=re.A;return h===null?null:h.getOwner()}function d(){return Error("react-stack-top-frame")}function m(h){if(Oe.call(h,"key")){var v=Object.getOwnPropertyDescriptor(h,"key").get;if(v&&v.isReactWarning)return!1}return h.key!==void 0}function c(h,v){function D(){R||(R=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",v))}D.isReactWarning=!0,Object.defineProperty(h,"key",{get:D,configurable:!0})}function x(){var h=i(this.type);return A[h]||(A[h]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),h=this.props.ref,h!==void 0?h:null}function C(h,v,D,W,V,ae,fe,we){return D=ae.ref,h={$$typeof:M,type:h,key:v,props:ae,_owner:V},(D!==void 0?D:null)!==null?Object.defineProperty(h,"ref",{enumerable:!1,get:x}):Object.defineProperty(h,"ref",{enumerable:!1,value:null}),h._store={},Object.defineProperty(h._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(h,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(h,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:fe}),Object.defineProperty(h,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:we}),Object.freeze&&(Object.freeze(h.props),Object.freeze(h)),h}function O(h,v,D,W,V,ae,fe,we){var ee=v.children;if(ee!==void 0)if(W)if(Ae(ee)){for(W=0;W<ee.length;W++)E(ee[W]);Object.freeze&&Object.freeze(ee)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else E(ee);if(Oe.call(v,"key")){ee=i(h);var he=Object.keys(v).filter(function(_e){return _e!=="key"});W=0<he.length?"{key: someKey, "+he.join(": ..., ")+": ...}":"{key: someKey}",w[ee+W]||(he=0<he.length?"{"+he.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
38
38
  let props = %s;
39
39
  <%s {...props} />
40
40
  React keys must be passed directly to JSX without using spread:
41
41
  let props = %s;
42
- <%s key={someKey} {...props} />`,z,J,he,J),w[J+z]=!0)}if(J=null,D!==void 0&&(r(D),J=""+D),m(v)&&(r(v.key),J=""+v.key),"key"in v){D={};for(var De in v)De!=="key"&&(D[De]=v[De])}else D=v;return J&&c(D,typeof h=="function"?h.displayName||h.name||"Unknown":h),C(h,J,ae,Z,l(),D,fe,_e)}function R(h){typeof h=="object"&&h!==null&&h.$$typeof===E&&h._store&&(h._store.validated=1)}var N=ye,E=Symbol.for("react.transitional.element"),I=Symbol.for("react.portal"),$=Symbol.for("react.fragment"),j=Symbol.for("react.strict_mode"),X=Symbol.for("react.profiler"),te=Symbol.for("react.consumer"),ne=Symbol.for("react.context"),ue=Symbol.for("react.forward_ref"),V=Symbol.for("react.suspense"),ce=Symbol.for("react.suspense_list"),oe=Symbol.for("react.memo"),ee=Symbol.for("react.lazy"),de=Symbol.for("react.activity"),pe=Symbol.for("react.client.reference"),re=N.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ae=Object.prototype.hasOwnProperty,Se=Array.isArray,Y=console.createTask?console.createTask:function(){return null};N={"react-stack-bottom-frame":function(h){return h()}};var L,A={},g=N["react-stack-bottom-frame"].bind(N,d)(),p=Y(s(d)),w={};ki.Fragment=$,ki.jsx=function(h,v,D,z,Z){var ae=1e4>re.recentlyCreatedOwnerStacks++;return O(h,v,D,!1,z,Z,ae?Error("react-stack-top-frame"):g,ae?Y(s(h)):p)},ki.jsxs=function(h,v,D,z,Z){var ae=1e4>re.recentlyCreatedOwnerStacks++;return O(h,v,D,!0,z,Z,ae?Error("react-stack-top-frame"):g,ae?Y(s(h)):p)}}()),ki}var yl;function Ed(){return yl||(yl=1,process.env.NODE_ENV==="production"?To.exports=Td():To.exports=Md()),To.exports}var T=Ed(),_l=Tt.createContext(void 0),wl=i=>{const n=Tt.useContext(_l);if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},bl=({client:i,children:n})=>(Tt.useEffect(()=>(i.mount(),()=>{i.unmount()}),[i]),T.jsx(_l.Provider,{value:i,children:n})),xl=Tt.createContext(!1),Rd=()=>Tt.useContext(xl);xl.Provider;function Ld(){let i=!1;return{clearReset:()=>{i=!1},reset:()=>{i=!0},isReset:()=>i}}var kd=Tt.createContext(Ld()),Id=()=>Tt.useContext(kd),Pd=(i,n)=>{(i.suspense||i.throwOnError||i.experimental_prefetchInRender)&&(n.isReset()||(i.retryOnMount=!1))},Nd=i=>{Tt.useEffect(()=>{i.clearReset()},[i])},$d=({result:i,errorResetBoundary:n,throwOnError:r,query:s,suspense:l})=>i.isError&&!n.isReset()&&!i.isFetching&&s&&(l&&i.data===void 0||hl(r,[i.error,s])),Bd=i=>{const n=i.staleTime;i.suspense&&(i.staleTime=typeof n=="function"?(...r)=>Math.max(n(...r),1e3):Math.max(n??1e3,1e3),typeof i.gcTime=="number"&&(i.gcTime=Math.max(i.gcTime,1e3)))},jd=(i,n)=>i.isLoading&&i.isFetching&&!n,Yd=(i,n)=>(i==null?void 0:i.suspense)&&n.isPending,Sl=(i,n,r)=>n.fetchOptimistic(i).catch(()=>{r.clearReset()});function Ud(i,n,r){var R,N,E,I,$;if(process.env.NODE_ENV!=="production"&&(typeof i!="object"||Array.isArray(i)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const s=wl(),l=Rd(),d=Id(),m=s.defaultQueryOptions(i);(N=(R=s.getDefaultOptions().queries)==null?void 0:R._experimental_beforeQuery)==null||N.call(R,m),process.env.NODE_ENV!=="production"&&(m.queryFn||console.error(`[${m.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),m._optimisticResults=l?"isRestoring":"optimistic",Bd(m),Pd(m,d),Nd(d);const c=!s.getQueryCache().get(m.queryHash),[x]=Tt.useState(()=>new n(s,m)),C=x.getOptimisticResult(m),O=!l&&i.subscribed!==!1;if(Tt.useSyncExternalStore(Tt.useCallback(j=>{const X=O?x.subscribe(Oo.batchCalls(j)):Co;return x.updateResult(),X},[x,O]),()=>x.getCurrentResult(),()=>x.getCurrentResult()),Tt.useEffect(()=>{x.setOptions(m)},[m,x]),Yd(m,C))throw Sl(m,x,d);if($d({result:C,errorResetBoundary:d,throwOnError:m.throwOnError,query:s.getQueryCache().get(m.queryHash),suspense:m.suspense}))throw C.error;if((I=(E=s.getDefaultOptions().queries)==null?void 0:E._experimental_afterQuery)==null||I.call(E,m,C),m.experimental_prefetchInRender&&!Ri&&jd(C,l)){const j=c?Sl(m,x,d):($=s.getQueryCache().get(m.queryHash))==null?void 0:$.promise;j==null||j.catch(Co).finally(()=>{x.updateResult()})}return m.notifyOnChangeProps?C:x.trackResult(C)}function Cl(i,n){return Ud(i,Cd)}function ta(i,n){const r=wl(),[s]=Tt.useState(()=>new Od(r,i));Tt.useEffect(()=>{s.setOptions(i)},[s,i]);const l=Tt.useSyncExternalStore(Tt.useCallback(m=>s.subscribe(Oo.batchCalls(m)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),d=Tt.useCallback((m,c)=>{s.mutate(m,c).catch(Co)},[s]);if(l.error&&hl(s.options.throwOnError,[l.error]))throw l.error;return{...l,mutate:d,mutateAsync:l.mutate}}var Al=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function na(i){if(Object.prototype.hasOwnProperty.call(i,"__esModule"))return i;var n=i.default;if(typeof n=="function"){var r=function s(){return this instanceof s?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};r.prototype=n.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(i).forEach(function(s){var l=Object.getOwnPropertyDescriptor(i,s);Object.defineProperty(r,s,l.get?l:{enumerable:!0,get:function(){return i[s]}})}),r}var ra={exports:{}},Ii={};/**
42
+ <%s key={someKey} {...props} />`,W,ee,he,ee),w[ee+W]=!0)}if(ee=null,D!==void 0&&(r(D),ee=""+D),m(v)&&(r(v.key),ee=""+v.key),"key"in v){D={};for(var De in v)De!=="key"&&(D[De]=v[De])}else D=v;return ee&&c(D,typeof h=="function"?h.displayName||h.name||"Unknown":h),C(h,ee,ae,V,l(),D,fe,we)}function E(h){typeof h=="object"&&h!==null&&h.$$typeof===M&&h._store&&(h._store.validated=1)}var N=ye,M=Symbol.for("react.transitional.element"),I=Symbol.for("react.portal"),$=Symbol.for("react.fragment"),j=Symbol.for("react.strict_mode"),J=Symbol.for("react.profiler"),te=Symbol.for("react.consumer"),ne=Symbol.for("react.context"),ue=Symbol.for("react.forward_ref"),Z=Symbol.for("react.suspense"),le=Symbol.for("react.suspense_list"),oe=Symbol.for("react.memo"),X=Symbol.for("react.lazy"),me=Symbol.for("react.activity"),de=Symbol.for("react.client.reference"),re=N.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Oe=Object.prototype.hasOwnProperty,Ae=Array.isArray,Y=console.createTask?console.createTask:function(){return null};N={"react-stack-bottom-frame":function(h){return h()}};var R,A={},g=N["react-stack-bottom-frame"].bind(N,d)(),p=Y(s(d)),w={};Ii.Fragment=$,Ii.jsx=function(h,v,D,W,V){var ae=1e4>re.recentlyCreatedOwnerStacks++;return O(h,v,D,!1,W,V,ae?Error("react-stack-top-frame"):g,ae?Y(s(h)):p)},Ii.jsxs=function(h,v,D,W,V){var ae=1e4>re.recentlyCreatedOwnerStacks++;return O(h,v,D,!0,W,V,ae?Error("react-stack-top-frame"):g,ae?Y(s(h)):p)}}()),Ii}var _l;function Ed(){return _l||(_l=1,process.env.NODE_ENV==="production"?To.exports=Td():To.exports=Md()),To.exports}var T=Ed(),wl=Tt.createContext(void 0),bl=i=>{const n=Tt.useContext(wl);if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},xl=({client:i,children:n})=>(Tt.useEffect(()=>(i.mount(),()=>{i.unmount()}),[i]),T.jsx(wl.Provider,{value:i,children:n})),Sl=Tt.createContext(!1),Rd=()=>Tt.useContext(Sl);Sl.Provider;function Ld(){let i=!1;return{clearReset:()=>{i=!1},reset:()=>{i=!0},isReset:()=>i}}var kd=Tt.createContext(Ld()),Id=()=>Tt.useContext(kd),Pd=(i,n)=>{(i.suspense||i.throwOnError||i.experimental_prefetchInRender)&&(n.isReset()||(i.retryOnMount=!1))},Nd=i=>{Tt.useEffect(()=>{i.clearReset()},[i])},$d=({result:i,errorResetBoundary:n,throwOnError:r,query:s,suspense:l})=>i.isError&&!n.isReset()&&!i.isFetching&&s&&(l&&i.data===void 0||dl(r,[i.error,s])),Bd=i=>{if(i.suspense){const n=s=>s==="static"?s:Math.max(s??1e3,1e3),r=i.staleTime;i.staleTime=typeof r=="function"?(...s)=>n(r(...s)):n(r),typeof i.gcTime=="number"&&(i.gcTime=Math.max(i.gcTime,1e3))}},jd=(i,n)=>i.isLoading&&i.isFetching&&!n,Yd=(i,n)=>(i==null?void 0:i.suspense)&&n.isPending,Cl=(i,n,r)=>n.fetchOptimistic(i).catch(()=>{r.clearReset()});function Ud(i,n,r){var E,N,M,I,$;if(process.env.NODE_ENV!=="production"&&(typeof i!="object"||Array.isArray(i)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const s=bl(),l=Rd(),d=Id(),m=s.defaultQueryOptions(i);(N=(E=s.getDefaultOptions().queries)==null?void 0:E._experimental_beforeQuery)==null||N.call(E,m),process.env.NODE_ENV!=="production"&&(m.queryFn||console.error(`[${m.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),m._optimisticResults=l?"isRestoring":"optimistic",Bd(m),Pd(m,d),Nd(d);const c=!s.getQueryCache().get(m.queryHash),[x]=Tt.useState(()=>new n(s,m)),C=x.getOptimisticResult(m),O=!l&&i.subscribed!==!1;if(Tt.useSyncExternalStore(Tt.useCallback(j=>{const J=O?x.subscribe(Oo.batchCalls(j)):Ao;return x.updateResult(),J},[x,O]),()=>x.getCurrentResult(),()=>x.getCurrentResult()),Tt.useEffect(()=>{x.setOptions(m)},[m,x]),Yd(m,C))throw Cl(m,x,d);if($d({result:C,errorResetBoundary:d,throwOnError:m.throwOnError,query:s.getQueryCache().get(m.queryHash),suspense:m.suspense}))throw C.error;if((I=(M=s.getDefaultOptions().queries)==null?void 0:M._experimental_afterQuery)==null||I.call(M,m,C),m.experimental_prefetchInRender&&!Ri&&jd(C,l)){const j=c?Cl(m,x,d):($=s.getQueryCache().get(m.queryHash))==null?void 0:$.promise;j==null||j.catch(Ao).finally(()=>{x.updateResult()})}return m.notifyOnChangeProps?C:x.trackResult(C)}function Al(i,n){return Ud(i,Cd)}function ta(i,n){const r=bl(),[s]=Tt.useState(()=>new Od(r,i));Tt.useEffect(()=>{s.setOptions(i)},[s,i]);const l=Tt.useSyncExternalStore(Tt.useCallback(m=>s.subscribe(Oo.batchCalls(m)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),d=Tt.useCallback((m,c)=>{s.mutate(m,c).catch(Ao)},[s]);if(l.error&&dl(s.options.throwOnError,[l.error]))throw l.error;return{...l,mutate:d,mutateAsync:l.mutate}}var Dl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function na(i){if(Object.prototype.hasOwnProperty.call(i,"__esModule"))return i;var n=i.default;if(typeof n=="function"){var r=function s(){return this instanceof s?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};r.prototype=n.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(i).forEach(function(s){var l=Object.getOwnPropertyDescriptor(i,s);Object.defineProperty(r,s,l.get?l:{enumerable:!0,get:function(){return i[s]}})}),r}var ra={exports:{}},Pi={};/**
43
43
  * @license React
44
44
  * react-jsx-runtime.production.js
45
45
  *
@@ -47,7 +47,7 @@ React keys must be passed directly to JSX without using spread:
47
47
  *
48
48
  * This source code is licensed under the MIT license found in the
49
49
  * LICENSE file in the root directory of this source tree.
50
- */var Dl;function Fd(){if(Dl)return Ii;Dl=1;var i=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function r(s,l,d){var m=null;if(d!==void 0&&(m=""+d),l.key!==void 0&&(m=""+l.key),"key"in l){d={};for(var c in l)c!=="key"&&(d[c]=l[c])}else d=l;return l=d.ref,{$$typeof:i,type:s,key:m,ref:l!==void 0?l:null,props:d}}return Ii.Fragment=n,Ii.jsx=r,Ii.jsxs=r,Ii}var Mo={};/**
50
+ */var Ol;function Fd(){if(Ol)return Pi;Ol=1;var i=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function r(s,l,d){var m=null;if(d!==void 0&&(m=""+d),l.key!==void 0&&(m=""+l.key),"key"in l){d={};for(var c in l)c!=="key"&&(d[c]=l[c])}else d=l;return l=d.ref,{$$typeof:i,type:s,key:m,ref:l!==void 0?l:null,props:d}}return Pi.Fragment=n,Pi.jsx=r,Pi.jsxs=r,Pi}var Mo={};/**
51
51
  * @license React
52
52
  * react-jsx-runtime.development.js
53
53
  *
@@ -55,12 +55,12 @@ React keys must be passed directly to JSX without using spread:
55
55
  *
56
56
  * This source code is licensed under the MIT license found in the
57
57
  * LICENSE file in the root directory of this source tree.
58
- */var Ol;function Wd(){return Ol||(Ol=1,process.env.NODE_ENV!=="production"&&function(){function i(h){if(h==null)return null;if(typeof h=="function")return h.$$typeof===pe?null:h.displayName||h.name||null;if(typeof h=="string")return h;switch(h){case $:return"Fragment";case X:return"Profiler";case j:return"StrictMode";case V:return"Suspense";case ce:return"SuspenseList";case de:return"Activity"}if(typeof h=="object")switch(typeof h.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),h.$$typeof){case I:return"Portal";case ne:return(h.displayName||"Context")+".Provider";case te:return(h._context.displayName||"Context")+".Consumer";case ue:var v=h.render;return h=h.displayName,h||(h=v.displayName||v.name||"",h=h!==""?"ForwardRef("+h+")":"ForwardRef"),h;case oe:return v=h.displayName||null,v!==null?v:i(h.type)||"Memo";case ee:v=h._payload,h=h._init;try{return i(h(v))}catch{}}return null}function n(h){return""+h}function r(h){try{n(h);var v=!1}catch{v=!0}if(v){v=console;var D=v.error,z=typeof Symbol=="function"&&Symbol.toStringTag&&h[Symbol.toStringTag]||h.constructor.name||"Object";return D.call(v,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",z),n(h)}}function s(h){if(h===$)return"<>";if(typeof h=="object"&&h!==null&&h.$$typeof===ee)return"<...>";try{var v=i(h);return v?"<"+v+">":"<...>"}catch{return"<...>"}}function l(){var h=re.A;return h===null?null:h.getOwner()}function d(){return Error("react-stack-top-frame")}function m(h){if(Ae.call(h,"key")){var v=Object.getOwnPropertyDescriptor(h,"key").get;if(v&&v.isReactWarning)return!1}return h.key!==void 0}function c(h,v){function D(){L||(L=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",v))}D.isReactWarning=!0,Object.defineProperty(h,"key",{get:D,configurable:!0})}function x(){var h=i(this.type);return A[h]||(A[h]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),h=this.props.ref,h!==void 0?h:null}function C(h,v,D,z,Z,ae,fe,_e){return D=ae.ref,h={$$typeof:E,type:h,key:v,props:ae,_owner:Z},(D!==void 0?D:null)!==null?Object.defineProperty(h,"ref",{enumerable:!1,get:x}):Object.defineProperty(h,"ref",{enumerable:!1,value:null}),h._store={},Object.defineProperty(h._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(h,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(h,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:fe}),Object.defineProperty(h,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:_e}),Object.freeze&&(Object.freeze(h.props),Object.freeze(h)),h}function O(h,v,D,z,Z,ae,fe,_e){var J=v.children;if(J!==void 0)if(z)if(Se(J)){for(z=0;z<J.length;z++)R(J[z]);Object.freeze&&Object.freeze(J)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else R(J);if(Ae.call(v,"key")){J=i(h);var he=Object.keys(v).filter(function(be){return be!=="key"});z=0<he.length?"{key: someKey, "+he.join(": ..., ")+": ...}":"{key: someKey}",w[J+z]||(he=0<he.length?"{"+he.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
58
+ */var Tl;function Wd(){return Tl||(Tl=1,process.env.NODE_ENV!=="production"&&function(){function i(h){if(h==null)return null;if(typeof h=="function")return h.$$typeof===de?null:h.displayName||h.name||null;if(typeof h=="string")return h;switch(h){case $:return"Fragment";case J:return"Profiler";case j:return"StrictMode";case Z:return"Suspense";case le:return"SuspenseList";case me:return"Activity"}if(typeof h=="object")switch(typeof h.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),h.$$typeof){case I:return"Portal";case ne:return(h.displayName||"Context")+".Provider";case te:return(h._context.displayName||"Context")+".Consumer";case ue:var v=h.render;return h=h.displayName,h||(h=v.displayName||v.name||"",h=h!==""?"ForwardRef("+h+")":"ForwardRef"),h;case oe:return v=h.displayName||null,v!==null?v:i(h.type)||"Memo";case X:v=h._payload,h=h._init;try{return i(h(v))}catch{}}return null}function n(h){return""+h}function r(h){try{n(h);var v=!1}catch{v=!0}if(v){v=console;var D=v.error,W=typeof Symbol=="function"&&Symbol.toStringTag&&h[Symbol.toStringTag]||h.constructor.name||"Object";return D.call(v,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",W),n(h)}}function s(h){if(h===$)return"<>";if(typeof h=="object"&&h!==null&&h.$$typeof===X)return"<...>";try{var v=i(h);return v?"<"+v+">":"<...>"}catch{return"<...>"}}function l(){var h=re.A;return h===null?null:h.getOwner()}function d(){return Error("react-stack-top-frame")}function m(h){if(Oe.call(h,"key")){var v=Object.getOwnPropertyDescriptor(h,"key").get;if(v&&v.isReactWarning)return!1}return h.key!==void 0}function c(h,v){function D(){R||(R=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",v))}D.isReactWarning=!0,Object.defineProperty(h,"key",{get:D,configurable:!0})}function x(){var h=i(this.type);return A[h]||(A[h]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),h=this.props.ref,h!==void 0?h:null}function C(h,v,D,W,V,ae,fe,we){return D=ae.ref,h={$$typeof:M,type:h,key:v,props:ae,_owner:V},(D!==void 0?D:null)!==null?Object.defineProperty(h,"ref",{enumerable:!1,get:x}):Object.defineProperty(h,"ref",{enumerable:!1,value:null}),h._store={},Object.defineProperty(h._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(h,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(h,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:fe}),Object.defineProperty(h,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:we}),Object.freeze&&(Object.freeze(h.props),Object.freeze(h)),h}function O(h,v,D,W,V,ae,fe,we){var ee=v.children;if(ee!==void 0)if(W)if(Ae(ee)){for(W=0;W<ee.length;W++)E(ee[W]);Object.freeze&&Object.freeze(ee)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else E(ee);if(Oe.call(v,"key")){ee=i(h);var he=Object.keys(v).filter(function(_e){return _e!=="key"});W=0<he.length?"{key: someKey, "+he.join(": ..., ")+": ...}":"{key: someKey}",w[ee+W]||(he=0<he.length?"{"+he.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
59
59
  let props = %s;
60
60
  <%s {...props} />
61
61
  React keys must be passed directly to JSX without using spread:
62
62
  let props = %s;
63
- <%s key={someKey} {...props} />`,z,J,he,J),w[J+z]=!0)}if(J=null,D!==void 0&&(r(D),J=""+D),m(v)&&(r(v.key),J=""+v.key),"key"in v){D={};for(var De in v)De!=="key"&&(D[De]=v[De])}else D=v;return J&&c(D,typeof h=="function"?h.displayName||h.name||"Unknown":h),C(h,J,ae,Z,l(),D,fe,_e)}function R(h){typeof h=="object"&&h!==null&&h.$$typeof===E&&h._store&&(h._store.validated=1)}var N=ye,E=Symbol.for("react.transitional.element"),I=Symbol.for("react.portal"),$=Symbol.for("react.fragment"),j=Symbol.for("react.strict_mode"),X=Symbol.for("react.profiler"),te=Symbol.for("react.consumer"),ne=Symbol.for("react.context"),ue=Symbol.for("react.forward_ref"),V=Symbol.for("react.suspense"),ce=Symbol.for("react.suspense_list"),oe=Symbol.for("react.memo"),ee=Symbol.for("react.lazy"),de=Symbol.for("react.activity"),pe=Symbol.for("react.client.reference"),re=N.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ae=Object.prototype.hasOwnProperty,Se=Array.isArray,Y=console.createTask?console.createTask:function(){return null};N={"react-stack-bottom-frame":function(h){return h()}};var L,A={},g=N["react-stack-bottom-frame"].bind(N,d)(),p=Y(s(d)),w={};Mo.Fragment=$,Mo.jsx=function(h,v,D,z,Z){var ae=1e4>re.recentlyCreatedOwnerStacks++;return O(h,v,D,!1,z,Z,ae?Error("react-stack-top-frame"):g,ae?Y(s(h)):p)},Mo.jsxs=function(h,v,D,z,Z){var ae=1e4>re.recentlyCreatedOwnerStacks++;return O(h,v,D,!0,z,Z,ae?Error("react-stack-top-frame"):g,ae?Y(s(h)):p)}}()),Mo}var Tl;function zd(){return Tl||(Tl=1,process.env.NODE_ENV==="production"?ra.exports=Fd():ra.exports=Wd()),ra.exports}zd();var ia={exports:{}},oa={};/**
63
+ <%s key={someKey} {...props} />`,W,ee,he,ee),w[ee+W]=!0)}if(ee=null,D!==void 0&&(r(D),ee=""+D),m(v)&&(r(v.key),ee=""+v.key),"key"in v){D={};for(var De in v)De!=="key"&&(D[De]=v[De])}else D=v;return ee&&c(D,typeof h=="function"?h.displayName||h.name||"Unknown":h),C(h,ee,ae,V,l(),D,fe,we)}function E(h){typeof h=="object"&&h!==null&&h.$$typeof===M&&h._store&&(h._store.validated=1)}var N=ye,M=Symbol.for("react.transitional.element"),I=Symbol.for("react.portal"),$=Symbol.for("react.fragment"),j=Symbol.for("react.strict_mode"),J=Symbol.for("react.profiler"),te=Symbol.for("react.consumer"),ne=Symbol.for("react.context"),ue=Symbol.for("react.forward_ref"),Z=Symbol.for("react.suspense"),le=Symbol.for("react.suspense_list"),oe=Symbol.for("react.memo"),X=Symbol.for("react.lazy"),me=Symbol.for("react.activity"),de=Symbol.for("react.client.reference"),re=N.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Oe=Object.prototype.hasOwnProperty,Ae=Array.isArray,Y=console.createTask?console.createTask:function(){return null};N={"react-stack-bottom-frame":function(h){return h()}};var R,A={},g=N["react-stack-bottom-frame"].bind(N,d)(),p=Y(s(d)),w={};Mo.Fragment=$,Mo.jsx=function(h,v,D,W,V){var ae=1e4>re.recentlyCreatedOwnerStacks++;return O(h,v,D,!1,W,V,ae?Error("react-stack-top-frame"):g,ae?Y(s(h)):p)},Mo.jsxs=function(h,v,D,W,V){var ae=1e4>re.recentlyCreatedOwnerStacks++;return O(h,v,D,!0,W,V,ae?Error("react-stack-top-frame"):g,ae?Y(s(h)):p)}}()),Mo}var Ml;function zd(){return Ml||(Ml=1,process.env.NODE_ENV==="production"?ra.exports=Fd():ra.exports=Wd()),ra.exports}zd();var ia={exports:{}},oa={};/**
64
64
  * @license React
65
65
  * react-compiler-runtime.production.js
66
66
  *
@@ -68,7 +68,7 @@ React keys must be passed directly to JSX without using spread:
68
68
  *
69
69
  * This source code is licensed under the MIT license found in the
70
70
  * LICENSE file in the root directory of this source tree.
71
- */var Ml;function qd(){if(Ml)return oa;Ml=1;var i=ye.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return oa.c=function(n){return i.H.useMemoCache(n)},oa}var El={};/**
71
+ */var El;function qd(){if(El)return oa;El=1;var i=ye.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return oa.c=function(n){return i.H.useMemoCache(n)},oa}var Rl={};/**
72
72
  * @license React
73
73
  * react-compiler-runtime.development.js
74
74
  *
@@ -76,19 +76,19 @@ React keys must be passed directly to JSX without using spread:
76
76
  *
77
77
  * This source code is licensed under the MIT license found in the
78
78
  * LICENSE file in the root directory of this source tree.
79
- */var Rl;function Hd(){return Rl||(Rl=1,process.env.NODE_ENV!=="production"&&function(){var i=ye.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;El.c=function(n){var r=i.H;return r===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
79
+ */var Ll;function Hd(){return Ll||(Ll=1,process.env.NODE_ENV!=="production"&&function(){var i=ye.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;Rl.c=function(n){var r=i.H;return r===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
80
80
  1. You might have mismatching versions of React and the renderer (such as React DOM)
81
81
  2. You might be breaking the Rules of Hooks
82
82
  3. You might have more than one copy of React in the same app
83
- See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),r.useMemoCache(n)}}()),El}var Ll;function Gd(){return Ll||(Ll=1,process.env.NODE_ENV==="production"?ia.exports=qd():ia.exports=Hd()),ia.exports}Gd();/*!
83
+ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),r.useMemoCache(n)}}()),Rl}var kl;function Gd(){return kl||(kl=1,process.env.NODE_ENV==="production"?ia.exports=qd():ia.exports=Hd()),ia.exports}Gd();/*!
84
84
  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
85
85
  * SPDX-License-Identifier: Apache-2.0
86
- */var kl={},Pi={},Il;function Vd(){if(Il)return Pi;Il=1,Pi.byteLength=c,Pi.toByteArray=C,Pi.fromByteArray=N;for(var i=[],n=[],r=typeof Uint8Array<"u"?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=0,d=s.length;l<d;++l)i[l]=s[l],n[s.charCodeAt(l)]=l;n[45]=62,n[95]=63;function m(E){var I=E.length;if(I%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var $=E.indexOf("=");$===-1&&($=I);var j=$===I?0:4-$%4;return[$,j]}function c(E){var I=m(E),$=I[0],j=I[1];return($+j)*3/4-j}function x(E,I,$){return(I+$)*3/4-$}function C(E){var I,$=m(E),j=$[0],X=$[1],te=new r(x(E,j,X)),ne=0,ue=X>0?j-4:j,V;for(V=0;V<ue;V+=4)I=n[E.charCodeAt(V)]<<18|n[E.charCodeAt(V+1)]<<12|n[E.charCodeAt(V+2)]<<6|n[E.charCodeAt(V+3)],te[ne++]=I>>16&255,te[ne++]=I>>8&255,te[ne++]=I&255;return X===2&&(I=n[E.charCodeAt(V)]<<2|n[E.charCodeAt(V+1)]>>4,te[ne++]=I&255),X===1&&(I=n[E.charCodeAt(V)]<<10|n[E.charCodeAt(V+1)]<<4|n[E.charCodeAt(V+2)]>>2,te[ne++]=I>>8&255,te[ne++]=I&255),te}function O(E){return i[E>>18&63]+i[E>>12&63]+i[E>>6&63]+i[E&63]}function R(E,I,$){for(var j,X=[],te=I;te<$;te+=3)j=(E[te]<<16&16711680)+(E[te+1]<<8&65280)+(E[te+2]&255),X.push(O(j));return X.join("")}function N(E){for(var I,$=E.length,j=$%3,X=[],te=16383,ne=0,ue=$-j;ne<ue;ne+=te)X.push(R(E,ne,ne+te>ue?ue:ne+te));return j===1?(I=E[$-1],X.push(i[I>>2]+i[I<<4&63]+"==")):j===2&&(I=(E[$-2]<<8)+E[$-1],X.push(i[I>>10]+i[I>>4&63]+i[I<<2&63]+"=")),X.join("")}return Pi}var sa={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var Pl;function Zd(){return Pl||(Pl=1,sa.read=function(i,n,r,s,l){var d,m,c=l*8-s-1,x=(1<<c)-1,C=x>>1,O=-7,R=r?l-1:0,N=r?-1:1,E=i[n+R];for(R+=N,d=E&(1<<-O)-1,E>>=-O,O+=c;O>0;d=d*256+i[n+R],R+=N,O-=8);for(m=d&(1<<-O)-1,d>>=-O,O+=s;O>0;m=m*256+i[n+R],R+=N,O-=8);if(d===0)d=1-C;else{if(d===x)return m?NaN:(E?-1:1)*(1/0);m=m+Math.pow(2,s),d=d-C}return(E?-1:1)*m*Math.pow(2,d-s)},sa.write=function(i,n,r,s,l,d){var m,c,x,C=d*8-l-1,O=(1<<C)-1,R=O>>1,N=l===23?Math.pow(2,-24)-Math.pow(2,-77):0,E=s?0:d-1,I=s?1:-1,$=n<0||n===0&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(c=isNaN(n)?1:0,m=O):(m=Math.floor(Math.log(n)/Math.LN2),n*(x=Math.pow(2,-m))<1&&(m--,x*=2),m+R>=1?n+=N/x:n+=N*Math.pow(2,1-R),n*x>=2&&(m++,x/=2),m+R>=O?(c=0,m=O):m+R>=1?(c=(n*x-1)*Math.pow(2,l),m=m+R):(c=n*Math.pow(2,R-1)*Math.pow(2,l),m=0));l>=8;i[r+E]=c&255,E+=I,c/=256,l-=8);for(m=m<<l|c,C+=l;C>0;i[r+E]=m&255,E+=I,m/=256,C-=8);i[r+E-I]|=$*128}),sa}var aa,Nl;function Kd(){if(Nl)return aa;Nl=1;var i={}.toString;return aa=Array.isArray||function(n){return i.call(n)=="[object Array]"},aa}/*!
86
+ */var Il={},Ni={},Pl;function Vd(){if(Pl)return Ni;Pl=1,Ni.byteLength=c,Ni.toByteArray=C,Ni.fromByteArray=N;for(var i=[],n=[],r=typeof Uint8Array<"u"?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=0,d=s.length;l<d;++l)i[l]=s[l],n[s.charCodeAt(l)]=l;n[45]=62,n[95]=63;function m(M){var I=M.length;if(I%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var $=M.indexOf("=");$===-1&&($=I);var j=$===I?0:4-$%4;return[$,j]}function c(M){var I=m(M),$=I[0],j=I[1];return($+j)*3/4-j}function x(M,I,$){return(I+$)*3/4-$}function C(M){var I,$=m(M),j=$[0],J=$[1],te=new r(x(M,j,J)),ne=0,ue=J>0?j-4:j,Z;for(Z=0;Z<ue;Z+=4)I=n[M.charCodeAt(Z)]<<18|n[M.charCodeAt(Z+1)]<<12|n[M.charCodeAt(Z+2)]<<6|n[M.charCodeAt(Z+3)],te[ne++]=I>>16&255,te[ne++]=I>>8&255,te[ne++]=I&255;return J===2&&(I=n[M.charCodeAt(Z)]<<2|n[M.charCodeAt(Z+1)]>>4,te[ne++]=I&255),J===1&&(I=n[M.charCodeAt(Z)]<<10|n[M.charCodeAt(Z+1)]<<4|n[M.charCodeAt(Z+2)]>>2,te[ne++]=I>>8&255,te[ne++]=I&255),te}function O(M){return i[M>>18&63]+i[M>>12&63]+i[M>>6&63]+i[M&63]}function E(M,I,$){for(var j,J=[],te=I;te<$;te+=3)j=(M[te]<<16&16711680)+(M[te+1]<<8&65280)+(M[te+2]&255),J.push(O(j));return J.join("")}function N(M){for(var I,$=M.length,j=$%3,J=[],te=16383,ne=0,ue=$-j;ne<ue;ne+=te)J.push(E(M,ne,ne+te>ue?ue:ne+te));return j===1?(I=M[$-1],J.push(i[I>>2]+i[I<<4&63]+"==")):j===2&&(I=(M[$-2]<<8)+M[$-1],J.push(i[I>>10]+i[I>>4&63]+i[I<<2&63]+"=")),J.join("")}return Ni}var sa={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var Nl;function Zd(){return Nl||(Nl=1,sa.read=function(i,n,r,s,l){var d,m,c=l*8-s-1,x=(1<<c)-1,C=x>>1,O=-7,E=r?l-1:0,N=r?-1:1,M=i[n+E];for(E+=N,d=M&(1<<-O)-1,M>>=-O,O+=c;O>0;d=d*256+i[n+E],E+=N,O-=8);for(m=d&(1<<-O)-1,d>>=-O,O+=s;O>0;m=m*256+i[n+E],E+=N,O-=8);if(d===0)d=1-C;else{if(d===x)return m?NaN:(M?-1:1)*(1/0);m=m+Math.pow(2,s),d=d-C}return(M?-1:1)*m*Math.pow(2,d-s)},sa.write=function(i,n,r,s,l,d){var m,c,x,C=d*8-l-1,O=(1<<C)-1,E=O>>1,N=l===23?Math.pow(2,-24)-Math.pow(2,-77):0,M=s?0:d-1,I=s?1:-1,$=n<0||n===0&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(c=isNaN(n)?1:0,m=O):(m=Math.floor(Math.log(n)/Math.LN2),n*(x=Math.pow(2,-m))<1&&(m--,x*=2),m+E>=1?n+=N/x:n+=N*Math.pow(2,1-E),n*x>=2&&(m++,x/=2),m+E>=O?(c=0,m=O):m+E>=1?(c=(n*x-1)*Math.pow(2,l),m=m+E):(c=n*Math.pow(2,E-1)*Math.pow(2,l),m=0));l>=8;i[r+M]=c&255,M+=I,c/=256,l-=8);for(m=m<<l|c,C+=l;C>0;i[r+M]=m&255,M+=I,m/=256,C-=8);i[r+M-I]|=$*128}),sa}var aa,$l;function Kd(){if($l)return aa;$l=1;var i={}.toString;return aa=Array.isArray||function(n){return i.call(n)=="[object Array]"},aa}/*!
87
87
  * The buffer module from node.js, for the browser.
88
88
  *
89
89
  * @author Feross Aboukhadijeh <http://feross.org>
90
90
  * @license MIT
91
- */var $l;function Qd(){return $l||($l=1,function(i){var n=Vd(),r=Zd(),s=Kd();i.Buffer=c,i.SlowBuffer=X,i.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=Al.TYPED_ARRAY_SUPPORT!==void 0?Al.TYPED_ARRAY_SUPPORT:l(),i.kMaxLength=d();function l(){try{var u=new Uint8Array(1);return u.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},u.foo()===42&&typeof u.subarray=="function"&&u.subarray(1,1).byteLength===0}catch{return!1}}function d(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function m(u,f){if(d()<f)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(u=new Uint8Array(f),u.__proto__=c.prototype):(u===null&&(u=new c(f)),u.length=f),u}function c(u,f,_){if(!c.TYPED_ARRAY_SUPPORT&&!(this instanceof c))return new c(u,f,_);if(typeof u=="number"){if(typeof f=="string")throw new Error("If encoding is specified then the first argument must be a string");return R(this,u)}return x(this,u,f,_)}c.poolSize=8192,c._augment=function(u){return u.__proto__=c.prototype,u};function x(u,f,_,M){if(typeof f=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&f instanceof ArrayBuffer?I(u,f,_,M):typeof f=="string"?N(u,f,_):$(u,f)}c.from=function(u,f,_){return x(null,u,f,_)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0}));function C(u){if(typeof u!="number")throw new TypeError('"size" argument must be a number');if(u<0)throw new RangeError('"size" argument must not be negative')}function O(u,f,_,M){return C(f),f<=0?m(u,f):_!==void 0?typeof M=="string"?m(u,f).fill(_,M):m(u,f).fill(_):m(u,f)}c.alloc=function(u,f,_){return O(null,u,f,_)};function R(u,f){if(C(f),u=m(u,f<0?0:j(f)|0),!c.TYPED_ARRAY_SUPPORT)for(var _=0;_<f;++_)u[_]=0;return u}c.allocUnsafe=function(u){return R(null,u)},c.allocUnsafeSlow=function(u){return R(null,u)};function N(u,f,_){if((typeof _!="string"||_==="")&&(_="utf8"),!c.isEncoding(_))throw new TypeError('"encoding" must be a valid string encoding');var M=te(f,_)|0;u=m(u,M);var W=u.write(f,_);return W!==M&&(u=u.slice(0,W)),u}function E(u,f){var _=f.length<0?0:j(f.length)|0;u=m(u,_);for(var M=0;M<_;M+=1)u[M]=f[M]&255;return u}function I(u,f,_,M){if(f.byteLength,_<0||f.byteLength<_)throw new RangeError("'offset' is out of bounds");if(f.byteLength<_+(M||0))throw new RangeError("'length' is out of bounds");return _===void 0&&M===void 0?f=new Uint8Array(f):M===void 0?f=new Uint8Array(f,_):f=new Uint8Array(f,_,M),c.TYPED_ARRAY_SUPPORT?(u=f,u.__proto__=c.prototype):u=E(u,f),u}function $(u,f){if(c.isBuffer(f)){var _=j(f.length)|0;return u=m(u,_),u.length===0||f.copy(u,0,0,_),u}if(f){if(typeof ArrayBuffer<"u"&&f.buffer instanceof ArrayBuffer||"length"in f)return typeof f.length!="number"||Oe(f.length)?m(u,0):E(u,f);if(f.type==="Buffer"&&s(f.data))return E(u,f.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function j(u){if(u>=d())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+d().toString(16)+" bytes");return u|0}function X(u){return+u!=u&&(u=0),c.alloc(+u)}c.isBuffer=function(u){return!!(u!=null&&u._isBuffer)},c.compare=function(u,f){if(!c.isBuffer(u)||!c.isBuffer(f))throw new TypeError("Arguments must be Buffers");if(u===f)return 0;for(var _=u.length,M=f.length,W=0,Q=Math.min(_,M);W<Q;++W)if(u[W]!==f[W]){_=u[W],M=f[W];break}return _<M?-1:M<_?1:0},c.isEncoding=function(u){switch(String(u).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(u,f){if(!s(u))throw new TypeError('"list" argument must be an Array of Buffers');if(u.length===0)return c.alloc(0);var _;if(f===void 0)for(f=0,_=0;_<u.length;++_)f+=u[_].length;var M=c.allocUnsafe(f),W=0;for(_=0;_<u.length;++_){var Q=u[_];if(!c.isBuffer(Q))throw new TypeError('"list" argument must be an Array of Buffers');Q.copy(M,W),W+=Q.length}return M};function te(u,f){if(c.isBuffer(u))return u.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(u)||u instanceof ArrayBuffer))return u.byteLength;typeof u!="string"&&(u=""+u);var _=u.length;if(_===0)return 0;for(var M=!1;;)switch(f){case"ascii":case"latin1":case"binary":return _;case"utf8":case"utf-8":case void 0:return P(u).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _*2;case"hex":return _>>>1;case"base64":return K(u).length;default:if(M)return P(u).length;f=(""+f).toLowerCase(),M=!0}}c.byteLength=te;function ne(u,f,_){var M=!1;if((f===void 0||f<0)&&(f=0),f>this.length||((_===void 0||_>this.length)&&(_=this.length),_<=0)||(_>>>=0,f>>>=0,_<=f))return"";for(u||(u="utf8");;)switch(u){case"hex":return w(this,f,_);case"utf8":case"utf-8":return Y(this,f,_);case"ascii":return g(this,f,_);case"latin1":case"binary":return p(this,f,_);case"base64":return Se(this,f,_);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return h(this,f,_);default:if(M)throw new TypeError("Unknown encoding: "+u);u=(u+"").toLowerCase(),M=!0}}c.prototype._isBuffer=!0;function ue(u,f,_){var M=u[f];u[f]=u[_],u[_]=M}c.prototype.swap16=function(){var u=this.length;if(u%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var f=0;f<u;f+=2)ue(this,f,f+1);return this},c.prototype.swap32=function(){var u=this.length;if(u%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var f=0;f<u;f+=4)ue(this,f,f+3),ue(this,f+1,f+2);return this},c.prototype.swap64=function(){var u=this.length;if(u%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var f=0;f<u;f+=8)ue(this,f,f+7),ue(this,f+1,f+6),ue(this,f+2,f+5),ue(this,f+3,f+4);return this},c.prototype.toString=function(){var u=this.length|0;return u===0?"":arguments.length===0?Y(this,0,u):ne.apply(this,arguments)},c.prototype.equals=function(u){if(!c.isBuffer(u))throw new TypeError("Argument must be a Buffer");return this===u?!0:c.compare(this,u)===0},c.prototype.inspect=function(){var u="",f=i.INSPECT_MAX_BYTES;return this.length>0&&(u=this.toString("hex",0,f).match(/.{2}/g).join(" "),this.length>f&&(u+=" ... ")),"<Buffer "+u+">"},c.prototype.compare=function(u,f,_,M,W){if(!c.isBuffer(u))throw new TypeError("Argument must be a Buffer");if(f===void 0&&(f=0),_===void 0&&(_=u?u.length:0),M===void 0&&(M=0),W===void 0&&(W=this.length),f<0||_>u.length||M<0||W>this.length)throw new RangeError("out of range index");if(M>=W&&f>=_)return 0;if(M>=W)return-1;if(f>=_)return 1;if(f>>>=0,_>>>=0,M>>>=0,W>>>=0,this===u)return 0;for(var Q=W-M,xe=_-f,Me=Math.min(Q,xe),Ie=this.slice(M,W),Ce=u.slice(f,_),ke=0;ke<Me;++ke)if(Ie[ke]!==Ce[ke]){Q=Ie[ke],xe=Ce[ke];break}return Q<xe?-1:xe<Q?1:0};function V(u,f,_,M,W){if(u.length===0)return-1;if(typeof _=="string"?(M=_,_=0):_>2147483647?_=2147483647:_<-2147483648&&(_=-2147483648),_=+_,isNaN(_)&&(_=W?0:u.length-1),_<0&&(_=u.length+_),_>=u.length){if(W)return-1;_=u.length-1}else if(_<0)if(W)_=0;else return-1;if(typeof f=="string"&&(f=c.from(f,M)),c.isBuffer(f))return f.length===0?-1:ce(u,f,_,M,W);if(typeof f=="number")return f=f&255,c.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?W?Uint8Array.prototype.indexOf.call(u,f,_):Uint8Array.prototype.lastIndexOf.call(u,f,_):ce(u,[f],_,M,W);throw new TypeError("val must be string, number or Buffer")}function ce(u,f,_,M,W){var Q=1,xe=u.length,Me=f.length;if(M!==void 0&&(M=String(M).toLowerCase(),M==="ucs2"||M==="ucs-2"||M==="utf16le"||M==="utf-16le")){if(u.length<2||f.length<2)return-1;Q=2,xe/=2,Me/=2,_/=2}function Ie(Ge,Je){return Q===1?Ge[Je]:Ge.readUInt16BE(Je*Q)}var Ce;if(W){var ke=-1;for(Ce=_;Ce<xe;Ce++)if(Ie(u,Ce)===Ie(f,ke===-1?0:Ce-ke)){if(ke===-1&&(ke=Ce),Ce-ke+1===Me)return ke*Q}else ke!==-1&&(Ce-=Ce-ke),ke=-1}else for(_+Me>xe&&(_=xe-Me),Ce=_;Ce>=0;Ce--){for(var Ne=!0,Re=0;Re<Me;Re++)if(Ie(u,Ce+Re)!==Ie(f,Re)){Ne=!1;break}if(Ne)return Ce}return-1}c.prototype.includes=function(u,f,_){return this.indexOf(u,f,_)!==-1},c.prototype.indexOf=function(u,f,_){return V(this,u,f,_,!0)},c.prototype.lastIndexOf=function(u,f,_){return V(this,u,f,_,!1)};function oe(u,f,_,M){_=Number(_)||0;var W=u.length-_;M?(M=Number(M),M>W&&(M=W)):M=W;var Q=f.length;if(Q%2!==0)throw new TypeError("Invalid hex string");M>Q/2&&(M=Q/2);for(var xe=0;xe<M;++xe){var Me=parseInt(f.substr(xe*2,2),16);if(isNaN(Me))return xe;u[_+xe]=Me}return xe}function ee(u,f,_,M){return se(P(f,u.length-_),u,_,M)}function de(u,f,_,M){return se(q(f),u,_,M)}function pe(u,f,_,M){return de(u,f,_,M)}function re(u,f,_,M){return se(K(f),u,_,M)}function Ae(u,f,_,M){return se(F(f,u.length-_),u,_,M)}c.prototype.write=function(u,f,_,M){if(f===void 0)M="utf8",_=this.length,f=0;else if(_===void 0&&typeof f=="string")M=f,_=this.length,f=0;else if(isFinite(f))f=f|0,isFinite(_)?(_=_|0,M===void 0&&(M="utf8")):(M=_,_=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var W=this.length-f;if((_===void 0||_>W)&&(_=W),u.length>0&&(_<0||f<0)||f>this.length)throw new RangeError("Attempt to write outside buffer bounds");M||(M="utf8");for(var Q=!1;;)switch(M){case"hex":return oe(this,u,f,_);case"utf8":case"utf-8":return ee(this,u,f,_);case"ascii":return de(this,u,f,_);case"latin1":case"binary":return pe(this,u,f,_);case"base64":return re(this,u,f,_);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ae(this,u,f,_);default:if(Q)throw new TypeError("Unknown encoding: "+M);M=(""+M).toLowerCase(),Q=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Se(u,f,_){return f===0&&_===u.length?n.fromByteArray(u):n.fromByteArray(u.slice(f,_))}function Y(u,f,_){_=Math.min(u.length,_);for(var M=[],W=f;W<_;){var Q=u[W],xe=null,Me=Q>239?4:Q>223?3:Q>191?2:1;if(W+Me<=_){var Ie,Ce,ke,Ne;switch(Me){case 1:Q<128&&(xe=Q);break;case 2:Ie=u[W+1],(Ie&192)===128&&(Ne=(Q&31)<<6|Ie&63,Ne>127&&(xe=Ne));break;case 3:Ie=u[W+1],Ce=u[W+2],(Ie&192)===128&&(Ce&192)===128&&(Ne=(Q&15)<<12|(Ie&63)<<6|Ce&63,Ne>2047&&(Ne<55296||Ne>57343)&&(xe=Ne));break;case 4:Ie=u[W+1],Ce=u[W+2],ke=u[W+3],(Ie&192)===128&&(Ce&192)===128&&(ke&192)===128&&(Ne=(Q&15)<<18|(Ie&63)<<12|(Ce&63)<<6|ke&63,Ne>65535&&Ne<1114112&&(xe=Ne))}}xe===null?(xe=65533,Me=1):xe>65535&&(xe-=65536,M.push(xe>>>10&1023|55296),xe=56320|xe&1023),M.push(xe),W+=Me}return A(M)}var L=4096;function A(u){var f=u.length;if(f<=L)return String.fromCharCode.apply(String,u);for(var _="",M=0;M<f;)_+=String.fromCharCode.apply(String,u.slice(M,M+=L));return _}function g(u,f,_){var M="";_=Math.min(u.length,_);for(var W=f;W<_;++W)M+=String.fromCharCode(u[W]&127);return M}function p(u,f,_){var M="";_=Math.min(u.length,_);for(var W=f;W<_;++W)M+=String.fromCharCode(u[W]);return M}function w(u,f,_){var M=u.length;(!f||f<0)&&(f=0),(!_||_<0||_>M)&&(_=M);for(var W="",Q=f;Q<_;++Q)W+=be(u[Q]);return W}function h(u,f,_){for(var M=u.slice(f,_),W="",Q=0;Q<M.length;Q+=2)W+=String.fromCharCode(M[Q]+M[Q+1]*256);return W}c.prototype.slice=function(u,f){var _=this.length;u=~~u,f=f===void 0?_:~~f,u<0?(u+=_,u<0&&(u=0)):u>_&&(u=_),f<0?(f+=_,f<0&&(f=0)):f>_&&(f=_),f<u&&(f=u);var M;if(c.TYPED_ARRAY_SUPPORT)M=this.subarray(u,f),M.__proto__=c.prototype;else{var W=f-u;M=new c(W,void 0);for(var Q=0;Q<W;++Q)M[Q]=this[Q+u]}return M};function v(u,f,_){if(u%1!==0||u<0)throw new RangeError("offset is not uint");if(u+f>_)throw new RangeError("Trying to access beyond buffer length")}c.prototype.readUIntLE=function(u,f,_){u=u|0,f=f|0,_||v(u,f,this.length);for(var M=this[u],W=1,Q=0;++Q<f&&(W*=256);)M+=this[u+Q]*W;return M},c.prototype.readUIntBE=function(u,f,_){u=u|0,f=f|0,_||v(u,f,this.length);for(var M=this[u+--f],W=1;f>0&&(W*=256);)M+=this[u+--f]*W;return M},c.prototype.readUInt8=function(u,f){return f||v(u,1,this.length),this[u]},c.prototype.readUInt16LE=function(u,f){return f||v(u,2,this.length),this[u]|this[u+1]<<8},c.prototype.readUInt16BE=function(u,f){return f||v(u,2,this.length),this[u]<<8|this[u+1]},c.prototype.readUInt32LE=function(u,f){return f||v(u,4,this.length),(this[u]|this[u+1]<<8|this[u+2]<<16)+this[u+3]*16777216},c.prototype.readUInt32BE=function(u,f){return f||v(u,4,this.length),this[u]*16777216+(this[u+1]<<16|this[u+2]<<8|this[u+3])},c.prototype.readIntLE=function(u,f,_){u=u|0,f=f|0,_||v(u,f,this.length);for(var M=this[u],W=1,Q=0;++Q<f&&(W*=256);)M+=this[u+Q]*W;return W*=128,M>=W&&(M-=Math.pow(2,8*f)),M},c.prototype.readIntBE=function(u,f,_){u=u|0,f=f|0,_||v(u,f,this.length);for(var M=f,W=1,Q=this[u+--M];M>0&&(W*=256);)Q+=this[u+--M]*W;return W*=128,Q>=W&&(Q-=Math.pow(2,8*f)),Q},c.prototype.readInt8=function(u,f){return f||v(u,1,this.length),this[u]&128?(255-this[u]+1)*-1:this[u]},c.prototype.readInt16LE=function(u,f){f||v(u,2,this.length);var _=this[u]|this[u+1]<<8;return _&32768?_|4294901760:_},c.prototype.readInt16BE=function(u,f){f||v(u,2,this.length);var _=this[u+1]|this[u]<<8;return _&32768?_|4294901760:_},c.prototype.readInt32LE=function(u,f){return f||v(u,4,this.length),this[u]|this[u+1]<<8|this[u+2]<<16|this[u+3]<<24},c.prototype.readInt32BE=function(u,f){return f||v(u,4,this.length),this[u]<<24|this[u+1]<<16|this[u+2]<<8|this[u+3]},c.prototype.readFloatLE=function(u,f){return f||v(u,4,this.length),r.read(this,u,!0,23,4)},c.prototype.readFloatBE=function(u,f){return f||v(u,4,this.length),r.read(this,u,!1,23,4)},c.prototype.readDoubleLE=function(u,f){return f||v(u,8,this.length),r.read(this,u,!0,52,8)},c.prototype.readDoubleBE=function(u,f){return f||v(u,8,this.length),r.read(this,u,!1,52,8)};function D(u,f,_,M,W,Q){if(!c.isBuffer(u))throw new TypeError('"buffer" argument must be a Buffer instance');if(f>W||f<Q)throw new RangeError('"value" argument is out of bounds');if(_+M>u.length)throw new RangeError("Index out of range")}c.prototype.writeUIntLE=function(u,f,_,M){if(u=+u,f=f|0,_=_|0,!M){var W=Math.pow(2,8*_)-1;D(this,u,f,_,W,0)}var Q=1,xe=0;for(this[f]=u&255;++xe<_&&(Q*=256);)this[f+xe]=u/Q&255;return f+_},c.prototype.writeUIntBE=function(u,f,_,M){if(u=+u,f=f|0,_=_|0,!M){var W=Math.pow(2,8*_)-1;D(this,u,f,_,W,0)}var Q=_-1,xe=1;for(this[f+Q]=u&255;--Q>=0&&(xe*=256);)this[f+Q]=u/xe&255;return f+_},c.prototype.writeUInt8=function(u,f,_){return u=+u,f=f|0,_||D(this,u,f,1,255,0),c.TYPED_ARRAY_SUPPORT||(u=Math.floor(u)),this[f]=u&255,f+1};function z(u,f,_,M){f<0&&(f=65535+f+1);for(var W=0,Q=Math.min(u.length-_,2);W<Q;++W)u[_+W]=(f&255<<8*(M?W:1-W))>>>(M?W:1-W)*8}c.prototype.writeUInt16LE=function(u,f,_){return u=+u,f=f|0,_||D(this,u,f,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[f]=u&255,this[f+1]=u>>>8):z(this,u,f,!0),f+2},c.prototype.writeUInt16BE=function(u,f,_){return u=+u,f=f|0,_||D(this,u,f,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[f]=u>>>8,this[f+1]=u&255):z(this,u,f,!1),f+2};function Z(u,f,_,M){f<0&&(f=4294967295+f+1);for(var W=0,Q=Math.min(u.length-_,4);W<Q;++W)u[_+W]=f>>>(M?W:3-W)*8&255}c.prototype.writeUInt32LE=function(u,f,_){return u=+u,f=f|0,_||D(this,u,f,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[f+3]=u>>>24,this[f+2]=u>>>16,this[f+1]=u>>>8,this[f]=u&255):Z(this,u,f,!0),f+4},c.prototype.writeUInt32BE=function(u,f,_){return u=+u,f=f|0,_||D(this,u,f,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[f]=u>>>24,this[f+1]=u>>>16,this[f+2]=u>>>8,this[f+3]=u&255):Z(this,u,f,!1),f+4},c.prototype.writeIntLE=function(u,f,_,M){if(u=+u,f=f|0,!M){var W=Math.pow(2,8*_-1);D(this,u,f,_,W-1,-W)}var Q=0,xe=1,Me=0;for(this[f]=u&255;++Q<_&&(xe*=256);)u<0&&Me===0&&this[f+Q-1]!==0&&(Me=1),this[f+Q]=(u/xe>>0)-Me&255;return f+_},c.prototype.writeIntBE=function(u,f,_,M){if(u=+u,f=f|0,!M){var W=Math.pow(2,8*_-1);D(this,u,f,_,W-1,-W)}var Q=_-1,xe=1,Me=0;for(this[f+Q]=u&255;--Q>=0&&(xe*=256);)u<0&&Me===0&&this[f+Q+1]!==0&&(Me=1),this[f+Q]=(u/xe>>0)-Me&255;return f+_},c.prototype.writeInt8=function(u,f,_){return u=+u,f=f|0,_||D(this,u,f,1,127,-128),c.TYPED_ARRAY_SUPPORT||(u=Math.floor(u)),u<0&&(u=255+u+1),this[f]=u&255,f+1},c.prototype.writeInt16LE=function(u,f,_){return u=+u,f=f|0,_||D(this,u,f,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[f]=u&255,this[f+1]=u>>>8):z(this,u,f,!0),f+2},c.prototype.writeInt16BE=function(u,f,_){return u=+u,f=f|0,_||D(this,u,f,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[f]=u>>>8,this[f+1]=u&255):z(this,u,f,!1),f+2},c.prototype.writeInt32LE=function(u,f,_){return u=+u,f=f|0,_||D(this,u,f,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[f]=u&255,this[f+1]=u>>>8,this[f+2]=u>>>16,this[f+3]=u>>>24):Z(this,u,f,!0),f+4},c.prototype.writeInt32BE=function(u,f,_){return u=+u,f=f|0,_||D(this,u,f,4,2147483647,-2147483648),u<0&&(u=4294967295+u+1),c.TYPED_ARRAY_SUPPORT?(this[f]=u>>>24,this[f+1]=u>>>16,this[f+2]=u>>>8,this[f+3]=u&255):Z(this,u,f,!1),f+4};function ae(u,f,_,M,W,Q){if(_+M>u.length)throw new RangeError("Index out of range");if(_<0)throw new RangeError("Index out of range")}function fe(u,f,_,M,W){return W||ae(u,f,_,4),r.write(u,f,_,M,23,4),_+4}c.prototype.writeFloatLE=function(u,f,_){return fe(this,u,f,!0,_)},c.prototype.writeFloatBE=function(u,f,_){return fe(this,u,f,!1,_)};function _e(u,f,_,M,W){return W||ae(u,f,_,8),r.write(u,f,_,M,52,8),_+8}c.prototype.writeDoubleLE=function(u,f,_){return _e(this,u,f,!0,_)},c.prototype.writeDoubleBE=function(u,f,_){return _e(this,u,f,!1,_)},c.prototype.copy=function(u,f,_,M){if(_||(_=0),!M&&M!==0&&(M=this.length),f>=u.length&&(f=u.length),f||(f=0),M>0&&M<_&&(M=_),M===_||u.length===0||this.length===0)return 0;if(f<0)throw new RangeError("targetStart out of bounds");if(_<0||_>=this.length)throw new RangeError("sourceStart out of bounds");if(M<0)throw new RangeError("sourceEnd out of bounds");M>this.length&&(M=this.length),u.length-f<M-_&&(M=u.length-f+_);var W=M-_,Q;if(this===u&&_<f&&f<M)for(Q=W-1;Q>=0;--Q)u[Q+f]=this[Q+_];else if(W<1e3||!c.TYPED_ARRAY_SUPPORT)for(Q=0;Q<W;++Q)u[Q+f]=this[Q+_];else Uint8Array.prototype.set.call(u,this.subarray(_,_+W),f);return W},c.prototype.fill=function(u,f,_,M){if(typeof u=="string"){if(typeof f=="string"?(M=f,f=0,_=this.length):typeof _=="string"&&(M=_,_=this.length),u.length===1){var W=u.charCodeAt(0);W<256&&(u=W)}if(M!==void 0&&typeof M!="string")throw new TypeError("encoding must be a string");if(typeof M=="string"&&!c.isEncoding(M))throw new TypeError("Unknown encoding: "+M)}else typeof u=="number"&&(u=u&255);if(f<0||this.length<f||this.length<_)throw new RangeError("Out of range index");if(_<=f)return this;f=f>>>0,_=_===void 0?this.length:_>>>0,u||(u=0);var Q;if(typeof u=="number")for(Q=f;Q<_;++Q)this[Q]=u;else{var xe=c.isBuffer(u)?u:P(new c(u,M).toString()),Me=xe.length;for(Q=0;Q<_-f;++Q)this[Q+f]=xe[Q%Me]}return this};var J=/[^+\/0-9A-Za-z-_]/g;function he(u){if(u=De(u).replace(J,""),u.length<2)return"";for(;u.length%4!==0;)u=u+"=";return u}function De(u){return u.trim?u.trim():u.replace(/^\s+|\s+$/g,"")}function be(u){return u<16?"0"+u.toString(16):u.toString(16)}function P(u,f){f=f||1/0;for(var _,M=u.length,W=null,Q=[],xe=0;xe<M;++xe){if(_=u.charCodeAt(xe),_>55295&&_<57344){if(!W){if(_>56319){(f-=3)>-1&&Q.push(239,191,189);continue}else if(xe+1===M){(f-=3)>-1&&Q.push(239,191,189);continue}W=_;continue}if(_<56320){(f-=3)>-1&&Q.push(239,191,189),W=_;continue}_=(W-55296<<10|_-56320)+65536}else W&&(f-=3)>-1&&Q.push(239,191,189);if(W=null,_<128){if((f-=1)<0)break;Q.push(_)}else if(_<2048){if((f-=2)<0)break;Q.push(_>>6|192,_&63|128)}else if(_<65536){if((f-=3)<0)break;Q.push(_>>12|224,_>>6&63|128,_&63|128)}else if(_<1114112){if((f-=4)<0)break;Q.push(_>>18|240,_>>12&63|128,_>>6&63|128,_&63|128)}else throw new Error("Invalid code point")}return Q}function q(u){for(var f=[],_=0;_<u.length;++_)f.push(u.charCodeAt(_)&255);return f}function F(u,f){for(var _,M,W,Q=[],xe=0;xe<u.length&&!((f-=2)<0);++xe)_=u.charCodeAt(xe),M=_>>8,W=_%256,Q.push(W),Q.push(M);return Q}function K(u){return n.toByteArray(he(u))}function se(u,f,_,M){for(var W=0;W<M&&!(W+_>=f.length||W>=u.length);++W)f[W+_]=u[W];return W}function Oe(u){return u!==u}}(kl)),kl}Qd();var Lr;if(typeof window<"u"&&window.crypto&&(Lr=window.crypto),!Lr&&typeof window<"u"&&window.msCrypto&&(Lr=window.msCrypto),!Lr&&typeof global<"u"&&global.crypto&&(Lr=global.crypto),!Lr&&typeof require=="function")try{Lr=require("crypto")}catch{}var Bl={};/*! *****************************************************************************
91
+ */var Bl;function Qd(){return Bl||(Bl=1,function(i){var n=Vd(),r=Zd(),s=Kd();i.Buffer=c,i.SlowBuffer=J,i.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=Dl.TYPED_ARRAY_SUPPORT!==void 0?Dl.TYPED_ARRAY_SUPPORT:l(),i.kMaxLength=d();function l(){try{var u=new Uint8Array(1);return u.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},u.foo()===42&&typeof u.subarray=="function"&&u.subarray(1,1).byteLength===0}catch{return!1}}function d(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function m(u,f){if(d()<f)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(u=new Uint8Array(f),u.__proto__=c.prototype):(u===null&&(u=new c(f)),u.length=f),u}function c(u,f,_){if(!c.TYPED_ARRAY_SUPPORT&&!(this instanceof c))return new c(u,f,_);if(typeof u=="number"){if(typeof f=="string")throw new Error("If encoding is specified then the first argument must be a string");return E(this,u)}return x(this,u,f,_)}c.poolSize=8192,c._augment=function(u){return u.__proto__=c.prototype,u};function x(u,f,_,k){if(typeof f=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&f instanceof ArrayBuffer?I(u,f,_,k):typeof f=="string"?N(u,f,_):$(u,f)}c.from=function(u,f,_){return x(null,u,f,_)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0}));function C(u){if(typeof u!="number")throw new TypeError('"size" argument must be a number');if(u<0)throw new RangeError('"size" argument must not be negative')}function O(u,f,_,k){return C(f),f<=0?m(u,f):_!==void 0?typeof k=="string"?m(u,f).fill(_,k):m(u,f).fill(_):m(u,f)}c.alloc=function(u,f,_){return O(null,u,f,_)};function E(u,f){if(C(f),u=m(u,f<0?0:j(f)|0),!c.TYPED_ARRAY_SUPPORT)for(var _=0;_<f;++_)u[_]=0;return u}c.allocUnsafe=function(u){return E(null,u)},c.allocUnsafeSlow=function(u){return E(null,u)};function N(u,f,_){if((typeof _!="string"||_==="")&&(_="utf8"),!c.isEncoding(_))throw new TypeError('"encoding" must be a valid string encoding');var k=te(f,_)|0;u=m(u,k);var q=u.write(f,_);return q!==k&&(u=u.slice(0,q)),u}function M(u,f){var _=f.length<0?0:j(f.length)|0;u=m(u,_);for(var k=0;k<_;k+=1)u[k]=f[k]&255;return u}function I(u,f,_,k){if(f.byteLength,_<0||f.byteLength<_)throw new RangeError("'offset' is out of bounds");if(f.byteLength<_+(k||0))throw new RangeError("'length' is out of bounds");return _===void 0&&k===void 0?f=new Uint8Array(f):k===void 0?f=new Uint8Array(f,_):f=new Uint8Array(f,_,k),c.TYPED_ARRAY_SUPPORT?(u=f,u.__proto__=c.prototype):u=M(u,f),u}function $(u,f){if(c.isBuffer(f)){var _=j(f.length)|0;return u=m(u,_),u.length===0||f.copy(u,0,0,_),u}if(f){if(typeof ArrayBuffer<"u"&&f.buffer instanceof ArrayBuffer||"length"in f)return typeof f.length!="number"||Te(f.length)?m(u,0):M(u,f);if(f.type==="Buffer"&&s(f.data))return M(u,f.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function j(u){if(u>=d())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+d().toString(16)+" bytes");return u|0}function J(u){return+u!=u&&(u=0),c.alloc(+u)}c.isBuffer=function(u){return!!(u!=null&&u._isBuffer)},c.compare=function(u,f){if(!c.isBuffer(u)||!c.isBuffer(f))throw new TypeError("Arguments must be Buffers");if(u===f)return 0;for(var _=u.length,k=f.length,q=0,Q=Math.min(_,k);q<Q;++q)if(u[q]!==f[q]){_=u[q],k=f[q];break}return _<k?-1:k<_?1:0},c.isEncoding=function(u){switch(String(u).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(u,f){if(!s(u))throw new TypeError('"list" argument must be an Array of Buffers');if(u.length===0)return c.alloc(0);var _;if(f===void 0)for(f=0,_=0;_<u.length;++_)f+=u[_].length;var k=c.allocUnsafe(f),q=0;for(_=0;_<u.length;++_){var Q=u[_];if(!c.isBuffer(Q))throw new TypeError('"list" argument must be an Array of Buffers');Q.copy(k,q),q+=Q.length}return k};function te(u,f){if(c.isBuffer(u))return u.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(u)||u instanceof ArrayBuffer))return u.byteLength;typeof u!="string"&&(u=""+u);var _=u.length;if(_===0)return 0;for(var k=!1;;)switch(f){case"ascii":case"latin1":case"binary":return _;case"utf8":case"utf-8":case void 0:return P(u).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _*2;case"hex":return _>>>1;case"base64":return K(u).length;default:if(k)return P(u).length;f=(""+f).toLowerCase(),k=!0}}c.byteLength=te;function ne(u,f,_){var k=!1;if((f===void 0||f<0)&&(f=0),f>this.length||((_===void 0||_>this.length)&&(_=this.length),_<=0)||(_>>>=0,f>>>=0,_<=f))return"";for(u||(u="utf8");;)switch(u){case"hex":return w(this,f,_);case"utf8":case"utf-8":return Y(this,f,_);case"ascii":return g(this,f,_);case"latin1":case"binary":return p(this,f,_);case"base64":return Ae(this,f,_);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return h(this,f,_);default:if(k)throw new TypeError("Unknown encoding: "+u);u=(u+"").toLowerCase(),k=!0}}c.prototype._isBuffer=!0;function ue(u,f,_){var k=u[f];u[f]=u[_],u[_]=k}c.prototype.swap16=function(){var u=this.length;if(u%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var f=0;f<u;f+=2)ue(this,f,f+1);return this},c.prototype.swap32=function(){var u=this.length;if(u%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var f=0;f<u;f+=4)ue(this,f,f+3),ue(this,f+1,f+2);return this},c.prototype.swap64=function(){var u=this.length;if(u%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var f=0;f<u;f+=8)ue(this,f,f+7),ue(this,f+1,f+6),ue(this,f+2,f+5),ue(this,f+3,f+4);return this},c.prototype.toString=function(){var u=this.length|0;return u===0?"":arguments.length===0?Y(this,0,u):ne.apply(this,arguments)},c.prototype.equals=function(u){if(!c.isBuffer(u))throw new TypeError("Argument must be a Buffer");return this===u?!0:c.compare(this,u)===0},c.prototype.inspect=function(){var u="",f=i.INSPECT_MAX_BYTES;return this.length>0&&(u=this.toString("hex",0,f).match(/.{2}/g).join(" "),this.length>f&&(u+=" ... ")),"<Buffer "+u+">"},c.prototype.compare=function(u,f,_,k,q){if(!c.isBuffer(u))throw new TypeError("Argument must be a Buffer");if(f===void 0&&(f=0),_===void 0&&(_=u?u.length:0),k===void 0&&(k=0),q===void 0&&(q=this.length),f<0||_>u.length||k<0||q>this.length)throw new RangeError("out of range index");if(k>=q&&f>=_)return 0;if(k>=q)return-1;if(f>=_)return 1;if(f>>>=0,_>>>=0,k>>>=0,q>>>=0,this===u)return 0;for(var Q=q-k,Ce=_-f,be=Math.min(Q,Ce),Re=this.slice(k,q),Se=u.slice(f,_),Le=0;Le<be;++Le)if(Re[Le]!==Se[Le]){Q=Re[Le],Ce=Se[Le];break}return Q<Ce?-1:Ce<Q?1:0};function Z(u,f,_,k,q){if(u.length===0)return-1;if(typeof _=="string"?(k=_,_=0):_>2147483647?_=2147483647:_<-2147483648&&(_=-2147483648),_=+_,isNaN(_)&&(_=q?0:u.length-1),_<0&&(_=u.length+_),_>=u.length){if(q)return-1;_=u.length-1}else if(_<0)if(q)_=0;else return-1;if(typeof f=="string"&&(f=c.from(f,k)),c.isBuffer(f))return f.length===0?-1:le(u,f,_,k,q);if(typeof f=="number")return f=f&255,c.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?q?Uint8Array.prototype.indexOf.call(u,f,_):Uint8Array.prototype.lastIndexOf.call(u,f,_):le(u,[f],_,k,q);throw new TypeError("val must be string, number or Buffer")}function le(u,f,_,k,q){var Q=1,Ce=u.length,be=f.length;if(k!==void 0&&(k=String(k).toLowerCase(),k==="ucs2"||k==="ucs-2"||k==="utf16le"||k==="utf-16le")){if(u.length<2||f.length<2)return-1;Q=2,Ce/=2,be/=2,_/=2}function Re(Ge,Je){return Q===1?Ge[Je]:Ge.readUInt16BE(Je*Q)}var Se;if(q){var Le=-1;for(Se=_;Se<Ce;Se++)if(Re(u,Se)===Re(f,Le===-1?0:Se-Le)){if(Le===-1&&(Le=Se),Se-Le+1===be)return Le*Q}else Le!==-1&&(Se-=Se-Le),Le=-1}else for(_+be>Ce&&(_=Ce-be),Se=_;Se>=0;Se--){for(var Ne=!0,ke=0;ke<be;ke++)if(Re(u,Se+ke)!==Re(f,ke)){Ne=!1;break}if(Ne)return Se}return-1}c.prototype.includes=function(u,f,_){return this.indexOf(u,f,_)!==-1},c.prototype.indexOf=function(u,f,_){return Z(this,u,f,_,!0)},c.prototype.lastIndexOf=function(u,f,_){return Z(this,u,f,_,!1)};function oe(u,f,_,k){_=Number(_)||0;var q=u.length-_;k?(k=Number(k),k>q&&(k=q)):k=q;var Q=f.length;if(Q%2!==0)throw new TypeError("Invalid hex string");k>Q/2&&(k=Q/2);for(var Ce=0;Ce<k;++Ce){var be=parseInt(f.substr(Ce*2,2),16);if(isNaN(be))return Ce;u[_+Ce]=be}return Ce}function X(u,f,_,k){return se(P(f,u.length-_),u,_,k)}function me(u,f,_,k){return se(z(f),u,_,k)}function de(u,f,_,k){return me(u,f,_,k)}function re(u,f,_,k){return se(K(f),u,_,k)}function Oe(u,f,_,k){return se(F(f,u.length-_),u,_,k)}c.prototype.write=function(u,f,_,k){if(f===void 0)k="utf8",_=this.length,f=0;else if(_===void 0&&typeof f=="string")k=f,_=this.length,f=0;else if(isFinite(f))f=f|0,isFinite(_)?(_=_|0,k===void 0&&(k="utf8")):(k=_,_=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var q=this.length-f;if((_===void 0||_>q)&&(_=q),u.length>0&&(_<0||f<0)||f>this.length)throw new RangeError("Attempt to write outside buffer bounds");k||(k="utf8");for(var Q=!1;;)switch(k){case"hex":return oe(this,u,f,_);case"utf8":case"utf-8":return X(this,u,f,_);case"ascii":return me(this,u,f,_);case"latin1":case"binary":return de(this,u,f,_);case"base64":return re(this,u,f,_);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Oe(this,u,f,_);default:if(Q)throw new TypeError("Unknown encoding: "+k);k=(""+k).toLowerCase(),Q=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Ae(u,f,_){return f===0&&_===u.length?n.fromByteArray(u):n.fromByteArray(u.slice(f,_))}function Y(u,f,_){_=Math.min(u.length,_);for(var k=[],q=f;q<_;){var Q=u[q],Ce=null,be=Q>239?4:Q>223?3:Q>191?2:1;if(q+be<=_){var Re,Se,Le,Ne;switch(be){case 1:Q<128&&(Ce=Q);break;case 2:Re=u[q+1],(Re&192)===128&&(Ne=(Q&31)<<6|Re&63,Ne>127&&(Ce=Ne));break;case 3:Re=u[q+1],Se=u[q+2],(Re&192)===128&&(Se&192)===128&&(Ne=(Q&15)<<12|(Re&63)<<6|Se&63,Ne>2047&&(Ne<55296||Ne>57343)&&(Ce=Ne));break;case 4:Re=u[q+1],Se=u[q+2],Le=u[q+3],(Re&192)===128&&(Se&192)===128&&(Le&192)===128&&(Ne=(Q&15)<<18|(Re&63)<<12|(Se&63)<<6|Le&63,Ne>65535&&Ne<1114112&&(Ce=Ne))}}Ce===null?(Ce=65533,be=1):Ce>65535&&(Ce-=65536,k.push(Ce>>>10&1023|55296),Ce=56320|Ce&1023),k.push(Ce),q+=be}return A(k)}var R=4096;function A(u){var f=u.length;if(f<=R)return String.fromCharCode.apply(String,u);for(var _="",k=0;k<f;)_+=String.fromCharCode.apply(String,u.slice(k,k+=R));return _}function g(u,f,_){var k="";_=Math.min(u.length,_);for(var q=f;q<_;++q)k+=String.fromCharCode(u[q]&127);return k}function p(u,f,_){var k="";_=Math.min(u.length,_);for(var q=f;q<_;++q)k+=String.fromCharCode(u[q]);return k}function w(u,f,_){var k=u.length;(!f||f<0)&&(f=0),(!_||_<0||_>k)&&(_=k);for(var q="",Q=f;Q<_;++Q)q+=_e(u[Q]);return q}function h(u,f,_){for(var k=u.slice(f,_),q="",Q=0;Q<k.length;Q+=2)q+=String.fromCharCode(k[Q]+k[Q+1]*256);return q}c.prototype.slice=function(u,f){var _=this.length;u=~~u,f=f===void 0?_:~~f,u<0?(u+=_,u<0&&(u=0)):u>_&&(u=_),f<0?(f+=_,f<0&&(f=0)):f>_&&(f=_),f<u&&(f=u);var k;if(c.TYPED_ARRAY_SUPPORT)k=this.subarray(u,f),k.__proto__=c.prototype;else{var q=f-u;k=new c(q,void 0);for(var Q=0;Q<q;++Q)k[Q]=this[Q+u]}return k};function v(u,f,_){if(u%1!==0||u<0)throw new RangeError("offset is not uint");if(u+f>_)throw new RangeError("Trying to access beyond buffer length")}c.prototype.readUIntLE=function(u,f,_){u=u|0,f=f|0,_||v(u,f,this.length);for(var k=this[u],q=1,Q=0;++Q<f&&(q*=256);)k+=this[u+Q]*q;return k},c.prototype.readUIntBE=function(u,f,_){u=u|0,f=f|0,_||v(u,f,this.length);for(var k=this[u+--f],q=1;f>0&&(q*=256);)k+=this[u+--f]*q;return k},c.prototype.readUInt8=function(u,f){return f||v(u,1,this.length),this[u]},c.prototype.readUInt16LE=function(u,f){return f||v(u,2,this.length),this[u]|this[u+1]<<8},c.prototype.readUInt16BE=function(u,f){return f||v(u,2,this.length),this[u]<<8|this[u+1]},c.prototype.readUInt32LE=function(u,f){return f||v(u,4,this.length),(this[u]|this[u+1]<<8|this[u+2]<<16)+this[u+3]*16777216},c.prototype.readUInt32BE=function(u,f){return f||v(u,4,this.length),this[u]*16777216+(this[u+1]<<16|this[u+2]<<8|this[u+3])},c.prototype.readIntLE=function(u,f,_){u=u|0,f=f|0,_||v(u,f,this.length);for(var k=this[u],q=1,Q=0;++Q<f&&(q*=256);)k+=this[u+Q]*q;return q*=128,k>=q&&(k-=Math.pow(2,8*f)),k},c.prototype.readIntBE=function(u,f,_){u=u|0,f=f|0,_||v(u,f,this.length);for(var k=f,q=1,Q=this[u+--k];k>0&&(q*=256);)Q+=this[u+--k]*q;return q*=128,Q>=q&&(Q-=Math.pow(2,8*f)),Q},c.prototype.readInt8=function(u,f){return f||v(u,1,this.length),this[u]&128?(255-this[u]+1)*-1:this[u]},c.prototype.readInt16LE=function(u,f){f||v(u,2,this.length);var _=this[u]|this[u+1]<<8;return _&32768?_|4294901760:_},c.prototype.readInt16BE=function(u,f){f||v(u,2,this.length);var _=this[u+1]|this[u]<<8;return _&32768?_|4294901760:_},c.prototype.readInt32LE=function(u,f){return f||v(u,4,this.length),this[u]|this[u+1]<<8|this[u+2]<<16|this[u+3]<<24},c.prototype.readInt32BE=function(u,f){return f||v(u,4,this.length),this[u]<<24|this[u+1]<<16|this[u+2]<<8|this[u+3]},c.prototype.readFloatLE=function(u,f){return f||v(u,4,this.length),r.read(this,u,!0,23,4)},c.prototype.readFloatBE=function(u,f){return f||v(u,4,this.length),r.read(this,u,!1,23,4)},c.prototype.readDoubleLE=function(u,f){return f||v(u,8,this.length),r.read(this,u,!0,52,8)},c.prototype.readDoubleBE=function(u,f){return f||v(u,8,this.length),r.read(this,u,!1,52,8)};function D(u,f,_,k,q,Q){if(!c.isBuffer(u))throw new TypeError('"buffer" argument must be a Buffer instance');if(f>q||f<Q)throw new RangeError('"value" argument is out of bounds');if(_+k>u.length)throw new RangeError("Index out of range")}c.prototype.writeUIntLE=function(u,f,_,k){if(u=+u,f=f|0,_=_|0,!k){var q=Math.pow(2,8*_)-1;D(this,u,f,_,q,0)}var Q=1,Ce=0;for(this[f]=u&255;++Ce<_&&(Q*=256);)this[f+Ce]=u/Q&255;return f+_},c.prototype.writeUIntBE=function(u,f,_,k){if(u=+u,f=f|0,_=_|0,!k){var q=Math.pow(2,8*_)-1;D(this,u,f,_,q,0)}var Q=_-1,Ce=1;for(this[f+Q]=u&255;--Q>=0&&(Ce*=256);)this[f+Q]=u/Ce&255;return f+_},c.prototype.writeUInt8=function(u,f,_){return u=+u,f=f|0,_||D(this,u,f,1,255,0),c.TYPED_ARRAY_SUPPORT||(u=Math.floor(u)),this[f]=u&255,f+1};function W(u,f,_,k){f<0&&(f=65535+f+1);for(var q=0,Q=Math.min(u.length-_,2);q<Q;++q)u[_+q]=(f&255<<8*(k?q:1-q))>>>(k?q:1-q)*8}c.prototype.writeUInt16LE=function(u,f,_){return u=+u,f=f|0,_||D(this,u,f,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[f]=u&255,this[f+1]=u>>>8):W(this,u,f,!0),f+2},c.prototype.writeUInt16BE=function(u,f,_){return u=+u,f=f|0,_||D(this,u,f,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[f]=u>>>8,this[f+1]=u&255):W(this,u,f,!1),f+2};function V(u,f,_,k){f<0&&(f=4294967295+f+1);for(var q=0,Q=Math.min(u.length-_,4);q<Q;++q)u[_+q]=f>>>(k?q:3-q)*8&255}c.prototype.writeUInt32LE=function(u,f,_){return u=+u,f=f|0,_||D(this,u,f,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[f+3]=u>>>24,this[f+2]=u>>>16,this[f+1]=u>>>8,this[f]=u&255):V(this,u,f,!0),f+4},c.prototype.writeUInt32BE=function(u,f,_){return u=+u,f=f|0,_||D(this,u,f,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[f]=u>>>24,this[f+1]=u>>>16,this[f+2]=u>>>8,this[f+3]=u&255):V(this,u,f,!1),f+4},c.prototype.writeIntLE=function(u,f,_,k){if(u=+u,f=f|0,!k){var q=Math.pow(2,8*_-1);D(this,u,f,_,q-1,-q)}var Q=0,Ce=1,be=0;for(this[f]=u&255;++Q<_&&(Ce*=256);)u<0&&be===0&&this[f+Q-1]!==0&&(be=1),this[f+Q]=(u/Ce>>0)-be&255;return f+_},c.prototype.writeIntBE=function(u,f,_,k){if(u=+u,f=f|0,!k){var q=Math.pow(2,8*_-1);D(this,u,f,_,q-1,-q)}var Q=_-1,Ce=1,be=0;for(this[f+Q]=u&255;--Q>=0&&(Ce*=256);)u<0&&be===0&&this[f+Q+1]!==0&&(be=1),this[f+Q]=(u/Ce>>0)-be&255;return f+_},c.prototype.writeInt8=function(u,f,_){return u=+u,f=f|0,_||D(this,u,f,1,127,-128),c.TYPED_ARRAY_SUPPORT||(u=Math.floor(u)),u<0&&(u=255+u+1),this[f]=u&255,f+1},c.prototype.writeInt16LE=function(u,f,_){return u=+u,f=f|0,_||D(this,u,f,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[f]=u&255,this[f+1]=u>>>8):W(this,u,f,!0),f+2},c.prototype.writeInt16BE=function(u,f,_){return u=+u,f=f|0,_||D(this,u,f,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[f]=u>>>8,this[f+1]=u&255):W(this,u,f,!1),f+2},c.prototype.writeInt32LE=function(u,f,_){return u=+u,f=f|0,_||D(this,u,f,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[f]=u&255,this[f+1]=u>>>8,this[f+2]=u>>>16,this[f+3]=u>>>24):V(this,u,f,!0),f+4},c.prototype.writeInt32BE=function(u,f,_){return u=+u,f=f|0,_||D(this,u,f,4,2147483647,-2147483648),u<0&&(u=4294967295+u+1),c.TYPED_ARRAY_SUPPORT?(this[f]=u>>>24,this[f+1]=u>>>16,this[f+2]=u>>>8,this[f+3]=u&255):V(this,u,f,!1),f+4};function ae(u,f,_,k,q,Q){if(_+k>u.length)throw new RangeError("Index out of range");if(_<0)throw new RangeError("Index out of range")}function fe(u,f,_,k,q){return q||ae(u,f,_,4),r.write(u,f,_,k,23,4),_+4}c.prototype.writeFloatLE=function(u,f,_){return fe(this,u,f,!0,_)},c.prototype.writeFloatBE=function(u,f,_){return fe(this,u,f,!1,_)};function we(u,f,_,k,q){return q||ae(u,f,_,8),r.write(u,f,_,k,52,8),_+8}c.prototype.writeDoubleLE=function(u,f,_){return we(this,u,f,!0,_)},c.prototype.writeDoubleBE=function(u,f,_){return we(this,u,f,!1,_)},c.prototype.copy=function(u,f,_,k){if(_||(_=0),!k&&k!==0&&(k=this.length),f>=u.length&&(f=u.length),f||(f=0),k>0&&k<_&&(k=_),k===_||u.length===0||this.length===0)return 0;if(f<0)throw new RangeError("targetStart out of bounds");if(_<0||_>=this.length)throw new RangeError("sourceStart out of bounds");if(k<0)throw new RangeError("sourceEnd out of bounds");k>this.length&&(k=this.length),u.length-f<k-_&&(k=u.length-f+_);var q=k-_,Q;if(this===u&&_<f&&f<k)for(Q=q-1;Q>=0;--Q)u[Q+f]=this[Q+_];else if(q<1e3||!c.TYPED_ARRAY_SUPPORT)for(Q=0;Q<q;++Q)u[Q+f]=this[Q+_];else Uint8Array.prototype.set.call(u,this.subarray(_,_+q),f);return q},c.prototype.fill=function(u,f,_,k){if(typeof u=="string"){if(typeof f=="string"?(k=f,f=0,_=this.length):typeof _=="string"&&(k=_,_=this.length),u.length===1){var q=u.charCodeAt(0);q<256&&(u=q)}if(k!==void 0&&typeof k!="string")throw new TypeError("encoding must be a string");if(typeof k=="string"&&!c.isEncoding(k))throw new TypeError("Unknown encoding: "+k)}else typeof u=="number"&&(u=u&255);if(f<0||this.length<f||this.length<_)throw new RangeError("Out of range index");if(_<=f)return this;f=f>>>0,_=_===void 0?this.length:_>>>0,u||(u=0);var Q;if(typeof u=="number")for(Q=f;Q<_;++Q)this[Q]=u;else{var Ce=c.isBuffer(u)?u:P(new c(u,k).toString()),be=Ce.length;for(Q=0;Q<_-f;++Q)this[Q+f]=Ce[Q%be]}return this};var ee=/[^+\/0-9A-Za-z-_]/g;function he(u){if(u=De(u).replace(ee,""),u.length<2)return"";for(;u.length%4!==0;)u=u+"=";return u}function De(u){return u.trim?u.trim():u.replace(/^\s+|\s+$/g,"")}function _e(u){return u<16?"0"+u.toString(16):u.toString(16)}function P(u,f){f=f||1/0;for(var _,k=u.length,q=null,Q=[],Ce=0;Ce<k;++Ce){if(_=u.charCodeAt(Ce),_>55295&&_<57344){if(!q){if(_>56319){(f-=3)>-1&&Q.push(239,191,189);continue}else if(Ce+1===k){(f-=3)>-1&&Q.push(239,191,189);continue}q=_;continue}if(_<56320){(f-=3)>-1&&Q.push(239,191,189),q=_;continue}_=(q-55296<<10|_-56320)+65536}else q&&(f-=3)>-1&&Q.push(239,191,189);if(q=null,_<128){if((f-=1)<0)break;Q.push(_)}else if(_<2048){if((f-=2)<0)break;Q.push(_>>6|192,_&63|128)}else if(_<65536){if((f-=3)<0)break;Q.push(_>>12|224,_>>6&63|128,_&63|128)}else if(_<1114112){if((f-=4)<0)break;Q.push(_>>18|240,_>>12&63|128,_>>6&63|128,_&63|128)}else throw new Error("Invalid code point")}return Q}function z(u){for(var f=[],_=0;_<u.length;++_)f.push(u.charCodeAt(_)&255);return f}function F(u,f){for(var _,k,q,Q=[],Ce=0;Ce<u.length&&!((f-=2)<0);++Ce)_=u.charCodeAt(Ce),k=_>>8,q=_%256,Q.push(q),Q.push(k);return Q}function K(u){return n.toByteArray(he(u))}function se(u,f,_,k){for(var q=0;q<k&&!(q+_>=f.length||q>=u.length);++q)f[q+_]=u[q];return q}function Te(u){return u!==u}}(Il)),Il}Qd();var Lr;if(typeof window<"u"&&window.crypto&&(Lr=window.crypto),!Lr&&typeof window<"u"&&window.msCrypto&&(Lr=window.msCrypto),!Lr&&typeof global<"u"&&global.crypto&&(Lr=global.crypto),!Lr&&typeof require=="function")try{Lr=require("crypto")}catch{}var jl={};/*! *****************************************************************************
92
92
  Copyright (c) Microsoft Corporation.
93
93
 
94
94
  Permission to use, copy, modify, and/or distribute this software for any
@@ -101,44 +101,44 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
101
101
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
102
102
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
103
103
  PERFORMANCE OF THIS SOFTWARE.
104
- ***************************************************************************** */var ua=function(i,n){return ua=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var l in s)s.hasOwnProperty(l)&&(r[l]=s[l])},ua(i,n)};function Jd(i,n){ua(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}var la=function(){return la=Object.assign||function(i){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(i[l]=n[l])}return i},la.apply(this,arguments)};function Xd(i,n){var r={};for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&n.indexOf(s)<0&&(r[s]=i[s]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,s=Object.getOwnPropertySymbols(i);l<s.length;l++)n.indexOf(s[l])<0&&Object.prototype.propertyIsEnumerable.call(i,s[l])&&(r[s[l]]=i[s[l]]);return r}function ep(i,n,r,s){var l=arguments.length,d=l<3?n:s===null?s=Object.getOwnPropertyDescriptor(n,r):s,m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(i,n,r,s);else for(var c=i.length-1;c>=0;c--)(m=i[c])&&(d=(l<3?m(d):l>3?m(n,r,d):m(n,r))||d);return l>3&&d&&Object.defineProperty(n,r,d),d}function tp(i,n){return function(r,s){n(r,s,i)}}function np(i,n){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,n)}function rp(i,n,r,s){function l(d){return d instanceof r?d:new r(function(m){m(d)})}return new(r||(r=Promise))(function(d,m){function c(O){try{C(s.next(O))}catch(R){m(R)}}function x(O){try{C(s.throw(O))}catch(R){m(R)}}function C(O){O.done?d(O.value):l(O.value).then(c,x)}C((s=s.apply(i,n||[])).next())})}function ip(i,n){var r={label:0,sent:function(){if(d[0]&1)throw d[1];return d[1]},trys:[],ops:[]},s,l,d,m;return m={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(m[Symbol.iterator]=function(){return this}),m;function c(C){return function(O){return x([C,O])}}function x(C){if(s)throw new TypeError("Generator is already executing.");for(;r;)try{if(s=1,l&&(d=C[0]&2?l.return:C[0]?l.throw||((d=l.return)&&d.call(l),0):l.next)&&!(d=d.call(l,C[1])).done)return d;switch(l=0,d&&(C=[C[0]&2,d.value]),C[0]){case 0:case 1:d=C;break;case 4:return r.label++,{value:C[1],done:!1};case 5:r.label++,l=C[1],C=[0];continue;case 7:C=r.ops.pop(),r.trys.pop();continue;default:if(d=r.trys,!(d=d.length>0&&d[d.length-1])&&(C[0]===6||C[0]===2)){r=0;continue}if(C[0]===3&&(!d||C[1]>d[0]&&C[1]<d[3])){r.label=C[1];break}if(C[0]===6&&r.label<d[1]){r.label=d[1],d=C;break}if(d&&r.label<d[2]){r.label=d[2],r.ops.push(C);break}d[2]&&r.ops.pop(),r.trys.pop();continue}C=n.call(i,r)}catch(O){C=[6,O],l=0}finally{s=d=0}if(C[0]&5)throw C[1];return{value:C[0]?C[1]:void 0,done:!0}}}function op(i,n,r,s){s===void 0&&(s=r),i[s]=n[r]}function sp(i,n){for(var r in i)r!=="default"&&!n.hasOwnProperty(r)&&(n[r]=i[r])}function ca(i){var n=typeof Symbol=="function"&&Symbol.iterator,r=n&&i[n],s=0;if(r)return r.call(i);if(i&&typeof i.length=="number")return{next:function(){return i&&s>=i.length&&(i=void 0),{value:i&&i[s++],done:!i}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function jl(i,n){var r=typeof Symbol=="function"&&i[Symbol.iterator];if(!r)return i;var s=r.call(i),l,d=[],m;try{for(;(n===void 0||n-- >0)&&!(l=s.next()).done;)d.push(l.value)}catch(c){m={error:c}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(m)throw m.error}}return d}function ap(){for(var i=[],n=0;n<arguments.length;n++)i=i.concat(jl(arguments[n]));return i}function up(){for(var i=0,n=0,r=arguments.length;n<r;n++)i+=arguments[n].length;for(var s=Array(i),l=0,n=0;n<r;n++)for(var d=arguments[n],m=0,c=d.length;m<c;m++,l++)s[l]=d[m];return s}function Ni(i){return this instanceof Ni?(this.v=i,this):new Ni(i)}function lp(i,n,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s=r.apply(i,n||[]),l,d=[];return l={},m("next"),m("throw"),m("return"),l[Symbol.asyncIterator]=function(){return this},l;function m(N){s[N]&&(l[N]=function(E){return new Promise(function(I,$){d.push([N,E,I,$])>1||c(N,E)})})}function c(N,E){try{x(s[N](E))}catch(I){R(d[0][3],I)}}function x(N){N.value instanceof Ni?Promise.resolve(N.value.v).then(C,O):R(d[0][2],N)}function C(N){c("next",N)}function O(N){c("throw",N)}function R(N,E){N(E),d.shift(),d.length&&c(d[0][0],d[0][1])}}function cp(i){var n,r;return n={},s("next"),s("throw",function(l){throw l}),s("return"),n[Symbol.iterator]=function(){return this},n;function s(l,d){n[l]=i[l]?function(m){return(r=!r)?{value:Ni(i[l](m)),done:l==="return"}:d?d(m):m}:d}}function fp(i){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=i[Symbol.asyncIterator],r;return n?n.call(i):(i=typeof ca=="function"?ca(i):i[Symbol.iterator](),r={},s("next"),s("throw"),s("return"),r[Symbol.asyncIterator]=function(){return this},r);function s(d){r[d]=i[d]&&function(m){return new Promise(function(c,x){m=i[d](m),l(c,x,m.done,m.value)})}}function l(d,m,c,x){Promise.resolve(x).then(function(C){d({value:C,done:c})},m)}}function hp(i,n){return Object.defineProperty?Object.defineProperty(i,"raw",{value:n}):i.raw=n,i}function dp(i){if(i&&i.__esModule)return i;var n={};if(i!=null)for(var r in i)Object.hasOwnProperty.call(i,r)&&(n[r]=i[r]);return n.default=i,n}function pp(i){return i&&i.__esModule?i:{default:i}}function gp(i,n){if(!n.has(i))throw new TypeError("attempted to get private field on non-instance");return n.get(i)}function mp(i,n,r){if(!n.has(i))throw new TypeError("attempted to set private field on non-instance");return n.set(i,r),r}const vp=Object.freeze(Object.defineProperty({__proto__:null,get __assign(){return la},__asyncDelegator:cp,__asyncGenerator:lp,__asyncValues:fp,__await:Ni,__awaiter:rp,__classPrivateFieldGet:gp,__classPrivateFieldSet:mp,__createBinding:op,__decorate:ep,__exportStar:sp,__extends:Jd,__generator:ip,__importDefault:pp,__importStar:dp,__makeTemplateObject:hp,__metadata:np,__param:tp,__read:jl,__rest:Xd,__spread:ap,__spreadArrays:up,__values:ca},Symbol.toStringTag,{value:"Module"})),Yl=na(vp);var $i={},un={},Ul;function Fl(){return Ul||(Ul=1,Object.defineProperty(un,"__esModule",{value:!0}),un.MAX_HASHABLE_LENGTH=un.INIT=un.KEY=un.DIGEST_LENGTH=un.BLOCK_SIZE=void 0,un.BLOCK_SIZE=64,un.DIGEST_LENGTH=32,un.KEY=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),un.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],un.MAX_HASHABLE_LENGTH=Math.pow(2,53)-1),un}var Bi={},Wl;function yp(){if(Wl)return Bi;Wl=1,Object.defineProperty(Bi,"__esModule",{value:!0}),Bi.RawSha256=void 0;var i=Fl(),n=function(){function r(){this.state=Int32Array.from(i.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return r.prototype.update=function(s){if(this.finished)throw new Error("Attempted to update an already finished hash.");var l=0,d=s.byteLength;if(this.bytesHashed+=d,this.bytesHashed*8>i.MAX_HASHABLE_LENGTH)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;d>0;)this.buffer[this.bufferLength++]=s[l++],d--,this.bufferLength===i.BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)},r.prototype.digest=function(){if(!this.finished){var s=this.bytesHashed*8,l=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),d=this.bufferLength;if(l.setUint8(this.bufferLength++,128),d%i.BLOCK_SIZE>=i.BLOCK_SIZE-8){for(var m=this.bufferLength;m<i.BLOCK_SIZE;m++)l.setUint8(m,0);this.hashBuffer(),this.bufferLength=0}for(var m=this.bufferLength;m<i.BLOCK_SIZE-8;m++)l.setUint8(m,0);l.setUint32(i.BLOCK_SIZE-8,Math.floor(s/4294967296),!0),l.setUint32(i.BLOCK_SIZE-4,s),this.hashBuffer(),this.finished=!0}for(var c=new Uint8Array(i.DIGEST_LENGTH),m=0;m<8;m++)c[m*4]=this.state[m]>>>24&255,c[m*4+1]=this.state[m]>>>16&255,c[m*4+2]=this.state[m]>>>8&255,c[m*4+3]=this.state[m]>>>0&255;return c},r.prototype.hashBuffer=function(){for(var s=this,l=s.buffer,d=s.state,m=d[0],c=d[1],x=d[2],C=d[3],O=d[4],R=d[5],N=d[6],E=d[7],I=0;I<i.BLOCK_SIZE;I++){if(I<16)this.temp[I]=(l[I*4]&255)<<24|(l[I*4+1]&255)<<16|(l[I*4+2]&255)<<8|l[I*4+3]&255;else{var $=this.temp[I-2],j=($>>>17|$<<15)^($>>>19|$<<13)^$>>>10;$=this.temp[I-15];var X=($>>>7|$<<25)^($>>>18|$<<14)^$>>>3;this.temp[I]=(j+this.temp[I-7]|0)+(X+this.temp[I-16]|0)}var te=(((O>>>6|O<<26)^(O>>>11|O<<21)^(O>>>25|O<<7))+(O&R^~O&N)|0)+(E+(i.KEY[I]+this.temp[I]|0)|0)|0,ne=((m>>>2|m<<30)^(m>>>13|m<<19)^(m>>>22|m<<10))+(m&c^m&x^c&x)|0;E=N,N=R,R=O,O=C+te|0,C=x,x=c,c=m,m=te+ne|0}d[0]+=m,d[1]+=c,d[2]+=x,d[3]+=C,d[4]+=O,d[5]+=R,d[6]+=N,d[7]+=E},r}();return Bi.RawSha256=n,Bi}var zl={},ji={};const _p=i=>{const n=[];for(let r=0,s=i.length;r<s;r++){const l=i.charCodeAt(r);if(l<128)n.push(l);else if(l<2048)n.push(l>>6|192,l&63|128);else if(r+1<i.length&&(l&64512)===55296&&(i.charCodeAt(r+1)&64512)===56320){const d=65536+((l&1023)<<10)+(i.charCodeAt(++r)&1023);n.push(d>>18|240,d>>12&63|128,d>>6&63|128,d&63|128)}else n.push(l>>12|224,l>>6&63|128,l&63|128)}return Uint8Array.from(n)},wp=i=>{let n="";for(let r=0,s=i.length;r<s;r++){const l=i[r];if(l<128)n+=String.fromCharCode(l);else if(192<=l&&l<224){const d=i[++r];n+=String.fromCharCode((l&31)<<6|d&63)}else if(240<=l&&l<365){const d="%"+[l,i[++r],i[++r],i[++r]].map(m=>m.toString(16)).join("%");n+=decodeURIComponent(d)}else n+=String.fromCharCode((l&15)<<12|(i[++r]&63)<<6|i[++r]&63)}return n};function bp(i){return new TextEncoder().encode(i)}function xp(i){return new TextDecoder("utf-8").decode(i)}const Sp=i=>typeof TextEncoder=="function"?bp(i):_p(i),Cp=i=>typeof TextDecoder=="function"?xp(i):wp(i),Ap=Object.freeze(Object.defineProperty({__proto__:null,fromUtf8:Sp,toUtf8:Cp},Symbol.toStringTag,{value:"Module"})),Dp=na(Ap);var ql;function Op(){if(ql)return ji;ql=1,Object.defineProperty(ji,"__esModule",{value:!0}),ji.convertToBuffer=void 0;var i=Dp,n=typeof Buffer<"u"&&Buffer.from?function(s){return Buffer.from(s,"utf8")}:i.fromUtf8;function r(s){return s instanceof Uint8Array?s:typeof s=="string"?n(s):ArrayBuffer.isView(s)?new Uint8Array(s.buffer,s.byteOffset,s.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(s)}return ji.convertToBuffer=r,ji}var Yi={},Hl;function Tp(){if(Hl)return Yi;Hl=1,Object.defineProperty(Yi,"__esModule",{value:!0}),Yi.isEmptyData=void 0;function i(n){return typeof n=="string"?n.length===0:n.byteLength===0}return Yi.isEmptyData=i,Yi}var Ui={},Gl;function Mp(){if(Gl)return Ui;Gl=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.numToUint8=void 0;function i(n){return new Uint8Array([(n&4278190080)>>24,(n&16711680)>>16,(n&65280)>>8,n&255])}return Ui.numToUint8=i,Ui}var Fi={},Vl;function Ep(){if(Vl)return Fi;Vl=1,Object.defineProperty(Fi,"__esModule",{value:!0}),Fi.uint32ArrayFrom=void 0;function i(n){if(!Array.from){for(var r=new Uint32Array(n.length),s=0;s<n.length;)r[s]=n[s];return r}return Uint32Array.from(n)}return Fi.uint32ArrayFrom=i,Fi}var Zl;function Rp(){return Zl||(Zl=1,function(i){Object.defineProperty(i,"__esModule",{value:!0}),i.uint32ArrayFrom=i.numToUint8=i.isEmptyData=i.convertToBuffer=void 0;var n=Op();Object.defineProperty(i,"convertToBuffer",{enumerable:!0,get:function(){return n.convertToBuffer}});var r=Tp();Object.defineProperty(i,"isEmptyData",{enumerable:!0,get:function(){return r.isEmptyData}});var s=Mp();Object.defineProperty(i,"numToUint8",{enumerable:!0,get:function(){return s.numToUint8}});var l=Ep();Object.defineProperty(i,"uint32ArrayFrom",{enumerable:!0,get:function(){return l.uint32ArrayFrom}})}(zl)),zl}var Kl;function Lp(){if(Kl)return $i;Kl=1,Object.defineProperty($i,"__esModule",{value:!0}),$i.Sha256=void 0;var i=Yl,n=Fl(),r=yp(),s=Rp(),l=function(){function m(c){if(this.hash=new r.RawSha256,c){this.outer=new r.RawSha256;var x=d(c),C=new Uint8Array(n.BLOCK_SIZE);C.set(x);for(var O=0;O<n.BLOCK_SIZE;O++)x[O]^=54,C[O]^=92;this.hash.update(x),this.outer.update(C);for(var O=0;O<x.byteLength;O++)x[O]=0}}return m.prototype.update=function(c){if(!((0,s.isEmptyData)(c)||this.error))try{this.hash.update((0,s.convertToBuffer)(c))}catch(x){this.error=x}},m.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},m.prototype.digest=function(){return(0,i.__awaiter)(this,void 0,void 0,function(){return(0,i.__generator)(this,function(c){return[2,this.digestSync()]})})},m}();$i.Sha256=l;function d(m){var c=(0,s.convertToBuffer)(m);if(c.byteLength>n.BLOCK_SIZE){var x=new r.RawSha256;x.update(c),c=x.digest()}var C=new Uint8Array(n.BLOCK_SIZE);return C.set(c),C}return $i}var Ql;function kp(){return Ql||(Ql=1,function(i){Object.defineProperty(i,"__esModule",{value:!0});var n=Yl;(0,n.__exportStar)(Lp(),i)}(Bl)),Bl}kp();function Ye(i,n){i!=null&&this.fromString(i,n)}function $t(){return new Ye(null)}var er,Ip=0xdeadbeefcafe,Jl=(Ip&16777215)==15715070;function Pp(i,n,r,s,l,d){for(;--d>=0;){var m=n*this[i++]+r[s]+l;l=Math.floor(m/67108864),r[s++]=m&67108863}return l}function Np(i,n,r,s,l,d){for(var m=n&32767,c=n>>15;--d>=0;){var x=this[i]&32767,C=this[i++]>>15,O=c*x+C*m;x=m*x+((O&32767)<<15)+r[s]+(l&1073741823),l=(x>>>30)+(O>>>15)+c*C+(l>>>30),r[s++]=x&1073741823}return l}function $p(i,n,r,s,l,d){for(var m=n&16383,c=n>>14;--d>=0;){var x=this[i]&16383,C=this[i++]>>14,O=c*x+C*m;x=m*x+((O&16383)<<14)+r[s]+l,l=(x>>28)+(O>>14)+c*C,r[s++]=x&268435455}return l}var Xl=typeof navigator<"u";Xl&&Jl&&navigator.appName=="Microsoft Internet Explorer"?(Ye.prototype.am=Np,er=30):Xl&&Jl&&navigator.appName!="Netscape"?(Ye.prototype.am=Pp,er=26):(Ye.prototype.am=$p,er=28),Ye.prototype.DB=er,Ye.prototype.DM=(1<<er)-1,Ye.prototype.DV=1<<er;var fa=52;Ye.prototype.FV=Math.pow(2,fa),Ye.prototype.F1=fa-er,Ye.prototype.F2=2*er-fa;var Bp="0123456789abcdefghijklmnopqrstuvwxyz",Eo=new Array,Xr,ln;for(Xr=48,ln=0;ln<=9;++ln)Eo[Xr++]=ln;for(Xr=97,ln=10;ln<36;++ln)Eo[Xr++]=ln;for(Xr=65,ln=10;ln<36;++ln)Eo[Xr++]=ln;function ec(i){return Bp.charAt(i)}function jp(i,n){var r=Eo[i.charCodeAt(n)];return r??-1}function Yp(i){for(var n=this.t-1;n>=0;--n)i[n]=this[n];i.t=this.t,i.s=this.s}function Up(i){this.t=1,this.s=i<0?-1:0,i>0?this[0]=i:i<-1?this[0]=i+this.DV:this.t=0}function ha(i){var n=$t();return n.fromInt(i),n}function Fp(i,n){var r;if(n==16)r=4;else if(n==8)r=3;else if(n==2)r=1;else if(n==32)r=5;else if(n==4)r=2;else throw new Error("Only radix 2, 4, 8, 16, 32 are supported");this.t=0,this.s=0;for(var s=i.length,l=!1,d=0;--s>=0;){var m=jp(i,s);if(m<0){i.charAt(s)=="-"&&(l=!0);continue}l=!1,d==0?this[this.t++]=m:d+r>this.DB?(this[this.t-1]|=(m&(1<<this.DB-d)-1)<<d,this[this.t++]=m>>this.DB-d):this[this.t-1]|=m<<d,d+=r,d>=this.DB&&(d-=this.DB)}this.clamp(),l&&Ye.ZERO.subTo(this,this)}function Wp(){for(var i=this.s&this.DM;this.t>0&&this[this.t-1]==i;)--this.t}function zp(i){if(this.s<0)return"-"+this.negate().toString(i);var n;if(i==16)n=4;else if(i==8)n=3;else if(i==2)n=1;else if(i==32)n=5;else if(i==4)n=2;else throw new Error("Only radix 2, 4, 8, 16, 32 are supported");var r=(1<<n)-1,s,l=!1,d="",m=this.t,c=this.DB-m*this.DB%n;if(m-- >0)for(c<this.DB&&(s=this[m]>>c)>0&&(l=!0,d=ec(s));m>=0;)c<n?(s=(this[m]&(1<<c)-1)<<n-c,s|=this[--m]>>(c+=this.DB-n)):(s=this[m]>>(c-=n)&r,c<=0&&(c+=this.DB,--m)),s>0&&(l=!0),l&&(d+=ec(s));return l?d:"0"}function qp(){var i=$t();return Ye.ZERO.subTo(this,i),i}function Hp(){return this.s<0?this.negate():this}function Gp(i){var n=this.s-i.s;if(n!=0)return n;var r=this.t;if(n=r-i.t,n!=0)return this.s<0?-n:n;for(;--r>=0;)if((n=this[r]-i[r])!=0)return n;return 0}function da(i){var n=1,r;return(r=i>>>16)!=0&&(i=r,n+=16),(r=i>>8)!=0&&(i=r,n+=8),(r=i>>4)!=0&&(i=r,n+=4),(r=i>>2)!=0&&(i=r,n+=2),(r=i>>1)!=0&&(i=r,n+=1),n}function Vp(){return this.t<=0?0:this.DB*(this.t-1)+da(this[this.t-1]^this.s&this.DM)}function Zp(i,n){var r;for(r=this.t-1;r>=0;--r)n[r+i]=this[r];for(r=i-1;r>=0;--r)n[r]=0;n.t=this.t+i,n.s=this.s}function Kp(i,n){for(var r=i;r<this.t;++r)n[r-i]=this[r];n.t=Math.max(this.t-i,0),n.s=this.s}function Qp(i,n){var r=i%this.DB,s=this.DB-r,l=(1<<s)-1,d=Math.floor(i/this.DB),m=this.s<<r&this.DM,c;for(c=this.t-1;c>=0;--c)n[c+d+1]=this[c]>>s|m,m=(this[c]&l)<<r;for(c=d-1;c>=0;--c)n[c]=0;n[d]=m,n.t=this.t+d+1,n.s=this.s,n.clamp()}function Jp(i,n){n.s=this.s;var r=Math.floor(i/this.DB);if(r>=this.t){n.t=0;return}var s=i%this.DB,l=this.DB-s,d=(1<<s)-1;n[0]=this[r]>>s;for(var m=r+1;m<this.t;++m)n[m-r-1]|=(this[m]&d)<<l,n[m-r]=this[m]>>s;s>0&&(n[this.t-r-1]|=(this.s&d)<<l),n.t=this.t-r,n.clamp()}function Xp(i,n){for(var r=0,s=0,l=Math.min(i.t,this.t);r<l;)s+=this[r]-i[r],n[r++]=s&this.DM,s>>=this.DB;if(i.t<this.t){for(s-=i.s;r<this.t;)s+=this[r],n[r++]=s&this.DM,s>>=this.DB;s+=this.s}else{for(s+=this.s;r<i.t;)s-=i[r],n[r++]=s&this.DM,s>>=this.DB;s-=i.s}n.s=s<0?-1:0,s<-1?n[r++]=this.DV+s:s>0&&(n[r++]=s),n.t=r,n.clamp()}function eg(i,n){var r=this.abs(),s=i.abs(),l=r.t;for(n.t=l+s.t;--l>=0;)n[l]=0;for(l=0;l<s.t;++l)n[l+r.t]=r.am(0,s[l],n,l,0,r.t);n.s=0,n.clamp(),this.s!=i.s&&Ye.ZERO.subTo(n,n)}function tg(i){for(var n=this.abs(),r=i.t=2*n.t;--r>=0;)i[r]=0;for(r=0;r<n.t-1;++r){var s=n.am(r,n[r],i,2*r,0,1);(i[r+n.t]+=n.am(r+1,2*n[r],i,2*r+1,s,n.t-r-1))>=n.DV&&(i[r+n.t]-=n.DV,i[r+n.t+1]=1)}i.t>0&&(i[i.t-1]+=n.am(r,n[r],i,2*r,0,1)),i.s=0,i.clamp()}function ng(i,n,r){var s=i.abs();if(!(s.t<=0)){var l=this.abs();if(l.t<s.t){n!=null&&n.fromInt(0),r!=null&&this.copyTo(r);return}r==null&&(r=$t());var d=$t(),m=this.s,c=i.s,x=this.DB-da(s[s.t-1]);x>0?(s.lShiftTo(x,d),l.lShiftTo(x,r)):(s.copyTo(d),l.copyTo(r));var C=d.t,O=d[C-1];if(O!=0){var R=O*(1<<this.F1)+(C>1?d[C-2]>>this.F2:0),N=this.FV/R,E=(1<<this.F1)/R,I=1<<this.F2,$=r.t,j=$-C,X=n??$t();for(d.dlShiftTo(j,X),r.compareTo(X)>=0&&(r[r.t++]=1,r.subTo(X,r)),Ye.ONE.dlShiftTo(C,X),X.subTo(d,d);d.t<C;)d[d.t++]=0;for(;--j>=0;){var te=r[--$]==O?this.DM:Math.floor(r[$]*N+(r[$-1]+I)*E);if((r[$]+=d.am(0,te,r,j,0,C))<te)for(d.dlShiftTo(j,X),r.subTo(X,r);r[$]<--te;)r.subTo(X,r)}n!=null&&(r.drShiftTo(C,n),m!=c&&Ye.ZERO.subTo(n,n)),r.t=C,r.clamp(),x>0&&r.rShiftTo(x,r),m<0&&Ye.ZERO.subTo(r,r)}}}function rg(i){var n=$t();return this.abs().divRemTo(i,null,n),this.s<0&&n.compareTo(Ye.ZERO)>0&&i.subTo(n,n),n}function ig(){if(this.t<1)return 0;var i=this[0];if((i&1)==0)return 0;var n=i&3;return n=n*(2-(i&15)*n)&15,n=n*(2-(i&255)*n)&255,n=n*(2-((i&65535)*n&65535))&65535,n=n*(2-i*n%this.DV)%this.DV,n>0?this.DV-n:-n}function og(i){return this.compareTo(i)==0}function sg(i,n){for(var r=0,s=0,l=Math.min(i.t,this.t);r<l;)s+=this[r]+i[r],n[r++]=s&this.DM,s>>=this.DB;if(i.t<this.t){for(s+=i.s;r<this.t;)s+=this[r],n[r++]=s&this.DM,s>>=this.DB;s+=this.s}else{for(s+=this.s;r<i.t;)s+=i[r],n[r++]=s&this.DM,s>>=this.DB;s+=i.s}n.s=s<0?-1:0,s>0?n[r++]=s:s<-1&&(n[r++]=this.DV+s),n.t=r,n.clamp()}function ag(i){var n=$t();return this.addTo(i,n),n}function ug(i){var n=$t();return this.subTo(i,n),n}function lg(i){var n=$t();return this.multiplyTo(i,n),n}function cg(i){var n=$t();return this.divRemTo(i,n,null),n}function ei(i){this.m=i,this.mp=i.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<i.DB-15)-1,this.mt2=2*i.t}function fg(i){var n=$t();return i.abs().dlShiftTo(this.m.t,n),n.divRemTo(this.m,null,n),i.s<0&&n.compareTo(Ye.ZERO)>0&&this.m.subTo(n,n),n}function hg(i){var n=$t();return i.copyTo(n),this.reduce(n),n}function dg(i){for(;i.t<=this.mt2;)i[i.t++]=0;for(var n=0;n<this.m.t;++n){var r=i[n]&32767,s=r*this.mpl+((r*this.mph+(i[n]>>15)*this.mpl&this.um)<<15)&i.DM;for(r=n+this.m.t,i[r]+=this.m.am(0,s,i,n,0,this.m.t);i[r]>=i.DV;)i[r]-=i.DV,i[++r]++}i.clamp(),i.drShiftTo(this.m.t,i),i.compareTo(this.m)>=0&&i.subTo(this.m,i)}function pg(i,n){i.squareTo(n),this.reduce(n)}function gg(i,n,r){i.multiplyTo(n,r),this.reduce(r)}ei.prototype.convert=fg,ei.prototype.revert=hg,ei.prototype.reduce=dg,ei.prototype.mulTo=gg,ei.prototype.sqrTo=pg;function mg(i,n,r){var s=i.bitLength(),l,d=ha(1),m=new ei(n);if(s<=0)return d;s<18?l=1:s<48?l=3:s<144?l=4:s<768?l=5:l=6;var c=new Array,x=3,C=l-1,O=(1<<l)-1;if(c[1]=m.convert(this),l>1){var R=$t();for(m.sqrTo(c[1],R);x<=O;)c[x]=$t(),m.mulTo(R,c[x-2],c[x]),x+=2}var N=i.t-1,E,I=!0,$=$t(),j;for(s=da(i[N])-1;N>=0;){for(s>=C?E=i[N]>>s-C&O:(E=(i[N]&(1<<s+1)-1)<<C-s,N>0&&(E|=i[N-1]>>this.DB+s-C)),x=l;(E&1)==0;)E>>=1,--x;if((s-=x)<0&&(s+=this.DB,--N),I)c[E].copyTo(d),I=!1;else{for(;x>1;)m.sqrTo(d,$),m.sqrTo($,d),x-=2;x>0?m.sqrTo(d,$):(j=d,d=$,$=j),m.mulTo($,c[E],d)}for(;N>=0&&(i[N]&1<<s)==0;)m.sqrTo(d,$),j=d,d=$,$=j,--s<0&&(s=this.DB-1,--N)}var X=m.revert(d);return r(null,X),X}Ye.prototype.copyTo=Yp,Ye.prototype.fromInt=Up,Ye.prototype.fromString=Fp,Ye.prototype.clamp=Wp,Ye.prototype.dlShiftTo=Zp,Ye.prototype.drShiftTo=Kp,Ye.prototype.lShiftTo=Qp,Ye.prototype.rShiftTo=Jp,Ye.prototype.subTo=Xp,Ye.prototype.multiplyTo=eg,Ye.prototype.squareTo=tg,Ye.prototype.divRemTo=ng,Ye.prototype.invDigit=ig,Ye.prototype.addTo=sg,Ye.prototype.toString=zp,Ye.prototype.negate=qp,Ye.prototype.abs=Hp,Ye.prototype.compareTo=Gp,Ye.prototype.bitLength=Vp,Ye.prototype.mod=rg,Ye.prototype.equals=og,Ye.prototype.add=ag,Ye.prototype.subtract=ug,Ye.prototype.multiply=lg,Ye.prototype.divide=cg,Ye.prototype.modPow=mg,Ye.ZERO=ha(0),Ye.ONE=ha(1);function vg(i,n){return n=n||{},new Promise(function(r,s){var l=new XMLHttpRequest,d=[],m=[],c={},x=function(){return{ok:(l.status/100|0)==2,statusText:l.statusText,status:l.status,url:l.responseURL,text:function(){return Promise.resolve(l.responseText)},json:function(){return Promise.resolve(l.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([l.response]))},clone:x,headers:{keys:function(){return d},entries:function(){return m},get:function(O){return c[O.toLowerCase()]},has:function(O){return O.toLowerCase()in c}}}};for(var C in l.open(n.method||"get",i,!0),l.onload=function(){l.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(O,R,N){d.push(R=R.toLowerCase()),m.push([R,N]),c[R]=c[R]?c[R]+","+N:N}),r(x())},l.onerror=s,l.withCredentials=n.credentials=="include",n.headers)l.setRequestHeader(C,n.headers[C]);l.send(n.body||null)})}const yg=Object.freeze(Object.defineProperty({__proto__:null,default:vg},Symbol.toStringTag,{value:"Module"})),tc=na(yg);var nc,rc;function _g(){return rc||(rc=1,nc=self.fetch||(self.fetch=tc.default||tc)),nc}_g();/*!
104
+ ***************************************************************************** */var ua=function(i,n){return ua=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var l in s)s.hasOwnProperty(l)&&(r[l]=s[l])},ua(i,n)};function Jd(i,n){ua(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}var la=function(){return la=Object.assign||function(i){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(i[l]=n[l])}return i},la.apply(this,arguments)};function Xd(i,n){var r={};for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&n.indexOf(s)<0&&(r[s]=i[s]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,s=Object.getOwnPropertySymbols(i);l<s.length;l++)n.indexOf(s[l])<0&&Object.prototype.propertyIsEnumerable.call(i,s[l])&&(r[s[l]]=i[s[l]]);return r}function ep(i,n,r,s){var l=arguments.length,d=l<3?n:s===null?s=Object.getOwnPropertyDescriptor(n,r):s,m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(i,n,r,s);else for(var c=i.length-1;c>=0;c--)(m=i[c])&&(d=(l<3?m(d):l>3?m(n,r,d):m(n,r))||d);return l>3&&d&&Object.defineProperty(n,r,d),d}function tp(i,n){return function(r,s){n(r,s,i)}}function np(i,n){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,n)}function rp(i,n,r,s){function l(d){return d instanceof r?d:new r(function(m){m(d)})}return new(r||(r=Promise))(function(d,m){function c(O){try{C(s.next(O))}catch(E){m(E)}}function x(O){try{C(s.throw(O))}catch(E){m(E)}}function C(O){O.done?d(O.value):l(O.value).then(c,x)}C((s=s.apply(i,n||[])).next())})}function ip(i,n){var r={label:0,sent:function(){if(d[0]&1)throw d[1];return d[1]},trys:[],ops:[]},s,l,d,m;return m={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(m[Symbol.iterator]=function(){return this}),m;function c(C){return function(O){return x([C,O])}}function x(C){if(s)throw new TypeError("Generator is already executing.");for(;r;)try{if(s=1,l&&(d=C[0]&2?l.return:C[0]?l.throw||((d=l.return)&&d.call(l),0):l.next)&&!(d=d.call(l,C[1])).done)return d;switch(l=0,d&&(C=[C[0]&2,d.value]),C[0]){case 0:case 1:d=C;break;case 4:return r.label++,{value:C[1],done:!1};case 5:r.label++,l=C[1],C=[0];continue;case 7:C=r.ops.pop(),r.trys.pop();continue;default:if(d=r.trys,!(d=d.length>0&&d[d.length-1])&&(C[0]===6||C[0]===2)){r=0;continue}if(C[0]===3&&(!d||C[1]>d[0]&&C[1]<d[3])){r.label=C[1];break}if(C[0]===6&&r.label<d[1]){r.label=d[1],d=C;break}if(d&&r.label<d[2]){r.label=d[2],r.ops.push(C);break}d[2]&&r.ops.pop(),r.trys.pop();continue}C=n.call(i,r)}catch(O){C=[6,O],l=0}finally{s=d=0}if(C[0]&5)throw C[1];return{value:C[0]?C[1]:void 0,done:!0}}}function op(i,n,r,s){s===void 0&&(s=r),i[s]=n[r]}function sp(i,n){for(var r in i)r!=="default"&&!n.hasOwnProperty(r)&&(n[r]=i[r])}function ca(i){var n=typeof Symbol=="function"&&Symbol.iterator,r=n&&i[n],s=0;if(r)return r.call(i);if(i&&typeof i.length=="number")return{next:function(){return i&&s>=i.length&&(i=void 0),{value:i&&i[s++],done:!i}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function Yl(i,n){var r=typeof Symbol=="function"&&i[Symbol.iterator];if(!r)return i;var s=r.call(i),l,d=[],m;try{for(;(n===void 0||n-- >0)&&!(l=s.next()).done;)d.push(l.value)}catch(c){m={error:c}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(m)throw m.error}}return d}function ap(){for(var i=[],n=0;n<arguments.length;n++)i=i.concat(Yl(arguments[n]));return i}function up(){for(var i=0,n=0,r=arguments.length;n<r;n++)i+=arguments[n].length;for(var s=Array(i),l=0,n=0;n<r;n++)for(var d=arguments[n],m=0,c=d.length;m<c;m++,l++)s[l]=d[m];return s}function $i(i){return this instanceof $i?(this.v=i,this):new $i(i)}function lp(i,n,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s=r.apply(i,n||[]),l,d=[];return l={},m("next"),m("throw"),m("return"),l[Symbol.asyncIterator]=function(){return this},l;function m(N){s[N]&&(l[N]=function(M){return new Promise(function(I,$){d.push([N,M,I,$])>1||c(N,M)})})}function c(N,M){try{x(s[N](M))}catch(I){E(d[0][3],I)}}function x(N){N.value instanceof $i?Promise.resolve(N.value.v).then(C,O):E(d[0][2],N)}function C(N){c("next",N)}function O(N){c("throw",N)}function E(N,M){N(M),d.shift(),d.length&&c(d[0][0],d[0][1])}}function cp(i){var n,r;return n={},s("next"),s("throw",function(l){throw l}),s("return"),n[Symbol.iterator]=function(){return this},n;function s(l,d){n[l]=i[l]?function(m){return(r=!r)?{value:$i(i[l](m)),done:l==="return"}:d?d(m):m}:d}}function fp(i){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=i[Symbol.asyncIterator],r;return n?n.call(i):(i=typeof ca=="function"?ca(i):i[Symbol.iterator](),r={},s("next"),s("throw"),s("return"),r[Symbol.asyncIterator]=function(){return this},r);function s(d){r[d]=i[d]&&function(m){return new Promise(function(c,x){m=i[d](m),l(c,x,m.done,m.value)})}}function l(d,m,c,x){Promise.resolve(x).then(function(C){d({value:C,done:c})},m)}}function hp(i,n){return Object.defineProperty?Object.defineProperty(i,"raw",{value:n}):i.raw=n,i}function dp(i){if(i&&i.__esModule)return i;var n={};if(i!=null)for(var r in i)Object.hasOwnProperty.call(i,r)&&(n[r]=i[r]);return n.default=i,n}function pp(i){return i&&i.__esModule?i:{default:i}}function gp(i,n){if(!n.has(i))throw new TypeError("attempted to get private field on non-instance");return n.get(i)}function mp(i,n,r){if(!n.has(i))throw new TypeError("attempted to set private field on non-instance");return n.set(i,r),r}const vp=Object.freeze(Object.defineProperty({__proto__:null,get __assign(){return la},__asyncDelegator:cp,__asyncGenerator:lp,__asyncValues:fp,__await:$i,__awaiter:rp,__classPrivateFieldGet:gp,__classPrivateFieldSet:mp,__createBinding:op,__decorate:ep,__exportStar:sp,__extends:Jd,__generator:ip,__importDefault:pp,__importStar:dp,__makeTemplateObject:hp,__metadata:np,__param:tp,__read:Yl,__rest:Xd,__spread:ap,__spreadArrays:up,__values:ca},Symbol.toStringTag,{value:"Module"})),Ul=na(vp);var Bi={},un={},Fl;function Wl(){return Fl||(Fl=1,Object.defineProperty(un,"__esModule",{value:!0}),un.MAX_HASHABLE_LENGTH=un.INIT=un.KEY=un.DIGEST_LENGTH=un.BLOCK_SIZE=void 0,un.BLOCK_SIZE=64,un.DIGEST_LENGTH=32,un.KEY=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),un.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],un.MAX_HASHABLE_LENGTH=Math.pow(2,53)-1),un}var ji={},zl;function yp(){if(zl)return ji;zl=1,Object.defineProperty(ji,"__esModule",{value:!0}),ji.RawSha256=void 0;var i=Wl(),n=function(){function r(){this.state=Int32Array.from(i.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return r.prototype.update=function(s){if(this.finished)throw new Error("Attempted to update an already finished hash.");var l=0,d=s.byteLength;if(this.bytesHashed+=d,this.bytesHashed*8>i.MAX_HASHABLE_LENGTH)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;d>0;)this.buffer[this.bufferLength++]=s[l++],d--,this.bufferLength===i.BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)},r.prototype.digest=function(){if(!this.finished){var s=this.bytesHashed*8,l=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),d=this.bufferLength;if(l.setUint8(this.bufferLength++,128),d%i.BLOCK_SIZE>=i.BLOCK_SIZE-8){for(var m=this.bufferLength;m<i.BLOCK_SIZE;m++)l.setUint8(m,0);this.hashBuffer(),this.bufferLength=0}for(var m=this.bufferLength;m<i.BLOCK_SIZE-8;m++)l.setUint8(m,0);l.setUint32(i.BLOCK_SIZE-8,Math.floor(s/4294967296),!0),l.setUint32(i.BLOCK_SIZE-4,s),this.hashBuffer(),this.finished=!0}for(var c=new Uint8Array(i.DIGEST_LENGTH),m=0;m<8;m++)c[m*4]=this.state[m]>>>24&255,c[m*4+1]=this.state[m]>>>16&255,c[m*4+2]=this.state[m]>>>8&255,c[m*4+3]=this.state[m]>>>0&255;return c},r.prototype.hashBuffer=function(){for(var s=this,l=s.buffer,d=s.state,m=d[0],c=d[1],x=d[2],C=d[3],O=d[4],E=d[5],N=d[6],M=d[7],I=0;I<i.BLOCK_SIZE;I++){if(I<16)this.temp[I]=(l[I*4]&255)<<24|(l[I*4+1]&255)<<16|(l[I*4+2]&255)<<8|l[I*4+3]&255;else{var $=this.temp[I-2],j=($>>>17|$<<15)^($>>>19|$<<13)^$>>>10;$=this.temp[I-15];var J=($>>>7|$<<25)^($>>>18|$<<14)^$>>>3;this.temp[I]=(j+this.temp[I-7]|0)+(J+this.temp[I-16]|0)}var te=(((O>>>6|O<<26)^(O>>>11|O<<21)^(O>>>25|O<<7))+(O&E^~O&N)|0)+(M+(i.KEY[I]+this.temp[I]|0)|0)|0,ne=((m>>>2|m<<30)^(m>>>13|m<<19)^(m>>>22|m<<10))+(m&c^m&x^c&x)|0;M=N,N=E,E=O,O=C+te|0,C=x,x=c,c=m,m=te+ne|0}d[0]+=m,d[1]+=c,d[2]+=x,d[3]+=C,d[4]+=O,d[5]+=E,d[6]+=N,d[7]+=M},r}();return ji.RawSha256=n,ji}var ql={},Yi={};const _p=i=>{const n=[];for(let r=0,s=i.length;r<s;r++){const l=i.charCodeAt(r);if(l<128)n.push(l);else if(l<2048)n.push(l>>6|192,l&63|128);else if(r+1<i.length&&(l&64512)===55296&&(i.charCodeAt(r+1)&64512)===56320){const d=65536+((l&1023)<<10)+(i.charCodeAt(++r)&1023);n.push(d>>18|240,d>>12&63|128,d>>6&63|128,d&63|128)}else n.push(l>>12|224,l>>6&63|128,l&63|128)}return Uint8Array.from(n)},wp=i=>{let n="";for(let r=0,s=i.length;r<s;r++){const l=i[r];if(l<128)n+=String.fromCharCode(l);else if(192<=l&&l<224){const d=i[++r];n+=String.fromCharCode((l&31)<<6|d&63)}else if(240<=l&&l<365){const d="%"+[l,i[++r],i[++r],i[++r]].map(m=>m.toString(16)).join("%");n+=decodeURIComponent(d)}else n+=String.fromCharCode((l&15)<<12|(i[++r]&63)<<6|i[++r]&63)}return n};function bp(i){return new TextEncoder().encode(i)}function xp(i){return new TextDecoder("utf-8").decode(i)}const Sp=i=>typeof TextEncoder=="function"?bp(i):_p(i),Cp=i=>typeof TextDecoder=="function"?xp(i):wp(i),Ap=Object.freeze(Object.defineProperty({__proto__:null,fromUtf8:Sp,toUtf8:Cp},Symbol.toStringTag,{value:"Module"})),Dp=na(Ap);var Hl;function Op(){if(Hl)return Yi;Hl=1,Object.defineProperty(Yi,"__esModule",{value:!0}),Yi.convertToBuffer=void 0;var i=Dp,n=typeof Buffer<"u"&&Buffer.from?function(s){return Buffer.from(s,"utf8")}:i.fromUtf8;function r(s){return s instanceof Uint8Array?s:typeof s=="string"?n(s):ArrayBuffer.isView(s)?new Uint8Array(s.buffer,s.byteOffset,s.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(s)}return Yi.convertToBuffer=r,Yi}var Ui={},Gl;function Tp(){if(Gl)return Ui;Gl=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.isEmptyData=void 0;function i(n){return typeof n=="string"?n.length===0:n.byteLength===0}return Ui.isEmptyData=i,Ui}var Fi={},Vl;function Mp(){if(Vl)return Fi;Vl=1,Object.defineProperty(Fi,"__esModule",{value:!0}),Fi.numToUint8=void 0;function i(n){return new Uint8Array([(n&4278190080)>>24,(n&16711680)>>16,(n&65280)>>8,n&255])}return Fi.numToUint8=i,Fi}var Wi={},Zl;function Ep(){if(Zl)return Wi;Zl=1,Object.defineProperty(Wi,"__esModule",{value:!0}),Wi.uint32ArrayFrom=void 0;function i(n){if(!Array.from){for(var r=new Uint32Array(n.length),s=0;s<n.length;)r[s]=n[s];return r}return Uint32Array.from(n)}return Wi.uint32ArrayFrom=i,Wi}var Kl;function Rp(){return Kl||(Kl=1,function(i){Object.defineProperty(i,"__esModule",{value:!0}),i.uint32ArrayFrom=i.numToUint8=i.isEmptyData=i.convertToBuffer=void 0;var n=Op();Object.defineProperty(i,"convertToBuffer",{enumerable:!0,get:function(){return n.convertToBuffer}});var r=Tp();Object.defineProperty(i,"isEmptyData",{enumerable:!0,get:function(){return r.isEmptyData}});var s=Mp();Object.defineProperty(i,"numToUint8",{enumerable:!0,get:function(){return s.numToUint8}});var l=Ep();Object.defineProperty(i,"uint32ArrayFrom",{enumerable:!0,get:function(){return l.uint32ArrayFrom}})}(ql)),ql}var Ql;function Lp(){if(Ql)return Bi;Ql=1,Object.defineProperty(Bi,"__esModule",{value:!0}),Bi.Sha256=void 0;var i=Ul,n=Wl(),r=yp(),s=Rp(),l=function(){function m(c){if(this.hash=new r.RawSha256,c){this.outer=new r.RawSha256;var x=d(c),C=new Uint8Array(n.BLOCK_SIZE);C.set(x);for(var O=0;O<n.BLOCK_SIZE;O++)x[O]^=54,C[O]^=92;this.hash.update(x),this.outer.update(C);for(var O=0;O<x.byteLength;O++)x[O]=0}}return m.prototype.update=function(c){if(!((0,s.isEmptyData)(c)||this.error))try{this.hash.update((0,s.convertToBuffer)(c))}catch(x){this.error=x}},m.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},m.prototype.digest=function(){return(0,i.__awaiter)(this,void 0,void 0,function(){return(0,i.__generator)(this,function(c){return[2,this.digestSync()]})})},m}();Bi.Sha256=l;function d(m){var c=(0,s.convertToBuffer)(m);if(c.byteLength>n.BLOCK_SIZE){var x=new r.RawSha256;x.update(c),c=x.digest()}var C=new Uint8Array(n.BLOCK_SIZE);return C.set(c),C}return Bi}var Jl;function kp(){return Jl||(Jl=1,function(i){Object.defineProperty(i,"__esModule",{value:!0});var n=Ul;(0,n.__exportStar)(Lp(),i)}(jl)),jl}kp();function Ye(i,n){i!=null&&this.fromString(i,n)}function $t(){return new Ye(null)}var er,Ip=0xdeadbeefcafe,Xl=(Ip&16777215)==15715070;function Pp(i,n,r,s,l,d){for(;--d>=0;){var m=n*this[i++]+r[s]+l;l=Math.floor(m/67108864),r[s++]=m&67108863}return l}function Np(i,n,r,s,l,d){for(var m=n&32767,c=n>>15;--d>=0;){var x=this[i]&32767,C=this[i++]>>15,O=c*x+C*m;x=m*x+((O&32767)<<15)+r[s]+(l&1073741823),l=(x>>>30)+(O>>>15)+c*C+(l>>>30),r[s++]=x&1073741823}return l}function $p(i,n,r,s,l,d){for(var m=n&16383,c=n>>14;--d>=0;){var x=this[i]&16383,C=this[i++]>>14,O=c*x+C*m;x=m*x+((O&16383)<<14)+r[s]+l,l=(x>>28)+(O>>14)+c*C,r[s++]=x&268435455}return l}var ec=typeof navigator<"u";ec&&Xl&&navigator.appName=="Microsoft Internet Explorer"?(Ye.prototype.am=Np,er=30):ec&&Xl&&navigator.appName!="Netscape"?(Ye.prototype.am=Pp,er=26):(Ye.prototype.am=$p,er=28),Ye.prototype.DB=er,Ye.prototype.DM=(1<<er)-1,Ye.prototype.DV=1<<er;var fa=52;Ye.prototype.FV=Math.pow(2,fa),Ye.prototype.F1=fa-er,Ye.prototype.F2=2*er-fa;var Bp="0123456789abcdefghijklmnopqrstuvwxyz",Eo=new Array,Xr,ln;for(Xr=48,ln=0;ln<=9;++ln)Eo[Xr++]=ln;for(Xr=97,ln=10;ln<36;++ln)Eo[Xr++]=ln;for(Xr=65,ln=10;ln<36;++ln)Eo[Xr++]=ln;function tc(i){return Bp.charAt(i)}function jp(i,n){var r=Eo[i.charCodeAt(n)];return r??-1}function Yp(i){for(var n=this.t-1;n>=0;--n)i[n]=this[n];i.t=this.t,i.s=this.s}function Up(i){this.t=1,this.s=i<0?-1:0,i>0?this[0]=i:i<-1?this[0]=i+this.DV:this.t=0}function ha(i){var n=$t();return n.fromInt(i),n}function Fp(i,n){var r;if(n==16)r=4;else if(n==8)r=3;else if(n==2)r=1;else if(n==32)r=5;else if(n==4)r=2;else throw new Error("Only radix 2, 4, 8, 16, 32 are supported");this.t=0,this.s=0;for(var s=i.length,l=!1,d=0;--s>=0;){var m=jp(i,s);if(m<0){i.charAt(s)=="-"&&(l=!0);continue}l=!1,d==0?this[this.t++]=m:d+r>this.DB?(this[this.t-1]|=(m&(1<<this.DB-d)-1)<<d,this[this.t++]=m>>this.DB-d):this[this.t-1]|=m<<d,d+=r,d>=this.DB&&(d-=this.DB)}this.clamp(),l&&Ye.ZERO.subTo(this,this)}function Wp(){for(var i=this.s&this.DM;this.t>0&&this[this.t-1]==i;)--this.t}function zp(i){if(this.s<0)return"-"+this.negate().toString(i);var n;if(i==16)n=4;else if(i==8)n=3;else if(i==2)n=1;else if(i==32)n=5;else if(i==4)n=2;else throw new Error("Only radix 2, 4, 8, 16, 32 are supported");var r=(1<<n)-1,s,l=!1,d="",m=this.t,c=this.DB-m*this.DB%n;if(m-- >0)for(c<this.DB&&(s=this[m]>>c)>0&&(l=!0,d=tc(s));m>=0;)c<n?(s=(this[m]&(1<<c)-1)<<n-c,s|=this[--m]>>(c+=this.DB-n)):(s=this[m]>>(c-=n)&r,c<=0&&(c+=this.DB,--m)),s>0&&(l=!0),l&&(d+=tc(s));return l?d:"0"}function qp(){var i=$t();return Ye.ZERO.subTo(this,i),i}function Hp(){return this.s<0?this.negate():this}function Gp(i){var n=this.s-i.s;if(n!=0)return n;var r=this.t;if(n=r-i.t,n!=0)return this.s<0?-n:n;for(;--r>=0;)if((n=this[r]-i[r])!=0)return n;return 0}function da(i){var n=1,r;return(r=i>>>16)!=0&&(i=r,n+=16),(r=i>>8)!=0&&(i=r,n+=8),(r=i>>4)!=0&&(i=r,n+=4),(r=i>>2)!=0&&(i=r,n+=2),(r=i>>1)!=0&&(i=r,n+=1),n}function Vp(){return this.t<=0?0:this.DB*(this.t-1)+da(this[this.t-1]^this.s&this.DM)}function Zp(i,n){var r;for(r=this.t-1;r>=0;--r)n[r+i]=this[r];for(r=i-1;r>=0;--r)n[r]=0;n.t=this.t+i,n.s=this.s}function Kp(i,n){for(var r=i;r<this.t;++r)n[r-i]=this[r];n.t=Math.max(this.t-i,0),n.s=this.s}function Qp(i,n){var r=i%this.DB,s=this.DB-r,l=(1<<s)-1,d=Math.floor(i/this.DB),m=this.s<<r&this.DM,c;for(c=this.t-1;c>=0;--c)n[c+d+1]=this[c]>>s|m,m=(this[c]&l)<<r;for(c=d-1;c>=0;--c)n[c]=0;n[d]=m,n.t=this.t+d+1,n.s=this.s,n.clamp()}function Jp(i,n){n.s=this.s;var r=Math.floor(i/this.DB);if(r>=this.t){n.t=0;return}var s=i%this.DB,l=this.DB-s,d=(1<<s)-1;n[0]=this[r]>>s;for(var m=r+1;m<this.t;++m)n[m-r-1]|=(this[m]&d)<<l,n[m-r]=this[m]>>s;s>0&&(n[this.t-r-1]|=(this.s&d)<<l),n.t=this.t-r,n.clamp()}function Xp(i,n){for(var r=0,s=0,l=Math.min(i.t,this.t);r<l;)s+=this[r]-i[r],n[r++]=s&this.DM,s>>=this.DB;if(i.t<this.t){for(s-=i.s;r<this.t;)s+=this[r],n[r++]=s&this.DM,s>>=this.DB;s+=this.s}else{for(s+=this.s;r<i.t;)s-=i[r],n[r++]=s&this.DM,s>>=this.DB;s-=i.s}n.s=s<0?-1:0,s<-1?n[r++]=this.DV+s:s>0&&(n[r++]=s),n.t=r,n.clamp()}function eg(i,n){var r=this.abs(),s=i.abs(),l=r.t;for(n.t=l+s.t;--l>=0;)n[l]=0;for(l=0;l<s.t;++l)n[l+r.t]=r.am(0,s[l],n,l,0,r.t);n.s=0,n.clamp(),this.s!=i.s&&Ye.ZERO.subTo(n,n)}function tg(i){for(var n=this.abs(),r=i.t=2*n.t;--r>=0;)i[r]=0;for(r=0;r<n.t-1;++r){var s=n.am(r,n[r],i,2*r,0,1);(i[r+n.t]+=n.am(r+1,2*n[r],i,2*r+1,s,n.t-r-1))>=n.DV&&(i[r+n.t]-=n.DV,i[r+n.t+1]=1)}i.t>0&&(i[i.t-1]+=n.am(r,n[r],i,2*r,0,1)),i.s=0,i.clamp()}function ng(i,n,r){var s=i.abs();if(!(s.t<=0)){var l=this.abs();if(l.t<s.t){n!=null&&n.fromInt(0),r!=null&&this.copyTo(r);return}r==null&&(r=$t());var d=$t(),m=this.s,c=i.s,x=this.DB-da(s[s.t-1]);x>0?(s.lShiftTo(x,d),l.lShiftTo(x,r)):(s.copyTo(d),l.copyTo(r));var C=d.t,O=d[C-1];if(O!=0){var E=O*(1<<this.F1)+(C>1?d[C-2]>>this.F2:0),N=this.FV/E,M=(1<<this.F1)/E,I=1<<this.F2,$=r.t,j=$-C,J=n??$t();for(d.dlShiftTo(j,J),r.compareTo(J)>=0&&(r[r.t++]=1,r.subTo(J,r)),Ye.ONE.dlShiftTo(C,J),J.subTo(d,d);d.t<C;)d[d.t++]=0;for(;--j>=0;){var te=r[--$]==O?this.DM:Math.floor(r[$]*N+(r[$-1]+I)*M);if((r[$]+=d.am(0,te,r,j,0,C))<te)for(d.dlShiftTo(j,J),r.subTo(J,r);r[$]<--te;)r.subTo(J,r)}n!=null&&(r.drShiftTo(C,n),m!=c&&Ye.ZERO.subTo(n,n)),r.t=C,r.clamp(),x>0&&r.rShiftTo(x,r),m<0&&Ye.ZERO.subTo(r,r)}}}function rg(i){var n=$t();return this.abs().divRemTo(i,null,n),this.s<0&&n.compareTo(Ye.ZERO)>0&&i.subTo(n,n),n}function ig(){if(this.t<1)return 0;var i=this[0];if((i&1)==0)return 0;var n=i&3;return n=n*(2-(i&15)*n)&15,n=n*(2-(i&255)*n)&255,n=n*(2-((i&65535)*n&65535))&65535,n=n*(2-i*n%this.DV)%this.DV,n>0?this.DV-n:-n}function og(i){return this.compareTo(i)==0}function sg(i,n){for(var r=0,s=0,l=Math.min(i.t,this.t);r<l;)s+=this[r]+i[r],n[r++]=s&this.DM,s>>=this.DB;if(i.t<this.t){for(s+=i.s;r<this.t;)s+=this[r],n[r++]=s&this.DM,s>>=this.DB;s+=this.s}else{for(s+=this.s;r<i.t;)s+=i[r],n[r++]=s&this.DM,s>>=this.DB;s+=i.s}n.s=s<0?-1:0,s>0?n[r++]=s:s<-1&&(n[r++]=this.DV+s),n.t=r,n.clamp()}function ag(i){var n=$t();return this.addTo(i,n),n}function ug(i){var n=$t();return this.subTo(i,n),n}function lg(i){var n=$t();return this.multiplyTo(i,n),n}function cg(i){var n=$t();return this.divRemTo(i,n,null),n}function ei(i){this.m=i,this.mp=i.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<i.DB-15)-1,this.mt2=2*i.t}function fg(i){var n=$t();return i.abs().dlShiftTo(this.m.t,n),n.divRemTo(this.m,null,n),i.s<0&&n.compareTo(Ye.ZERO)>0&&this.m.subTo(n,n),n}function hg(i){var n=$t();return i.copyTo(n),this.reduce(n),n}function dg(i){for(;i.t<=this.mt2;)i[i.t++]=0;for(var n=0;n<this.m.t;++n){var r=i[n]&32767,s=r*this.mpl+((r*this.mph+(i[n]>>15)*this.mpl&this.um)<<15)&i.DM;for(r=n+this.m.t,i[r]+=this.m.am(0,s,i,n,0,this.m.t);i[r]>=i.DV;)i[r]-=i.DV,i[++r]++}i.clamp(),i.drShiftTo(this.m.t,i),i.compareTo(this.m)>=0&&i.subTo(this.m,i)}function pg(i,n){i.squareTo(n),this.reduce(n)}function gg(i,n,r){i.multiplyTo(n,r),this.reduce(r)}ei.prototype.convert=fg,ei.prototype.revert=hg,ei.prototype.reduce=dg,ei.prototype.mulTo=gg,ei.prototype.sqrTo=pg;function mg(i,n,r){var s=i.bitLength(),l,d=ha(1),m=new ei(n);if(s<=0)return d;s<18?l=1:s<48?l=3:s<144?l=4:s<768?l=5:l=6;var c=new Array,x=3,C=l-1,O=(1<<l)-1;if(c[1]=m.convert(this),l>1){var E=$t();for(m.sqrTo(c[1],E);x<=O;)c[x]=$t(),m.mulTo(E,c[x-2],c[x]),x+=2}var N=i.t-1,M,I=!0,$=$t(),j;for(s=da(i[N])-1;N>=0;){for(s>=C?M=i[N]>>s-C&O:(M=(i[N]&(1<<s+1)-1)<<C-s,N>0&&(M|=i[N-1]>>this.DB+s-C)),x=l;(M&1)==0;)M>>=1,--x;if((s-=x)<0&&(s+=this.DB,--N),I)c[M].copyTo(d),I=!1;else{for(;x>1;)m.sqrTo(d,$),m.sqrTo($,d),x-=2;x>0?m.sqrTo(d,$):(j=d,d=$,$=j),m.mulTo($,c[M],d)}for(;N>=0&&(i[N]&1<<s)==0;)m.sqrTo(d,$),j=d,d=$,$=j,--s<0&&(s=this.DB-1,--N)}var J=m.revert(d);return r(null,J),J}Ye.prototype.copyTo=Yp,Ye.prototype.fromInt=Up,Ye.prototype.fromString=Fp,Ye.prototype.clamp=Wp,Ye.prototype.dlShiftTo=Zp,Ye.prototype.drShiftTo=Kp,Ye.prototype.lShiftTo=Qp,Ye.prototype.rShiftTo=Jp,Ye.prototype.subTo=Xp,Ye.prototype.multiplyTo=eg,Ye.prototype.squareTo=tg,Ye.prototype.divRemTo=ng,Ye.prototype.invDigit=ig,Ye.prototype.addTo=sg,Ye.prototype.toString=zp,Ye.prototype.negate=qp,Ye.prototype.abs=Hp,Ye.prototype.compareTo=Gp,Ye.prototype.bitLength=Vp,Ye.prototype.mod=rg,Ye.prototype.equals=og,Ye.prototype.add=ag,Ye.prototype.subtract=ug,Ye.prototype.multiply=lg,Ye.prototype.divide=cg,Ye.prototype.modPow=mg,Ye.ZERO=ha(0),Ye.ONE=ha(1);function vg(i,n){return n=n||{},new Promise(function(r,s){var l=new XMLHttpRequest,d=[],m=[],c={},x=function(){return{ok:(l.status/100|0)==2,statusText:l.statusText,status:l.status,url:l.responseURL,text:function(){return Promise.resolve(l.responseText)},json:function(){return Promise.resolve(l.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([l.response]))},clone:x,headers:{keys:function(){return d},entries:function(){return m},get:function(O){return c[O.toLowerCase()]},has:function(O){return O.toLowerCase()in c}}}};for(var C in l.open(n.method||"get",i,!0),l.onload=function(){l.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(O,E,N){d.push(E=E.toLowerCase()),m.push([E,N]),c[E]=c[E]?c[E]+","+N:N}),r(x())},l.onerror=s,l.withCredentials=n.credentials=="include",n.headers)l.setRequestHeader(C,n.headers[C]);l.send(n.body||null)})}const yg=Object.freeze(Object.defineProperty({__proto__:null,default:vg},Symbol.toStringTag,{value:"Module"})),nc=na(yg);var rc,ic;function _g(){return ic||(ic=1,rc=self.fetch||(self.fetch=nc.default||nc)),rc}_g();/*!
105
105
  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
106
106
  * SPDX-License-Identifier: Apache-2.0
107
- */var ic={exports:{}};/*!
107
+ */var oc={exports:{}};/*!
108
108
  * JavaScript Cookie v2.2.1
109
109
  * https://github.com/js-cookie/js-cookie
110
110
  *
111
111
  * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
112
112
  * Released under the MIT license
113
- */var oc;function wg(){return oc||(oc=1,function(i,n){(function(r){var s;if(i.exports=r(),s=!0,!s){var l=window.Cookies,d=window.Cookies=r();d.noConflict=function(){return window.Cookies=l,d}}})(function(){function r(){for(var d=0,m={};d<arguments.length;d++){var c=arguments[d];for(var x in c)m[x]=c[x]}return m}function s(d){return d.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}function l(d){function m(){}function c(C,O,R){if(!(typeof document>"u")){R=r({path:"/"},m.defaults,R),typeof R.expires=="number"&&(R.expires=new Date(new Date*1+R.expires*864e5)),R.expires=R.expires?R.expires.toUTCString():"";try{var N=JSON.stringify(O);/^[\{\[]/.test(N)&&(O=N)}catch{}O=d.write?d.write(O,C):encodeURIComponent(String(O)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),C=encodeURIComponent(String(C)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var E="";for(var I in R)R[I]&&(E+="; "+I,R[I]!==!0&&(E+="="+R[I].split(";")[0]));return document.cookie=C+"="+O+E}}function x(C,O){if(!(typeof document>"u")){for(var R={},N=document.cookie?document.cookie.split("; "):[],E=0;E<N.length;E++){var I=N[E].split("="),$=I.slice(1).join("=");!O&&$.charAt(0)==='"'&&($=$.slice(1,-1));try{var j=s(I[0]);if($=(d.read||d)($,j)||s($),O)try{$=JSON.parse($)}catch{}if(R[j]=$,C===j)break}catch{}}return C?R[C]:R}}return m.set=c,m.get=function(C){return x(C,!1)},m.getJSON=function(C){return x(C,!0)},m.remove=function(C,O){c(C,"",r(O,{expires:-1}))},m.defaults={},m.withConverter=l,m}return l(function(){})})}(ic)),ic.exports}wg();function bg(){if(!window.MantineCognitoUserPool)throw new Error("Cognito Userpool has not been initialized.");return window.MantineCognitoUserPool}function xg(){return bg().getCurrentUser()}function Sg(){return new Promise((i,n)=>{const r=xg();r===null&&n(null),r==null||r.getSession((s,l)=>{if(s!==null||l===null)return n(null);i({session:l,authenticatedUser:r})})})}async function Cg(){const{session:i}=await Sg();return i==null?void 0:i.getIdToken().getJwtToken()}ye.createContext(void 0);var Ag="undefined",Dg="object",Ro="browser",sc="cpu",ac="device",pa="engine",Lo="os",tr="name",ko="type",ga="vendor",bn="version",ma="architecture",va="major",ya="model",Og="console",Tg="mobile",Mg="tablet",Eg="smarttv",Rg="wearable",Lg="embedded",kg=typeof window!==Ag,_a=kg&&window.navigator?window.navigator:void 0;_a&&_a.userAgentData&&_a.userAgentData;var Io=function(i){for(var n={},r=0;r<i.length;r++)n[i[r].toUpperCase()]=i[r];return n},Po=function(i){for(var n in i){var r=i[n];typeof r==Dg&&r.length==2?this[r[0]]=r[1]:this[r]=void 0}return this};(function(){var i={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return Po.call(i.init,[[Ro,[tr,bn,va,ko]],[sc,[ma]],[ac,[ko,ya,ga]],[pa,[tr,bn]],[Lo,[tr,bn]]]),Po.call(i.isIgnore,[[Ro,[bn,va]],[pa,[bn]],[Lo,[bn]]]),Po.call(i.isIgnoreRgx,[[Ro,/ ?browser$/i],[Lo,/ ?os$/i]]),Po.call(i.toString,[[Ro,[tr,bn]],[sc,[ma]],[ac,[ga,ya]],[pa,[tr,bn]],[Lo,[tr,bn]]]),i})(),Io([tr,bn,va,ko]),Io([ma]),Io([ya,ga,ko,Og,Tg,Eg,Mg,Rg,Lg]),Io([tr,bn]);var wa={exports:{}},Ig=wa.exports,uc;function Pg(){return uc||(uc=1,function(i,n){(function(r,s){i.exports=s()})(Ig,()=>(()=>{var r={873:(m,c)=>{var x,C,O=function(){var R=function(Y,L){var A=Y,g=X[L],p=null,w=0,h=null,v=[],D={},z=function(P,q){p=function(F){for(var K=new Array(F),se=0;se<F;se+=1){K[se]=new Array(F);for(var Oe=0;Oe<F;Oe+=1)K[se][Oe]=null}return K}(w=4*A+17),Z(0,0),Z(w-7,0),Z(0,w-7),fe(),ae(),J(P,q),A>=7&&_e(P),h==null&&(h=De(A,g,v)),he(h,q)},Z=function(P,q){for(var F=-1;F<=7;F+=1)if(!(P+F<=-1||w<=P+F))for(var K=-1;K<=7;K+=1)q+K<=-1||w<=q+K||(p[P+F][q+K]=0<=F&&F<=6&&(K==0||K==6)||0<=K&&K<=6&&(F==0||F==6)||2<=F&&F<=4&&2<=K&&K<=4)},ae=function(){for(var P=8;P<w-8;P+=1)p[P][6]==null&&(p[P][6]=P%2==0);for(var q=8;q<w-8;q+=1)p[6][q]==null&&(p[6][q]=q%2==0)},fe=function(){for(var P=te.getPatternPosition(A),q=0;q<P.length;q+=1)for(var F=0;F<P.length;F+=1){var K=P[q],se=P[F];if(p[K][se]==null)for(var Oe=-2;Oe<=2;Oe+=1)for(var u=-2;u<=2;u+=1)p[K+Oe][se+u]=Oe==-2||Oe==2||u==-2||u==2||Oe==0&&u==0}},_e=function(P){for(var q=te.getBCHTypeNumber(A),F=0;F<18;F+=1){var K=!P&&(q>>F&1)==1;p[Math.floor(F/3)][F%3+w-8-3]=K}for(F=0;F<18;F+=1)K=!P&&(q>>F&1)==1,p[F%3+w-8-3][Math.floor(F/3)]=K},J=function(P,q){for(var F=g<<3|q,K=te.getBCHTypeInfo(F),se=0;se<15;se+=1){var Oe=!P&&(K>>se&1)==1;se<6?p[se][8]=Oe:se<8?p[se+1][8]=Oe:p[w-15+se][8]=Oe}for(se=0;se<15;se+=1)Oe=!P&&(K>>se&1)==1,se<8?p[8][w-se-1]=Oe:se<9?p[8][15-se-1+1]=Oe:p[8][15-se-1]=Oe;p[w-8][8]=!P},he=function(P,q){for(var F=-1,K=w-1,se=7,Oe=0,u=te.getMaskFunction(q),f=w-1;f>0;f-=2)for(f==6&&(f-=1);;){for(var _=0;_<2;_+=1)if(p[K][f-_]==null){var M=!1;Oe<P.length&&(M=(P[Oe]>>>se&1)==1),u(K,f-_)&&(M=!M),p[K][f-_]=M,(se-=1)==-1&&(Oe+=1,se=7)}if((K+=F)<0||w<=K){K-=F,F=-F;break}}},De=function(P,q,F){for(var K=V.getRSBlocks(P,q),se=ce(),Oe=0;Oe<F.length;Oe+=1){var u=F[Oe];se.put(u.getMode(),4),se.put(u.getLength(),te.getLengthInBits(u.getMode(),P)),u.write(se)}var f=0;for(Oe=0;Oe<K.length;Oe+=1)f+=K[Oe].dataCount;if(se.getLengthInBits()>8*f)throw"code length overflow. ("+se.getLengthInBits()+">"+8*f+")";for(se.getLengthInBits()+4<=8*f&&se.put(0,4);se.getLengthInBits()%8!=0;)se.putBit(!1);for(;!(se.getLengthInBits()>=8*f||(se.put(236,8),se.getLengthInBits()>=8*f));)se.put(17,8);return function(_,M){for(var W=0,Q=0,xe=0,Me=new Array(M.length),Ie=new Array(M.length),Ce=0;Ce<M.length;Ce+=1){var ke=M[Ce].dataCount,Ne=M[Ce].totalCount-ke;Q=Math.max(Q,ke),xe=Math.max(xe,Ne),Me[Ce]=new Array(ke);for(var Re=0;Re<Me[Ce].length;Re+=1)Me[Ce][Re]=255&_.getBuffer()[Re+W];W+=ke;var Ge=te.getErrorCorrectPolynomial(Ne),Je=ue(Me[Ce],Ge.getLength()-1).mod(Ge);for(Ie[Ce]=new Array(Ge.getLength()-1),Re=0;Re<Ie[Ce].length;Re+=1){var Ve=Re+Je.getLength()-Ie[Ce].length;Ie[Ce][Re]=Ve>=0?Je.getAt(Ve):0}}var xt=0;for(Re=0;Re<M.length;Re+=1)xt+=M[Re].totalCount;var vt=new Array(xt),ut=0;for(Re=0;Re<Q;Re+=1)for(Ce=0;Ce<M.length;Ce+=1)Re<Me[Ce].length&&(vt[ut]=Me[Ce][Re],ut+=1);for(Re=0;Re<xe;Re+=1)for(Ce=0;Ce<M.length;Ce+=1)Re<Ie[Ce].length&&(vt[ut]=Ie[Ce][Re],ut+=1);return vt}(se,K)};D.addData=function(P,q){var F=null;switch(q=q||"Byte"){case"Numeric":F=oe(P);break;case"Alphanumeric":F=ee(P);break;case"Byte":F=de(P);break;case"Kanji":F=pe(P);break;default:throw"mode:"+q}v.push(F),h=null},D.isDark=function(P,q){if(P<0||w<=P||q<0||w<=q)throw P+","+q;return p[P][q]},D.getModuleCount=function(){return w},D.make=function(){if(A<1){for(var P=1;P<40;P++){for(var q=V.getRSBlocks(P,g),F=ce(),K=0;K<v.length;K++){var se=v[K];F.put(se.getMode(),4),F.put(se.getLength(),te.getLengthInBits(se.getMode(),P)),se.write(F)}var Oe=0;for(K=0;K<q.length;K++)Oe+=q[K].dataCount;if(F.getLengthInBits()<=8*Oe)break}A=P}z(!1,function(){for(var u=0,f=0,_=0;_<8;_+=1){z(!0,_);var M=te.getLostPoint(D);(_==0||u>M)&&(u=M,f=_)}return f}())},D.createTableTag=function(P,q){P=P||2;var F="";F+='<table style="',F+=" border-width: 0px; border-style: none;",F+=" border-collapse: collapse;",F+=" padding: 0px; margin: "+(q=q===void 0?4*P:q)+"px;",F+='">',F+="<tbody>";for(var K=0;K<D.getModuleCount();K+=1){F+="<tr>";for(var se=0;se<D.getModuleCount();se+=1)F+='<td style="',F+=" border-width: 0px; border-style: none;",F+=" border-collapse: collapse;",F+=" padding: 0px; margin: 0px;",F+=" width: "+P+"px;",F+=" height: "+P+"px;",F+=" background-color: ",F+=D.isDark(K,se)?"#000000":"#ffffff",F+=";",F+='"/>';F+="</tr>"}return(F+="</tbody>")+"</table>"},D.createSvgTag=function(P,q,F,K){var se={};typeof arguments[0]=="object"&&(P=(se=arguments[0]).cellSize,q=se.margin,F=se.alt,K=se.title),P=P||2,q=q===void 0?4*P:q,(F=typeof F=="string"?{text:F}:F||{}).text=F.text||null,F.id=F.text?F.id||"qrcode-description":null,(K=typeof K=="string"?{text:K}:K||{}).text=K.text||null,K.id=K.text?K.id||"qrcode-title":null;var Oe,u,f,_,M=D.getModuleCount()*P+2*q,W="";for(_="l"+P+",0 0,"+P+" -"+P+",0 0,-"+P+"z ",W+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',W+=se.scalable?"":' width="'+M+'px" height="'+M+'px"',W+=' viewBox="0 0 '+M+" "+M+'" ',W+=' preserveAspectRatio="xMinYMin meet"',W+=K.text||F.text?' role="img" aria-labelledby="'+be([K.id,F.id].join(" ").trim())+'"':"",W+=">",W+=K.text?'<title id="'+be(K.id)+'">'+be(K.text)+"</title>":"",W+=F.text?'<description id="'+be(F.id)+'">'+be(F.text)+"</description>":"",W+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',W+='<path d="',u=0;u<D.getModuleCount();u+=1)for(f=u*P+q,Oe=0;Oe<D.getModuleCount();Oe+=1)D.isDark(u,Oe)&&(W+="M"+(Oe*P+q)+","+f+_);return(W+='" stroke="transparent" fill="black"/>')+"</svg>"},D.createDataURL=function(P,q){P=P||2,q=q===void 0?4*P:q;var F=D.getModuleCount()*P+2*q,K=q,se=F-q;return Se(F,F,function(Oe,u){if(K<=Oe&&Oe<se&&K<=u&&u<se){var f=Math.floor((Oe-K)/P),_=Math.floor((u-K)/P);return D.isDark(_,f)?0:1}return 1})},D.createImgTag=function(P,q,F){P=P||2,q=q===void 0?4*P:q;var K=D.getModuleCount()*P+2*q,se="";return se+="<img",se+=' src="',se+=D.createDataURL(P,q),se+='"',se+=' width="',se+=K,se+='"',se+=' height="',se+=K,se+='"',F&&(se+=' alt="',se+=be(F),se+='"'),se+"/>"};var be=function(P){for(var q="",F=0;F<P.length;F+=1){var K=P.charAt(F);switch(K){case"<":q+="&lt;";break;case">":q+="&gt;";break;case"&":q+="&amp;";break;case'"':q+="&quot;";break;default:q+=K}}return q};return D.createASCII=function(P,q){if((P=P||1)<2)return function(Me){Me=Me===void 0?2:Me;var Ie,Ce,ke,Ne,Re,Ge=1*D.getModuleCount()+2*Me,Je=Me,Ve=Ge-Me,xt={"██":"█","█ ":"▀"," █":"▄"," ":" "},vt={"██":"▀","█ ":"▀"," █":" "," ":" "},ut="";for(Ie=0;Ie<Ge;Ie+=2){for(ke=Math.floor((Ie-Je)/1),Ne=Math.floor((Ie+1-Je)/1),Ce=0;Ce<Ge;Ce+=1)Re="█",Je<=Ce&&Ce<Ve&&Je<=Ie&&Ie<Ve&&D.isDark(ke,Math.floor((Ce-Je)/1))&&(Re=" "),Je<=Ce&&Ce<Ve&&Je<=Ie+1&&Ie+1<Ve&&D.isDark(Ne,Math.floor((Ce-Je)/1))?Re+=" ":Re+="█",ut+=Me<1&&Ie+1>=Ve?vt[Re]:xt[Re];ut+=`
114
- `}return Ge%2&&Me>0?ut.substring(0,ut.length-Ge-1)+Array(Ge+1).join("▀"):ut.substring(0,ut.length-1)}(q);P-=1,q=q===void 0?2*P:q;var F,K,se,Oe,u=D.getModuleCount()*P+2*q,f=q,_=u-q,M=Array(P+1).join("██"),W=Array(P+1).join(" "),Q="",xe="";for(F=0;F<u;F+=1){for(se=Math.floor((F-f)/P),xe="",K=0;K<u;K+=1)Oe=1,f<=K&&K<_&&f<=F&&F<_&&D.isDark(se,Math.floor((K-f)/P))&&(Oe=0),xe+=Oe?M:W;for(se=0;se<P;se+=1)Q+=xe+`
115
- `}return Q.substring(0,Q.length-1)},D.renderTo2dContext=function(P,q){q=q||2;for(var F=D.getModuleCount(),K=0;K<F;K++)for(var se=0;se<F;se++)P.fillStyle=D.isDark(K,se)?"black":"white",P.fillRect(K*q,se*q,q,q)},D};R.stringToBytes=(R.stringToBytesFuncs={default:function(Y){for(var L=[],A=0;A<Y.length;A+=1){var g=Y.charCodeAt(A);L.push(255&g)}return L}}).default,R.createStringToBytes=function(Y,L){var A=function(){for(var p=Ae(Y),w=function(){var ae=p.read();if(ae==-1)throw"eof";return ae},h=0,v={};;){var D=p.read();if(D==-1)break;var z=w(),Z=w()<<8|w();v[String.fromCharCode(D<<8|z)]=Z,h+=1}if(h!=L)throw h+" != "+L;return v}(),g=63;return function(p){for(var w=[],h=0;h<p.length;h+=1){var v=p.charCodeAt(h);if(v<128)w.push(v);else{var D=A[p.charAt(h)];typeof D=="number"?(255&D)==D?w.push(D):(w.push(D>>>8),w.push(255&D)):w.push(g)}}return w}};var N,E,I,$,j,X={L:1,M:0,Q:3,H:2},te=(N=[[],[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]],E=1335,I=7973,j=function(Y){for(var L=0;Y!=0;)L+=1,Y>>>=1;return L},($={}).getBCHTypeInfo=function(Y){for(var L=Y<<10;j(L)-j(E)>=0;)L^=E<<j(L)-j(E);return 21522^(Y<<10|L)},$.getBCHTypeNumber=function(Y){for(var L=Y<<12;j(L)-j(I)>=0;)L^=I<<j(L)-j(I);return Y<<12|L},$.getPatternPosition=function(Y){return N[Y-1]},$.getMaskFunction=function(Y){switch(Y){case 0:return function(L,A){return(L+A)%2==0};case 1:return function(L,A){return L%2==0};case 2:return function(L,A){return A%3==0};case 3:return function(L,A){return(L+A)%3==0};case 4:return function(L,A){return(Math.floor(L/2)+Math.floor(A/3))%2==0};case 5:return function(L,A){return L*A%2+L*A%3==0};case 6:return function(L,A){return(L*A%2+L*A%3)%2==0};case 7:return function(L,A){return(L*A%3+(L+A)%2)%2==0};default:throw"bad maskPattern:"+Y}},$.getErrorCorrectPolynomial=function(Y){for(var L=ue([1],0),A=0;A<Y;A+=1)L=L.multiply(ue([1,ne.gexp(A)],0));return L},$.getLengthInBits=function(Y,L){if(1<=L&&L<10)switch(Y){case 1:return 10;case 2:return 9;case 4:case 8:return 8;default:throw"mode:"+Y}else if(L<27)switch(Y){case 1:return 12;case 2:return 11;case 4:return 16;case 8:return 10;default:throw"mode:"+Y}else{if(!(L<41))throw"type:"+L;switch(Y){case 1:return 14;case 2:return 13;case 4:return 16;case 8:return 12;default:throw"mode:"+Y}}},$.getLostPoint=function(Y){for(var L=Y.getModuleCount(),A=0,g=0;g<L;g+=1)for(var p=0;p<L;p+=1){for(var w=0,h=Y.isDark(g,p),v=-1;v<=1;v+=1)if(!(g+v<0||L<=g+v))for(var D=-1;D<=1;D+=1)p+D<0||L<=p+D||v==0&&D==0||h==Y.isDark(g+v,p+D)&&(w+=1);w>5&&(A+=3+w-5)}for(g=0;g<L-1;g+=1)for(p=0;p<L-1;p+=1){var z=0;Y.isDark(g,p)&&(z+=1),Y.isDark(g+1,p)&&(z+=1),Y.isDark(g,p+1)&&(z+=1),Y.isDark(g+1,p+1)&&(z+=1),z!=0&&z!=4||(A+=3)}for(g=0;g<L;g+=1)for(p=0;p<L-6;p+=1)Y.isDark(g,p)&&!Y.isDark(g,p+1)&&Y.isDark(g,p+2)&&Y.isDark(g,p+3)&&Y.isDark(g,p+4)&&!Y.isDark(g,p+5)&&Y.isDark(g,p+6)&&(A+=40);for(p=0;p<L;p+=1)for(g=0;g<L-6;g+=1)Y.isDark(g,p)&&!Y.isDark(g+1,p)&&Y.isDark(g+2,p)&&Y.isDark(g+3,p)&&Y.isDark(g+4,p)&&!Y.isDark(g+5,p)&&Y.isDark(g+6,p)&&(A+=40);var Z=0;for(p=0;p<L;p+=1)for(g=0;g<L;g+=1)Y.isDark(g,p)&&(Z+=1);return A+Math.abs(100*Z/L/L-50)/5*10},$),ne=function(){for(var Y=new Array(256),L=new Array(256),A=0;A<8;A+=1)Y[A]=1<<A;for(A=8;A<256;A+=1)Y[A]=Y[A-4]^Y[A-5]^Y[A-6]^Y[A-8];for(A=0;A<255;A+=1)L[Y[A]]=A;return{glog:function(g){if(g<1)throw"glog("+g+")";return L[g]},gexp:function(g){for(;g<0;)g+=255;for(;g>=256;)g-=255;return Y[g]}}}();function ue(Y,L){if(Y.length===void 0)throw Y.length+"/"+L;var A=function(){for(var p=0;p<Y.length&&Y[p]==0;)p+=1;for(var w=new Array(Y.length-p+L),h=0;h<Y.length-p;h+=1)w[h]=Y[h+p];return w}(),g={getAt:function(p){return A[p]},getLength:function(){return A.length},multiply:function(p){for(var w=new Array(g.getLength()+p.getLength()-1),h=0;h<g.getLength();h+=1)for(var v=0;v<p.getLength();v+=1)w[h+v]^=ne.gexp(ne.glog(g.getAt(h))+ne.glog(p.getAt(v)));return ue(w,0)},mod:function(p){if(g.getLength()-p.getLength()<0)return g;for(var w=ne.glog(g.getAt(0))-ne.glog(p.getAt(0)),h=new Array(g.getLength()),v=0;v<g.getLength();v+=1)h[v]=g.getAt(v);for(v=0;v<p.getLength();v+=1)h[v]^=ne.gexp(ne.glog(p.getAt(v))+w);return ue(h,0).mod(p)}};return g}var V=function(){var Y=[[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]],L=function(g,p){var w={};return w.totalCount=g,w.dataCount=p,w},A={getRSBlocks:function(g,p){var w=function(_e,J){switch(J){case X.L:return Y[4*(_e-1)+0];case X.M:return Y[4*(_e-1)+1];case X.Q:return Y[4*(_e-1)+2];case X.H:return Y[4*(_e-1)+3];default:return}}(g,p);if(w===void 0)throw"bad rs block @ typeNumber:"+g+"/errorCorrectionLevel:"+p;for(var h=w.length/3,v=[],D=0;D<h;D+=1)for(var z=w[3*D+0],Z=w[3*D+1],ae=w[3*D+2],fe=0;fe<z;fe+=1)v.push(L(Z,ae));return v}};return A}(),ce=function(){var Y=[],L=0,A={getBuffer:function(){return Y},getAt:function(g){var p=Math.floor(g/8);return(Y[p]>>>7-g%8&1)==1},put:function(g,p){for(var w=0;w<p;w+=1)A.putBit((g>>>p-w-1&1)==1)},getLengthInBits:function(){return L},putBit:function(g){var p=Math.floor(L/8);Y.length<=p&&Y.push(0),g&&(Y[p]|=128>>>L%8),L+=1}};return A},oe=function(Y){var L=Y,A={getMode:function(){return 1},getLength:function(w){return L.length},write:function(w){for(var h=L,v=0;v+2<h.length;)w.put(g(h.substring(v,v+3)),10),v+=3;v<h.length&&(h.length-v==1?w.put(g(h.substring(v,v+1)),4):h.length-v==2&&w.put(g(h.substring(v,v+2)),7))}},g=function(w){for(var h=0,v=0;v<w.length;v+=1)h=10*h+p(w.charAt(v));return h},p=function(w){if("0"<=w&&w<="9")return w.charCodeAt(0)-48;throw"illegal char :"+w};return A},ee=function(Y){var L=Y,A={getMode:function(){return 2},getLength:function(p){return L.length},write:function(p){for(var w=L,h=0;h+1<w.length;)p.put(45*g(w.charAt(h))+g(w.charAt(h+1)),11),h+=2;h<w.length&&p.put(g(w.charAt(h)),6)}},g=function(p){if("0"<=p&&p<="9")return p.charCodeAt(0)-48;if("A"<=p&&p<="Z")return p.charCodeAt(0)-65+10;switch(p){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 :"+p}};return A},de=function(Y){var L=R.stringToBytes(Y);return{getMode:function(){return 4},getLength:function(A){return L.length},write:function(A){for(var g=0;g<L.length;g+=1)A.put(L[g],8)}}},pe=function(Y){var L=R.stringToBytesFuncs.SJIS;if(!L)throw"sjis not supported.";(function(){var p=L("友");if(p.length!=2||(p[0]<<8|p[1])!=38726)throw"sjis not supported."})();var A=L(Y),g={getMode:function(){return 8},getLength:function(p){return~~(A.length/2)},write:function(p){for(var w=A,h=0;h+1<w.length;){var v=(255&w[h])<<8|255&w[h+1];if(33088<=v&&v<=40956)v-=33088;else{if(!(57408<=v&&v<=60351))throw"illegal char at "+(h+1)+"/"+v;v-=49472}v=192*(v>>>8&255)+(255&v),p.put(v,13),h+=2}if(h<w.length)throw"illegal char at "+(h+1)}};return g},re=function(){var Y=[],L={writeByte:function(A){Y.push(255&A)},writeShort:function(A){L.writeByte(A),L.writeByte(A>>>8)},writeBytes:function(A,g,p){g=g||0,p=p||A.length;for(var w=0;w<p;w+=1)L.writeByte(A[w+g])},writeString:function(A){for(var g=0;g<A.length;g+=1)L.writeByte(A.charCodeAt(g))},toByteArray:function(){return Y},toString:function(){var A="";A+="[";for(var g=0;g<Y.length;g+=1)g>0&&(A+=","),A+=Y[g];return A+"]"}};return L},Ae=function(Y){var L=Y,A=0,g=0,p=0,w={read:function(){for(;p<8;){if(A>=L.length){if(p==0)return-1;throw"unexpected end of file./"+p}var v=L.charAt(A);if(A+=1,v=="=")return p=0,-1;v.match(/^\s$/)||(g=g<<6|h(v.charCodeAt(0)),p+=6)}var D=g>>>p-8&255;return p-=8,D}},h=function(v){if(65<=v&&v<=90)return v-65;if(97<=v&&v<=122)return v-97+26;if(48<=v&&v<=57)return v-48+52;if(v==43)return 62;if(v==47)return 63;throw"c:"+v};return w},Se=function(Y,L,A){for(var g=function(Z,ae){var fe=Z,_e=ae,J=new Array(Z*ae),he={setPixel:function(P,q,F){J[q*fe+P]=F},write:function(P){P.writeString("GIF87a"),P.writeShort(fe),P.writeShort(_e),P.writeByte(128),P.writeByte(0),P.writeByte(0),P.writeByte(0),P.writeByte(0),P.writeByte(0),P.writeByte(255),P.writeByte(255),P.writeByte(255),P.writeString(","),P.writeShort(0),P.writeShort(0),P.writeShort(fe),P.writeShort(_e),P.writeByte(0);var q=De(2);P.writeByte(2);for(var F=0;q.length-F>255;)P.writeByte(255),P.writeBytes(q,F,255),F+=255;P.writeByte(q.length-F),P.writeBytes(q,F,q.length-F),P.writeByte(0),P.writeString(";")}},De=function(P){for(var q=1<<P,F=1+(1<<P),K=P+1,se=be(),Oe=0;Oe<q;Oe+=1)se.add(String.fromCharCode(Oe));se.add(String.fromCharCode(q)),se.add(String.fromCharCode(F));var u,f,_,M=re(),W=(u=M,f=0,_=0,{write:function(Ie,Ce){if(Ie>>>Ce)throw"length over";for(;f+Ce>=8;)u.writeByte(255&(Ie<<f|_)),Ce-=8-f,Ie>>>=8-f,_=0,f=0;_|=Ie<<f,f+=Ce},flush:function(){f>0&&u.writeByte(_)}});W.write(q,K);var Q=0,xe=String.fromCharCode(J[Q]);for(Q+=1;Q<J.length;){var Me=String.fromCharCode(J[Q]);Q+=1,se.contains(xe+Me)?xe+=Me:(W.write(se.indexOf(xe),K),se.size()<4095&&(se.size()==1<<K&&(K+=1),se.add(xe+Me)),xe=Me)}return W.write(se.indexOf(xe),K),W.write(F,K),W.flush(),M.toByteArray()},be=function(){var P={},q=0,F={add:function(K){if(F.contains(K))throw"dup key:"+K;P[K]=q,q+=1},size:function(){return q},indexOf:function(K){return P[K]},contains:function(K){return P[K]!==void 0}};return F};return he}(Y,L),p=0;p<L;p+=1)for(var w=0;w<Y;w+=1)g.setPixel(w,p,A(w,p));var h=re();g.write(h);for(var v=function(){var Z=0,ae=0,fe=0,_e="",J={},he=function(be){_e+=String.fromCharCode(De(63&be))},De=function(be){if(!(be<0)){if(be<26)return 65+be;if(be<52)return be-26+97;if(be<62)return be-52+48;if(be==62)return 43;if(be==63)return 47}throw"n:"+be};return J.writeByte=function(be){for(Z=Z<<8|255&be,ae+=8,fe+=1;ae>=6;)he(Z>>>ae-6),ae-=6},J.flush=function(){if(ae>0&&(he(Z<<6-ae),Z=0,ae=0),fe%3!=0)for(var be=3-fe%3,P=0;P<be;P+=1)_e+="="},J.toString=function(){return _e},J}(),D=h.toByteArray(),z=0;z<D.length;z+=1)v.writeByte(D[z]);return v.flush(),"data:image/gif;base64,"+v};return R}();O.stringToBytesFuncs["UTF-8"]=function(R){return function(N){for(var E=[],I=0;I<N.length;I++){var $=N.charCodeAt(I);$<128?E.push($):$<2048?E.push(192|$>>6,128|63&$):$<55296||$>=57344?E.push(224|$>>12,128|$>>6&63,128|63&$):(I++,$=65536+((1023&$)<<10|1023&N.charCodeAt(I)),E.push(240|$>>18,128|$>>12&63,128|$>>6&63,128|63&$))}return E}(R)},(C=typeof(x=function(){return O})=="function"?x.apply(c,[]):x)===void 0||(m.exports=C)}},s={};function l(m){var c=s[m];if(c!==void 0)return c.exports;var x=s[m]={exports:{}};return r[m](x,x.exports,l),x.exports}l.n=m=>{var c=m&&m.__esModule?()=>m.default:()=>m;return l.d(c,{a:c}),c},l.d=(m,c)=>{for(var x in c)l.o(c,x)&&!l.o(m,x)&&Object.defineProperty(m,x,{enumerable:!0,get:c[x]})},l.o=(m,c)=>Object.prototype.hasOwnProperty.call(m,c);var d={};return(()=>{l.d(d,{default:()=>L});const m=A=>!!A&&typeof A=="object"&&!Array.isArray(A);function c(A,...g){if(!g.length)return A;const p=g.shift();return p!==void 0&&m(A)&&m(p)?(A=Object.assign({},A),Object.keys(p).forEach(w=>{const h=A[w],v=p[w];Array.isArray(h)&&Array.isArray(v)?A[w]=v:m(h)&&m(v)?A[w]=c(Object.assign({},h),v):A[w]=v}),c(A,...g)):A}function x(A,g){const p=document.createElement("a");p.download=g,p.href=A,document.body.appendChild(p),p.click(),document.body.removeChild(p)}const C={L:.07,M:.15,Q:.25,H:.3};class O{constructor({svg:g,type:p,window:w}){this._svg=g,this._type=p,this._window=w}draw(g,p,w,h){let v;switch(this._type){case"dots":v=this._drawDot;break;case"classy":v=this._drawClassy;break;case"classy-rounded":v=this._drawClassyRounded;break;case"rounded":v=this._drawRounded;break;case"extra-rounded":v=this._drawExtraRounded;break;default:v=this._drawSquare}v.call(this,{x:g,y:p,size:w,getNeighbor:h})}_rotateFigure({x:g,y:p,size:w,rotation:h=0,draw:v}){var D;const z=g+w/2,Z=p+w/2;v(),(D=this._element)===null||D===void 0||D.setAttribute("transform",`rotate(${180*h/Math.PI},${z},${Z})`)}_basicDot(g){const{size:p,x:w,y:h}=g;this._rotateFigure(Object.assign(Object.assign({},g),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","circle"),this._element.setAttribute("cx",String(w+p/2)),this._element.setAttribute("cy",String(h+p/2)),this._element.setAttribute("r",String(p/2))}}))}_basicSquare(g){const{size:p,x:w,y:h}=g;this._rotateFigure(Object.assign(Object.assign({},g),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","rect"),this._element.setAttribute("x",String(w)),this._element.setAttribute("y",String(h)),this._element.setAttribute("width",String(p)),this._element.setAttribute("height",String(p))}}))}_basicSideRounded(g){const{size:p,x:w,y:h}=g;this._rotateFigure(Object.assign(Object.assign({},g),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",`M ${w} ${h}v ${p}h `+p/2+`a ${p/2} ${p/2}, 0, 0, 0, 0 ${-p}`)}}))}_basicCornerRounded(g){const{size:p,x:w,y:h}=g;this._rotateFigure(Object.assign(Object.assign({},g),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",`M ${w} ${h}v ${p}h ${p}v `+-p/2+`a ${p/2} ${p/2}, 0, 0, 0, ${-p/2} ${-p/2}`)}}))}_basicCornerExtraRounded(g){const{size:p,x:w,y:h}=g;this._rotateFigure(Object.assign(Object.assign({},g),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",`M ${w} ${h}v ${p}h ${p}a ${p} ${p}, 0, 0, 0, ${-p} ${-p}`)}}))}_basicCornersRounded(g){const{size:p,x:w,y:h}=g;this._rotateFigure(Object.assign(Object.assign({},g),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",`M ${w} ${h}v `+p/2+`a ${p/2} ${p/2}, 0, 0, 0, ${p/2} ${p/2}h `+p/2+"v "+-p/2+`a ${p/2} ${p/2}, 0, 0, 0, ${-p/2} ${-p/2}`)}}))}_drawDot({x:g,y:p,size:w}){this._basicDot({x:g,y:p,size:w,rotation:0})}_drawSquare({x:g,y:p,size:w}){this._basicSquare({x:g,y:p,size:w,rotation:0})}_drawRounded({x:g,y:p,size:w,getNeighbor:h}){const v=h?+h(-1,0):0,D=h?+h(1,0):0,z=h?+h(0,-1):0,Z=h?+h(0,1):0,ae=v+D+z+Z;if(ae!==0)if(ae>2||v&&D||z&&Z)this._basicSquare({x:g,y:p,size:w,rotation:0});else{if(ae===2){let fe=0;return v&&z?fe=Math.PI/2:z&&D?fe=Math.PI:D&&Z&&(fe=-Math.PI/2),void this._basicCornerRounded({x:g,y:p,size:w,rotation:fe})}if(ae===1){let fe=0;return z?fe=Math.PI/2:D?fe=Math.PI:Z&&(fe=-Math.PI/2),void this._basicSideRounded({x:g,y:p,size:w,rotation:fe})}}else this._basicDot({x:g,y:p,size:w,rotation:0})}_drawExtraRounded({x:g,y:p,size:w,getNeighbor:h}){const v=h?+h(-1,0):0,D=h?+h(1,0):0,z=h?+h(0,-1):0,Z=h?+h(0,1):0,ae=v+D+z+Z;if(ae!==0)if(ae>2||v&&D||z&&Z)this._basicSquare({x:g,y:p,size:w,rotation:0});else{if(ae===2){let fe=0;return v&&z?fe=Math.PI/2:z&&D?fe=Math.PI:D&&Z&&(fe=-Math.PI/2),void this._basicCornerExtraRounded({x:g,y:p,size:w,rotation:fe})}if(ae===1){let fe=0;return z?fe=Math.PI/2:D?fe=Math.PI:Z&&(fe=-Math.PI/2),void this._basicSideRounded({x:g,y:p,size:w,rotation:fe})}}else this._basicDot({x:g,y:p,size:w,rotation:0})}_drawClassy({x:g,y:p,size:w,getNeighbor:h}){const v=h?+h(-1,0):0,D=h?+h(1,0):0,z=h?+h(0,-1):0,Z=h?+h(0,1):0;v+D+z+Z!==0?v||z?D||Z?this._basicSquare({x:g,y:p,size:w,rotation:0}):this._basicCornerRounded({x:g,y:p,size:w,rotation:Math.PI/2}):this._basicCornerRounded({x:g,y:p,size:w,rotation:-Math.PI/2}):this._basicCornersRounded({x:g,y:p,size:w,rotation:Math.PI/2})}_drawClassyRounded({x:g,y:p,size:w,getNeighbor:h}){const v=h?+h(-1,0):0,D=h?+h(1,0):0,z=h?+h(0,-1):0,Z=h?+h(0,1):0;v+D+z+Z!==0?v||z?D||Z?this._basicSquare({x:g,y:p,size:w,rotation:0}):this._basicCornerExtraRounded({x:g,y:p,size:w,rotation:Math.PI/2}):this._basicCornerExtraRounded({x:g,y:p,size:w,rotation:-Math.PI/2}):this._basicCornersRounded({x:g,y:p,size:w,rotation:Math.PI/2})}}const R={dot:"dot",square:"square",extraRounded:"extra-rounded"},N=Object.values(R);class E{constructor({svg:g,type:p,window:w}){this._svg=g,this._type=p,this._window=w}draw(g,p,w,h){let v;switch(this._type){case R.square:v=this._drawSquare;break;case R.extraRounded:v=this._drawExtraRounded;break;default:v=this._drawDot}v.call(this,{x:g,y:p,size:w,rotation:h})}_rotateFigure({x:g,y:p,size:w,rotation:h=0,draw:v}){var D;const z=g+w/2,Z=p+w/2;v(),(D=this._element)===null||D===void 0||D.setAttribute("transform",`rotate(${180*h/Math.PI},${z},${Z})`)}_basicDot(g){const{size:p,x:w,y:h}=g,v=p/7;this._rotateFigure(Object.assign(Object.assign({},g),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("clip-rule","evenodd"),this._element.setAttribute("d",`M ${w+p/2} ${h}a ${p/2} ${p/2} 0 1 0 0.1 0zm 0 ${v}a ${p/2-v} ${p/2-v} 0 1 1 -0.1 0Z`)}}))}_basicSquare(g){const{size:p,x:w,y:h}=g,v=p/7;this._rotateFigure(Object.assign(Object.assign({},g),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("clip-rule","evenodd"),this._element.setAttribute("d",`M ${w} ${h}v ${p}h ${p}v `+-p+`zM ${w+v} ${h+v}h `+(p-2*v)+"v "+(p-2*v)+"h "+(2*v-p)+"z")}}))}_basicExtraRounded(g){const{size:p,x:w,y:h}=g,v=p/7;this._rotateFigure(Object.assign(Object.assign({},g),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("clip-rule","evenodd"),this._element.setAttribute("d",`M ${w} ${h+2.5*v}v `+2*v+`a ${2.5*v} ${2.5*v}, 0, 0, 0, ${2.5*v} ${2.5*v}h `+2*v+`a ${2.5*v} ${2.5*v}, 0, 0, 0, ${2.5*v} ${2.5*-v}v `+-2*v+`a ${2.5*v} ${2.5*v}, 0, 0, 0, ${2.5*-v} ${2.5*-v}h `+-2*v+`a ${2.5*v} ${2.5*v}, 0, 0, 0, ${2.5*-v} ${2.5*v}M ${w+2.5*v} ${h+v}h `+2*v+`a ${1.5*v} ${1.5*v}, 0, 0, 1, ${1.5*v} ${1.5*v}v `+2*v+`a ${1.5*v} ${1.5*v}, 0, 0, 1, ${1.5*-v} ${1.5*v}h `+-2*v+`a ${1.5*v} ${1.5*v}, 0, 0, 1, ${1.5*-v} ${1.5*-v}v `+-2*v+`a ${1.5*v} ${1.5*v}, 0, 0, 1, ${1.5*v} ${1.5*-v}`)}}))}_drawDot({x:g,y:p,size:w,rotation:h}){this._basicDot({x:g,y:p,size:w,rotation:h})}_drawSquare({x:g,y:p,size:w,rotation:h}){this._basicSquare({x:g,y:p,size:w,rotation:h})}_drawExtraRounded({x:g,y:p,size:w,rotation:h}){this._basicExtraRounded({x:g,y:p,size:w,rotation:h})}}const I={dot:"dot",square:"square"},$=Object.values(I);class j{constructor({svg:g,type:p,window:w}){this._svg=g,this._type=p,this._window=w}draw(g,p,w,h){let v;v=this._type===I.square?this._drawSquare:this._drawDot,v.call(this,{x:g,y:p,size:w,rotation:h})}_rotateFigure({x:g,y:p,size:w,rotation:h=0,draw:v}){var D;const z=g+w/2,Z=p+w/2;v(),(D=this._element)===null||D===void 0||D.setAttribute("transform",`rotate(${180*h/Math.PI},${z},${Z})`)}_basicDot(g){const{size:p,x:w,y:h}=g;this._rotateFigure(Object.assign(Object.assign({},g),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","circle"),this._element.setAttribute("cx",String(w+p/2)),this._element.setAttribute("cy",String(h+p/2)),this._element.setAttribute("r",String(p/2))}}))}_basicSquare(g){const{size:p,x:w,y:h}=g;this._rotateFigure(Object.assign(Object.assign({},g),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","rect"),this._element.setAttribute("x",String(w)),this._element.setAttribute("y",String(h)),this._element.setAttribute("width",String(p)),this._element.setAttribute("height",String(p))}}))}_drawDot({x:g,y:p,size:w,rotation:h}){this._basicDot({x:g,y:p,size:w,rotation:h})}_drawSquare({x:g,y:p,size:w,rotation:h}){this._basicSquare({x:g,y:p,size:w,rotation:h})}}const X="circle",te=[[1,1,1,1,1,1,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,1,1,1,1,1,1]],ne=[[0,0,0,0,0,0,0],[0,0,0,0,0,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,0,0,0,0,0],[0,0,0,0,0,0,0]];class ue{constructor(g,p){this._roundSize=w=>this._options.dotsOptions.roundSize?Math.floor(w):w,this._window=p,this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("width",String(g.width)),this._element.setAttribute("height",String(g.height)),this._element.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),g.dotsOptions.roundSize||this._element.setAttribute("shape-rendering","crispEdges"),this._element.setAttribute("viewBox",`0 0 ${g.width} ${g.height}`),this._defs=this._window.document.createElementNS("http://www.w3.org/2000/svg","defs"),this._element.appendChild(this._defs),this._imageUri=g.image,this._instanceId=ue.instanceCount++,this._options=g}get width(){return this._options.width}get height(){return this._options.height}getElement(){return this._element}async drawQR(g){const p=g.getModuleCount(),w=Math.min(this._options.width,this._options.height)-2*this._options.margin,h=this._options.shape===X?w/Math.sqrt(2):w,v=this._roundSize(h/p);let D={hideXDots:0,hideYDots:0,width:0,height:0};if(this._qr=g,this._options.image){if(await this.loadImage(),!this._image)return;const{imageOptions:z,qrOptions:Z}=this._options,ae=z.imageSize*C[Z.errorCorrectionLevel],fe=Math.floor(ae*p*p);D=function({originalHeight:_e,originalWidth:J,maxHiddenDots:he,maxHiddenAxisDots:De,dotSize:be}){const P={x:0,y:0},q={x:0,y:0};if(_e<=0||J<=0||he<=0||be<=0)return{height:0,width:0,hideYDots:0,hideXDots:0};const F=_e/J;return P.x=Math.floor(Math.sqrt(he/F)),P.x<=0&&(P.x=1),De&&De<P.x&&(P.x=De),P.x%2==0&&P.x--,q.x=P.x*be,P.y=1+2*Math.ceil((P.x*F-1)/2),q.y=Math.round(q.x*F),(P.y*P.x>he||De&&De<P.y)&&(De&&De<P.y?(P.y=De,P.y%2==0&&P.x--):P.y-=2,q.y=P.y*be,P.x=1+2*Math.ceil((P.y/F-1)/2),q.x=Math.round(q.y/F)),{height:q.y,width:q.x,hideYDots:P.y,hideXDots:P.x}}({originalWidth:this._image.width,originalHeight:this._image.height,maxHiddenDots:fe,maxHiddenAxisDots:p-14,dotSize:v})}this.drawBackground(),this.drawDots((z,Z)=>{var ae,fe,_e,J,he,De;return!(this._options.imageOptions.hideBackgroundDots&&z>=(p-D.hideYDots)/2&&z<(p+D.hideYDots)/2&&Z>=(p-D.hideXDots)/2&&Z<(p+D.hideXDots)/2||!((ae=te[z])===null||ae===void 0)&&ae[Z]||!((fe=te[z-p+7])===null||fe===void 0)&&fe[Z]||!((_e=te[z])===null||_e===void 0)&&_e[Z-p+7]||!((J=ne[z])===null||J===void 0)&&J[Z]||!((he=ne[z-p+7])===null||he===void 0)&&he[Z]||!((De=ne[z])===null||De===void 0)&&De[Z-p+7])}),this.drawCorners(),this._options.image&&await this.drawImage({width:D.width,height:D.height,count:p,dotSize:v})}drawBackground(){var g,p,w;const h=this._element,v=this._options;if(h){const D=(g=v.backgroundOptions)===null||g===void 0?void 0:g.gradient,z=(p=v.backgroundOptions)===null||p===void 0?void 0:p.color;let Z=v.height,ae=v.width;if(D||z){const fe=this._window.document.createElementNS("http://www.w3.org/2000/svg","rect");this._backgroundClipPath=this._window.document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._backgroundClipPath.setAttribute("id",`clip-path-background-color-${this._instanceId}`),this._defs.appendChild(this._backgroundClipPath),!((w=v.backgroundOptions)===null||w===void 0)&&w.round&&(Z=ae=Math.min(v.width,v.height),fe.setAttribute("rx",String(Z/2*v.backgroundOptions.round))),fe.setAttribute("x",String(this._roundSize((v.width-ae)/2))),fe.setAttribute("y",String(this._roundSize((v.height-Z)/2))),fe.setAttribute("width",String(ae)),fe.setAttribute("height",String(Z)),this._backgroundClipPath.appendChild(fe),this._createColor({options:D,color:z,additionalRotation:0,x:0,y:0,height:v.height,width:v.width,name:`background-color-${this._instanceId}`})}}}drawDots(g){var p,w;if(!this._qr)throw"QR code is not defined";const h=this._options,v=this._qr.getModuleCount();if(v>h.width||v>h.height)throw"The canvas is too small.";const D=Math.min(h.width,h.height)-2*h.margin,z=h.shape===X?D/Math.sqrt(2):D,Z=this._roundSize(z/v),ae=this._roundSize((h.width-v*Z)/2),fe=this._roundSize((h.height-v*Z)/2),_e=new O({svg:this._element,type:h.dotsOptions.type,window:this._window});this._dotsClipPath=this._window.document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._dotsClipPath.setAttribute("id",`clip-path-dot-color-${this._instanceId}`),this._defs.appendChild(this._dotsClipPath),this._createColor({options:(p=h.dotsOptions)===null||p===void 0?void 0:p.gradient,color:h.dotsOptions.color,additionalRotation:0,x:0,y:0,height:h.height,width:h.width,name:`dot-color-${this._instanceId}`});for(let J=0;J<v;J++)for(let he=0;he<v;he++)g&&!g(J,he)||!((w=this._qr)===null||w===void 0)&&w.isDark(J,he)&&(_e.draw(ae+he*Z,fe+J*Z,Z,(De,be)=>!(he+De<0||J+be<0||he+De>=v||J+be>=v)&&!(g&&!g(J+be,he+De))&&!!this._qr&&this._qr.isDark(J+be,he+De)),_e._element&&this._dotsClipPath&&this._dotsClipPath.appendChild(_e._element));if(h.shape===X){const J=this._roundSize((D/Z-v)/2),he=v+2*J,De=ae-J*Z,be=fe-J*Z,P=[],q=this._roundSize(he/2);for(let F=0;F<he;F++){P[F]=[];for(let K=0;K<he;K++)F>=J-1&&F<=he-J&&K>=J-1&&K<=he-J||Math.sqrt((F-q)*(F-q)+(K-q)*(K-q))>q?P[F][K]=0:P[F][K]=this._qr.isDark(K-2*J<0?K:K>=v?K-2*J:K-J,F-2*J<0?F:F>=v?F-2*J:F-J)?1:0}for(let F=0;F<he;F++)for(let K=0;K<he;K++)P[F][K]&&(_e.draw(De+K*Z,be+F*Z,Z,(se,Oe)=>{var u;return!!(!((u=P[F+Oe])===null||u===void 0)&&u[K+se])}),_e._element&&this._dotsClipPath&&this._dotsClipPath.appendChild(_e._element))}}drawCorners(){if(!this._qr)throw"QR code is not defined";const g=this._element,p=this._options;if(!g)throw"Element code is not defined";const w=this._qr.getModuleCount(),h=Math.min(p.width,p.height)-2*p.margin,v=p.shape===X?h/Math.sqrt(2):h,D=this._roundSize(v/w),z=7*D,Z=3*D,ae=this._roundSize((p.width-w*D)/2),fe=this._roundSize((p.height-w*D)/2);[[0,0,0],[1,0,Math.PI/2],[0,1,-Math.PI/2]].forEach(([_e,J,he])=>{var De,be,P,q,F,K,se,Oe,u,f,_,M,W,Q;const xe=ae+_e*D*(w-7),Me=fe+J*D*(w-7);let Ie=this._dotsClipPath,Ce=this._dotsClipPath;if((!((De=p.cornersSquareOptions)===null||De===void 0)&&De.gradient||!((be=p.cornersSquareOptions)===null||be===void 0)&&be.color)&&(Ie=this._window.document.createElementNS("http://www.w3.org/2000/svg","clipPath"),Ie.setAttribute("id",`clip-path-corners-square-color-${_e}-${J}-${this._instanceId}`),this._defs.appendChild(Ie),this._cornersSquareClipPath=this._cornersDotClipPath=Ce=Ie,this._createColor({options:(P=p.cornersSquareOptions)===null||P===void 0?void 0:P.gradient,color:(q=p.cornersSquareOptions)===null||q===void 0?void 0:q.color,additionalRotation:he,x:xe,y:Me,height:z,width:z,name:`corners-square-color-${_e}-${J}-${this._instanceId}`})),((F=p.cornersSquareOptions)===null||F===void 0?void 0:F.type)&&N.includes(p.cornersSquareOptions.type)){const ke=new E({svg:this._element,type:p.cornersSquareOptions.type,window:this._window});ke.draw(xe,Me,z,he),ke._element&&Ie&&Ie.appendChild(ke._element)}else{const ke=new O({svg:this._element,type:((K=p.cornersSquareOptions)===null||K===void 0?void 0:K.type)||p.dotsOptions.type,window:this._window});for(let Ne=0;Ne<te.length;Ne++)for(let Re=0;Re<te[Ne].length;Re++)!((se=te[Ne])===null||se===void 0)&&se[Re]&&(ke.draw(xe+Re*D,Me+Ne*D,D,(Ge,Je)=>{var Ve;return!!(!((Ve=te[Ne+Je])===null||Ve===void 0)&&Ve[Re+Ge])}),ke._element&&Ie&&Ie.appendChild(ke._element))}if((!((Oe=p.cornersDotOptions)===null||Oe===void 0)&&Oe.gradient||!((u=p.cornersDotOptions)===null||u===void 0)&&u.color)&&(Ce=this._window.document.createElementNS("http://www.w3.org/2000/svg","clipPath"),Ce.setAttribute("id",`clip-path-corners-dot-color-${_e}-${J}-${this._instanceId}`),this._defs.appendChild(Ce),this._cornersDotClipPath=Ce,this._createColor({options:(f=p.cornersDotOptions)===null||f===void 0?void 0:f.gradient,color:(_=p.cornersDotOptions)===null||_===void 0?void 0:_.color,additionalRotation:he,x:xe+2*D,y:Me+2*D,height:Z,width:Z,name:`corners-dot-color-${_e}-${J}-${this._instanceId}`})),((M=p.cornersDotOptions)===null||M===void 0?void 0:M.type)&&$.includes(p.cornersDotOptions.type)){const ke=new j({svg:this._element,type:p.cornersDotOptions.type,window:this._window});ke.draw(xe+2*D,Me+2*D,Z,he),ke._element&&Ce&&Ce.appendChild(ke._element)}else{const ke=new O({svg:this._element,type:((W=p.cornersDotOptions)===null||W===void 0?void 0:W.type)||p.dotsOptions.type,window:this._window});for(let Ne=0;Ne<ne.length;Ne++)for(let Re=0;Re<ne[Ne].length;Re++)!((Q=ne[Ne])===null||Q===void 0)&&Q[Re]&&(ke.draw(xe+Re*D,Me+Ne*D,D,(Ge,Je)=>{var Ve;return!!(!((Ve=ne[Ne+Je])===null||Ve===void 0)&&Ve[Re+Ge])}),ke._element&&Ce&&Ce.appendChild(ke._element))}})}loadImage(){return new Promise((g,p)=>{var w;const h=this._options;if(!h.image)return p("Image is not defined");if(!((w=h.nodeCanvas)===null||w===void 0)&&w.loadImage)h.nodeCanvas.loadImage(h.image).then(v=>{var D,z;if(this._image=v,this._options.imageOptions.saveAsBlob){const Z=(D=h.nodeCanvas)===null||D===void 0?void 0:D.createCanvas(this._image.width,this._image.height);(z=Z==null?void 0:Z.getContext("2d"))===null||z===void 0||z.drawImage(v,0,0),this._imageUri=Z==null?void 0:Z.toDataURL()}g()}).catch(p);else{const v=new this._window.Image;typeof h.imageOptions.crossOrigin=="string"&&(v.crossOrigin=h.imageOptions.crossOrigin),this._image=v,v.onload=async()=>{this._options.imageOptions.saveAsBlob&&(this._imageUri=await async function(D,z){return new Promise(Z=>{const ae=new z.XMLHttpRequest;ae.onload=function(){const fe=new z.FileReader;fe.onloadend=function(){Z(fe.result)},fe.readAsDataURL(ae.response)},ae.open("GET",D),ae.responseType="blob",ae.send()})}(h.image||"",this._window)),g()},v.src=h.image}})}async drawImage({width:g,height:p,count:w,dotSize:h}){const v=this._options,D=this._roundSize((v.width-w*h)/2),z=this._roundSize((v.height-w*h)/2),Z=D+this._roundSize(v.imageOptions.margin+(w*h-g)/2),ae=z+this._roundSize(v.imageOptions.margin+(w*h-p)/2),fe=g-2*v.imageOptions.margin,_e=p-2*v.imageOptions.margin,J=this._window.document.createElementNS("http://www.w3.org/2000/svg","image");J.setAttribute("href",this._imageUri||""),J.setAttribute("xlink:href",this._imageUri||""),J.setAttribute("x",String(Z)),J.setAttribute("y",String(ae)),J.setAttribute("width",`${fe}px`),J.setAttribute("height",`${_e}px`),this._element.appendChild(J)}_createColor({options:g,color:p,additionalRotation:w,x:h,y:v,height:D,width:z,name:Z}){const ae=z>D?z:D,fe=this._window.document.createElementNS("http://www.w3.org/2000/svg","rect");if(fe.setAttribute("x",String(h)),fe.setAttribute("y",String(v)),fe.setAttribute("height",String(D)),fe.setAttribute("width",String(z)),fe.setAttribute("clip-path",`url('#clip-path-${Z}')`),g){let _e;if(g.type==="radial")_e=this._window.document.createElementNS("http://www.w3.org/2000/svg","radialGradient"),_e.setAttribute("id",Z),_e.setAttribute("gradientUnits","userSpaceOnUse"),_e.setAttribute("fx",String(h+z/2)),_e.setAttribute("fy",String(v+D/2)),_e.setAttribute("cx",String(h+z/2)),_e.setAttribute("cy",String(v+D/2)),_e.setAttribute("r",String(ae/2));else{const J=((g.rotation||0)+w)%(2*Math.PI),he=(J+2*Math.PI)%(2*Math.PI);let De=h+z/2,be=v+D/2,P=h+z/2,q=v+D/2;he>=0&&he<=.25*Math.PI||he>1.75*Math.PI&&he<=2*Math.PI?(De-=z/2,be-=D/2*Math.tan(J),P+=z/2,q+=D/2*Math.tan(J)):he>.25*Math.PI&&he<=.75*Math.PI?(be-=D/2,De-=z/2/Math.tan(J),q+=D/2,P+=z/2/Math.tan(J)):he>.75*Math.PI&&he<=1.25*Math.PI?(De+=z/2,be+=D/2*Math.tan(J),P-=z/2,q-=D/2*Math.tan(J)):he>1.25*Math.PI&&he<=1.75*Math.PI&&(be+=D/2,De+=z/2/Math.tan(J),q-=D/2,P-=z/2/Math.tan(J)),_e=this._window.document.createElementNS("http://www.w3.org/2000/svg","linearGradient"),_e.setAttribute("id",Z),_e.setAttribute("gradientUnits","userSpaceOnUse"),_e.setAttribute("x1",String(Math.round(De))),_e.setAttribute("y1",String(Math.round(be))),_e.setAttribute("x2",String(Math.round(P))),_e.setAttribute("y2",String(Math.round(q)))}g.colorStops.forEach(({offset:J,color:he})=>{const De=this._window.document.createElementNS("http://www.w3.org/2000/svg","stop");De.setAttribute("offset",100*J+"%"),De.setAttribute("stop-color",he),_e.appendChild(De)}),fe.setAttribute("fill",`url('#${Z}')`),this._defs.appendChild(_e)}else p&&fe.setAttribute("fill",p);this._element.appendChild(fe)}}ue.instanceCount=0;const V=ue,ce="canvas",oe={};for(let A=0;A<=40;A++)oe[A]=A;const ee={type:ce,shape:"square",width:300,height:300,data:"",margin:0,qrOptions:{typeNumber:oe[0],mode:void 0,errorCorrectionLevel:"Q"},imageOptions:{saveAsBlob:!0,hideBackgroundDots:!0,imageSize:.4,crossOrigin:void 0,margin:0},dotsOptions:{type:"square",color:"#000",roundSize:!0},backgroundOptions:{round:0,color:"#fff"}};function de(A){const g=Object.assign({},A);if(!g.colorStops||!g.colorStops.length)throw"Field 'colorStops' is required in gradient";return g.rotation?g.rotation=Number(g.rotation):g.rotation=0,g.colorStops=g.colorStops.map(p=>Object.assign(Object.assign({},p),{offset:Number(p.offset)})),g}function pe(A){const g=Object.assign({},A);return g.width=Number(g.width),g.height=Number(g.height),g.margin=Number(g.margin),g.imageOptions=Object.assign(Object.assign({},g.imageOptions),{hideBackgroundDots:!!g.imageOptions.hideBackgroundDots,imageSize:Number(g.imageOptions.imageSize),margin:Number(g.imageOptions.margin)}),g.margin>Math.min(g.width,g.height)&&(g.margin=Math.min(g.width,g.height)),g.dotsOptions=Object.assign({},g.dotsOptions),g.dotsOptions.gradient&&(g.dotsOptions.gradient=de(g.dotsOptions.gradient)),g.cornersSquareOptions&&(g.cornersSquareOptions=Object.assign({},g.cornersSquareOptions),g.cornersSquareOptions.gradient&&(g.cornersSquareOptions.gradient=de(g.cornersSquareOptions.gradient))),g.cornersDotOptions&&(g.cornersDotOptions=Object.assign({},g.cornersDotOptions),g.cornersDotOptions.gradient&&(g.cornersDotOptions.gradient=de(g.cornersDotOptions.gradient))),g.backgroundOptions&&(g.backgroundOptions=Object.assign({},g.backgroundOptions),g.backgroundOptions.gradient&&(g.backgroundOptions.gradient=de(g.backgroundOptions.gradient))),g}var re=l(873),Ae=l.n(re);function Se(A){if(!A)throw new Error("Extension must be defined");A[0]==="."&&(A=A.substring(1));const g={bmp:"image/bmp",gif:"image/gif",ico:"image/vnd.microsoft.icon",jpeg:"image/jpeg",jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",tif:"image/tiff",tiff:"image/tiff",webp:"image/webp",pdf:"application/pdf"}[A.toLowerCase()];if(!g)throw new Error(`Extension "${A}" is not supported`);return g}class Y{constructor(g){g!=null&&g.jsdom?this._window=new g.jsdom("",{resources:"usable"}).window:this._window=window,this._options=g?pe(c(ee,g)):ee,this.update()}static _clearContainer(g){g&&(g.innerHTML="")}_setupSvg(){if(!this._qr)return;const g=new V(this._options,this._window);this._svg=g.getElement(),this._svgDrawingPromise=g.drawQR(this._qr).then(()=>{var p;this._svg&&((p=this._extension)===null||p===void 0||p.call(this,g.getElement(),this._options))})}_setupCanvas(){var g,p;this._qr&&(!((g=this._options.nodeCanvas)===null||g===void 0)&&g.createCanvas?(this._nodeCanvas=this._options.nodeCanvas.createCanvas(this._options.width,this._options.height),this._nodeCanvas.width=this._options.width,this._nodeCanvas.height=this._options.height):(this._domCanvas=document.createElement("canvas"),this._domCanvas.width=this._options.width,this._domCanvas.height=this._options.height),this._setupSvg(),this._canvasDrawingPromise=(p=this._svgDrawingPromise)===null||p===void 0?void 0:p.then(()=>{var w;if(!this._svg)return;const h=this._svg,v=new this._window.XMLSerializer().serializeToString(h),D=btoa(v),z=`data:${Se("svg")};base64,${D}`;if(!((w=this._options.nodeCanvas)===null||w===void 0)&&w.loadImage)return this._options.nodeCanvas.loadImage(z).then(Z=>{var ae,fe;Z.width=this._options.width,Z.height=this._options.height,(fe=(ae=this._nodeCanvas)===null||ae===void 0?void 0:ae.getContext("2d"))===null||fe===void 0||fe.drawImage(Z,0,0)});{const Z=new this._window.Image;return new Promise(ae=>{Z.onload=()=>{var fe,_e;(_e=(fe=this._domCanvas)===null||fe===void 0?void 0:fe.getContext("2d"))===null||_e===void 0||_e.drawImage(Z,0,0),ae()},Z.src=z})}}))}async _getElement(g="png"){if(!this._qr)throw"QR code is empty";return g.toLowerCase()==="svg"?(this._svg&&this._svgDrawingPromise||this._setupSvg(),await this._svgDrawingPromise,this._svg):((this._domCanvas||this._nodeCanvas)&&this._canvasDrawingPromise||this._setupCanvas(),await this._canvasDrawingPromise,this._domCanvas||this._nodeCanvas)}update(g){Y._clearContainer(this._container),this._options=g?pe(c(this._options,g)):this._options,this._options.data&&(this._qr=Ae()(this._options.qrOptions.typeNumber,this._options.qrOptions.errorCorrectionLevel),this._qr.addData(this._options.data,this._options.qrOptions.mode||function(p){switch(!0){case/^[0-9]*$/.test(p):return"Numeric";case/^[0-9A-Z $%*+\-./:]*$/.test(p):return"Alphanumeric";default:return"Byte"}}(this._options.data)),this._qr.make(),this._options.type===ce?this._setupCanvas():this._setupSvg(),this.append(this._container))}append(g){if(g){if(typeof g.appendChild!="function")throw"Container should be a single DOM node";this._options.type===ce?this._domCanvas&&g.appendChild(this._domCanvas):this._svg&&g.appendChild(this._svg),this._container=g}}applyExtension(g){if(!g)throw"Extension function should be defined.";this._extension=g,this.update()}deleteExtension(){this._extension=void 0,this.update()}async getRawData(g="png"){if(!this._qr)throw"QR code is empty";const p=await this._getElement(g),w=Se(g);if(!p)return null;if(g.toLowerCase()==="svg"){const h=`<?xml version="1.0" standalone="no"?>\r
113
+ */var sc;function wg(){return sc||(sc=1,function(i,n){(function(r){var s;if(i.exports=r(),s=!0,!s){var l=window.Cookies,d=window.Cookies=r();d.noConflict=function(){return window.Cookies=l,d}}})(function(){function r(){for(var d=0,m={};d<arguments.length;d++){var c=arguments[d];for(var x in c)m[x]=c[x]}return m}function s(d){return d.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}function l(d){function m(){}function c(C,O,E){if(!(typeof document>"u")){E=r({path:"/"},m.defaults,E),typeof E.expires=="number"&&(E.expires=new Date(new Date*1+E.expires*864e5)),E.expires=E.expires?E.expires.toUTCString():"";try{var N=JSON.stringify(O);/^[\{\[]/.test(N)&&(O=N)}catch{}O=d.write?d.write(O,C):encodeURIComponent(String(O)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),C=encodeURIComponent(String(C)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var M="";for(var I in E)E[I]&&(M+="; "+I,E[I]!==!0&&(M+="="+E[I].split(";")[0]));return document.cookie=C+"="+O+M}}function x(C,O){if(!(typeof document>"u")){for(var E={},N=document.cookie?document.cookie.split("; "):[],M=0;M<N.length;M++){var I=N[M].split("="),$=I.slice(1).join("=");!O&&$.charAt(0)==='"'&&($=$.slice(1,-1));try{var j=s(I[0]);if($=(d.read||d)($,j)||s($),O)try{$=JSON.parse($)}catch{}if(E[j]=$,C===j)break}catch{}}return C?E[C]:E}}return m.set=c,m.get=function(C){return x(C,!1)},m.getJSON=function(C){return x(C,!0)},m.remove=function(C,O){c(C,"",r(O,{expires:-1}))},m.defaults={},m.withConverter=l,m}return l(function(){})})}(oc)),oc.exports}wg();function bg(){if(!window.MantineCognitoUserPool)throw new Error("Cognito Userpool has not been initialized.");return window.MantineCognitoUserPool}function xg(){return bg().getCurrentUser()}function Sg(){return new Promise((i,n)=>{const r=xg();r===null&&n(null),r==null||r.getSession((s,l)=>{if(s!==null||l===null)return n(null);i({session:l,authenticatedUser:r})})})}async function Cg(){const{session:i}=await Sg();return i==null?void 0:i.getIdToken().getJwtToken()}ye.createContext(void 0);var Ag="undefined",Dg="object",Ro="browser",ac="cpu",uc="device",pa="engine",Lo="os",tr="name",ko="type",ga="vendor",bn="version",ma="architecture",va="major",ya="model",Og="console",Tg="mobile",Mg="tablet",Eg="smarttv",Rg="wearable",Lg="embedded",kg=typeof window!==Ag,_a=kg&&window.navigator?window.navigator:void 0;_a&&_a.userAgentData&&_a.userAgentData;var Io=function(i){for(var n={},r=0;r<i.length;r++)n[i[r].toUpperCase()]=i[r];return n},Po=function(i){for(var n in i){var r=i[n];typeof r==Dg&&r.length==2?this[r[0]]=r[1]:this[r]=void 0}return this};(function(){var i={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return Po.call(i.init,[[Ro,[tr,bn,va,ko]],[ac,[ma]],[uc,[ko,ya,ga]],[pa,[tr,bn]],[Lo,[tr,bn]]]),Po.call(i.isIgnore,[[Ro,[bn,va]],[pa,[bn]],[Lo,[bn]]]),Po.call(i.isIgnoreRgx,[[Ro,/ ?browser$/i],[Lo,/ ?os$/i]]),Po.call(i.toString,[[Ro,[tr,bn]],[ac,[ma]],[uc,[ga,ya]],[pa,[tr,bn]],[Lo,[tr,bn]]]),i})(),Io([tr,bn,va,ko]),Io([ma]),Io([ya,ga,ko,Og,Tg,Eg,Mg,Rg,Lg]),Io([tr,bn]);var wa={exports:{}},Ig=wa.exports,lc;function Pg(){return lc||(lc=1,function(i,n){(function(r,s){i.exports=s()})(Ig,()=>(()=>{var r={873:(m,c)=>{var x,C,O=function(){var E=function(Y,R){var A=Y,g=J[R],p=null,w=0,h=null,v=[],D={},W=function(P,z){p=function(F){for(var K=new Array(F),se=0;se<F;se+=1){K[se]=new Array(F);for(var Te=0;Te<F;Te+=1)K[se][Te]=null}return K}(w=4*A+17),V(0,0),V(w-7,0),V(0,w-7),fe(),ae(),ee(P,z),A>=7&&we(P),h==null&&(h=De(A,g,v)),he(h,z)},V=function(P,z){for(var F=-1;F<=7;F+=1)if(!(P+F<=-1||w<=P+F))for(var K=-1;K<=7;K+=1)z+K<=-1||w<=z+K||(p[P+F][z+K]=0<=F&&F<=6&&(K==0||K==6)||0<=K&&K<=6&&(F==0||F==6)||2<=F&&F<=4&&2<=K&&K<=4)},ae=function(){for(var P=8;P<w-8;P+=1)p[P][6]==null&&(p[P][6]=P%2==0);for(var z=8;z<w-8;z+=1)p[6][z]==null&&(p[6][z]=z%2==0)},fe=function(){for(var P=te.getPatternPosition(A),z=0;z<P.length;z+=1)for(var F=0;F<P.length;F+=1){var K=P[z],se=P[F];if(p[K][se]==null)for(var Te=-2;Te<=2;Te+=1)for(var u=-2;u<=2;u+=1)p[K+Te][se+u]=Te==-2||Te==2||u==-2||u==2||Te==0&&u==0}},we=function(P){for(var z=te.getBCHTypeNumber(A),F=0;F<18;F+=1){var K=!P&&(z>>F&1)==1;p[Math.floor(F/3)][F%3+w-8-3]=K}for(F=0;F<18;F+=1)K=!P&&(z>>F&1)==1,p[F%3+w-8-3][Math.floor(F/3)]=K},ee=function(P,z){for(var F=g<<3|z,K=te.getBCHTypeInfo(F),se=0;se<15;se+=1){var Te=!P&&(K>>se&1)==1;se<6?p[se][8]=Te:se<8?p[se+1][8]=Te:p[w-15+se][8]=Te}for(se=0;se<15;se+=1)Te=!P&&(K>>se&1)==1,se<8?p[8][w-se-1]=Te:se<9?p[8][15-se-1+1]=Te:p[8][15-se-1]=Te;p[w-8][8]=!P},he=function(P,z){for(var F=-1,K=w-1,se=7,Te=0,u=te.getMaskFunction(z),f=w-1;f>0;f-=2)for(f==6&&(f-=1);;){for(var _=0;_<2;_+=1)if(p[K][f-_]==null){var k=!1;Te<P.length&&(k=(P[Te]>>>se&1)==1),u(K,f-_)&&(k=!k),p[K][f-_]=k,(se-=1)==-1&&(Te+=1,se=7)}if((K+=F)<0||w<=K){K-=F,F=-F;break}}},De=function(P,z,F){for(var K=Z.getRSBlocks(P,z),se=le(),Te=0;Te<F.length;Te+=1){var u=F[Te];se.put(u.getMode(),4),se.put(u.getLength(),te.getLengthInBits(u.getMode(),P)),u.write(se)}var f=0;for(Te=0;Te<K.length;Te+=1)f+=K[Te].dataCount;if(se.getLengthInBits()>8*f)throw"code length overflow. ("+se.getLengthInBits()+">"+8*f+")";for(se.getLengthInBits()+4<=8*f&&se.put(0,4);se.getLengthInBits()%8!=0;)se.putBit(!1);for(;!(se.getLengthInBits()>=8*f||(se.put(236,8),se.getLengthInBits()>=8*f));)se.put(17,8);return function(_,k){for(var q=0,Q=0,Ce=0,be=new Array(k.length),Re=new Array(k.length),Se=0;Se<k.length;Se+=1){var Le=k[Se].dataCount,Ne=k[Se].totalCount-Le;Q=Math.max(Q,Le),Ce=Math.max(Ce,Ne),be[Se]=new Array(Le);for(var ke=0;ke<be[Se].length;ke+=1)be[Se][ke]=255&_.getBuffer()[ke+q];q+=Le;var Ge=te.getErrorCorrectPolynomial(Ne),Je=ue(be[Se],Ge.getLength()-1).mod(Ge);for(Re[Se]=new Array(Ge.getLength()-1),ke=0;ke<Re[Se].length;ke+=1){var Ve=ke+Je.getLength()-Re[Se].length;Re[Se][ke]=Ve>=0?Je.getAt(Ve):0}}var xt=0;for(ke=0;ke<k.length;ke+=1)xt+=k[ke].totalCount;var vt=new Array(xt),ut=0;for(ke=0;ke<Q;ke+=1)for(Se=0;Se<k.length;Se+=1)ke<be[Se].length&&(vt[ut]=be[Se][ke],ut+=1);for(ke=0;ke<Ce;ke+=1)for(Se=0;Se<k.length;Se+=1)ke<Re[Se].length&&(vt[ut]=Re[Se][ke],ut+=1);return vt}(se,K)};D.addData=function(P,z){var F=null;switch(z=z||"Byte"){case"Numeric":F=oe(P);break;case"Alphanumeric":F=X(P);break;case"Byte":F=me(P);break;case"Kanji":F=de(P);break;default:throw"mode:"+z}v.push(F),h=null},D.isDark=function(P,z){if(P<0||w<=P||z<0||w<=z)throw P+","+z;return p[P][z]},D.getModuleCount=function(){return w},D.make=function(){if(A<1){for(var P=1;P<40;P++){for(var z=Z.getRSBlocks(P,g),F=le(),K=0;K<v.length;K++){var se=v[K];F.put(se.getMode(),4),F.put(se.getLength(),te.getLengthInBits(se.getMode(),P)),se.write(F)}var Te=0;for(K=0;K<z.length;K++)Te+=z[K].dataCount;if(F.getLengthInBits()<=8*Te)break}A=P}W(!1,function(){for(var u=0,f=0,_=0;_<8;_+=1){W(!0,_);var k=te.getLostPoint(D);(_==0||u>k)&&(u=k,f=_)}return f}())},D.createTableTag=function(P,z){P=P||2;var F="";F+='<table style="',F+=" border-width: 0px; border-style: none;",F+=" border-collapse: collapse;",F+=" padding: 0px; margin: "+(z=z===void 0?4*P:z)+"px;",F+='">',F+="<tbody>";for(var K=0;K<D.getModuleCount();K+=1){F+="<tr>";for(var se=0;se<D.getModuleCount();se+=1)F+='<td style="',F+=" border-width: 0px; border-style: none;",F+=" border-collapse: collapse;",F+=" padding: 0px; margin: 0px;",F+=" width: "+P+"px;",F+=" height: "+P+"px;",F+=" background-color: ",F+=D.isDark(K,se)?"#000000":"#ffffff",F+=";",F+='"/>';F+="</tr>"}return(F+="</tbody>")+"</table>"},D.createSvgTag=function(P,z,F,K){var se={};typeof arguments[0]=="object"&&(P=(se=arguments[0]).cellSize,z=se.margin,F=se.alt,K=se.title),P=P||2,z=z===void 0?4*P:z,(F=typeof F=="string"?{text:F}:F||{}).text=F.text||null,F.id=F.text?F.id||"qrcode-description":null,(K=typeof K=="string"?{text:K}:K||{}).text=K.text||null,K.id=K.text?K.id||"qrcode-title":null;var Te,u,f,_,k=D.getModuleCount()*P+2*z,q="";for(_="l"+P+",0 0,"+P+" -"+P+",0 0,-"+P+"z ",q+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',q+=se.scalable?"":' width="'+k+'px" height="'+k+'px"',q+=' viewBox="0 0 '+k+" "+k+'" ',q+=' preserveAspectRatio="xMinYMin meet"',q+=K.text||F.text?' role="img" aria-labelledby="'+_e([K.id,F.id].join(" ").trim())+'"':"",q+=">",q+=K.text?'<title id="'+_e(K.id)+'">'+_e(K.text)+"</title>":"",q+=F.text?'<description id="'+_e(F.id)+'">'+_e(F.text)+"</description>":"",q+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',q+='<path d="',u=0;u<D.getModuleCount();u+=1)for(f=u*P+z,Te=0;Te<D.getModuleCount();Te+=1)D.isDark(u,Te)&&(q+="M"+(Te*P+z)+","+f+_);return(q+='" stroke="transparent" fill="black"/>')+"</svg>"},D.createDataURL=function(P,z){P=P||2,z=z===void 0?4*P:z;var F=D.getModuleCount()*P+2*z,K=z,se=F-z;return Ae(F,F,function(Te,u){if(K<=Te&&Te<se&&K<=u&&u<se){var f=Math.floor((Te-K)/P),_=Math.floor((u-K)/P);return D.isDark(_,f)?0:1}return 1})},D.createImgTag=function(P,z,F){P=P||2,z=z===void 0?4*P:z;var K=D.getModuleCount()*P+2*z,se="";return se+="<img",se+=' src="',se+=D.createDataURL(P,z),se+='"',se+=' width="',se+=K,se+='"',se+=' height="',se+=K,se+='"',F&&(se+=' alt="',se+=_e(F),se+='"'),se+"/>"};var _e=function(P){for(var z="",F=0;F<P.length;F+=1){var K=P.charAt(F);switch(K){case"<":z+="&lt;";break;case">":z+="&gt;";break;case"&":z+="&amp;";break;case'"':z+="&quot;";break;default:z+=K}}return z};return D.createASCII=function(P,z){if((P=P||1)<2)return function(be){be=be===void 0?2:be;var Re,Se,Le,Ne,ke,Ge=1*D.getModuleCount()+2*be,Je=be,Ve=Ge-be,xt={"██":"█","█ ":"▀"," █":"▄"," ":" "},vt={"██":"▀","█ ":"▀"," █":" "," ":" "},ut="";for(Re=0;Re<Ge;Re+=2){for(Le=Math.floor((Re-Je)/1),Ne=Math.floor((Re+1-Je)/1),Se=0;Se<Ge;Se+=1)ke="█",Je<=Se&&Se<Ve&&Je<=Re&&Re<Ve&&D.isDark(Le,Math.floor((Se-Je)/1))&&(ke=" "),Je<=Se&&Se<Ve&&Je<=Re+1&&Re+1<Ve&&D.isDark(Ne,Math.floor((Se-Je)/1))?ke+=" ":ke+="█",ut+=be<1&&Re+1>=Ve?vt[ke]:xt[ke];ut+=`
114
+ `}return Ge%2&&be>0?ut.substring(0,ut.length-Ge-1)+Array(Ge+1).join("▀"):ut.substring(0,ut.length-1)}(z);P-=1,z=z===void 0?2*P:z;var F,K,se,Te,u=D.getModuleCount()*P+2*z,f=z,_=u-z,k=Array(P+1).join("██"),q=Array(P+1).join(" "),Q="",Ce="";for(F=0;F<u;F+=1){for(se=Math.floor((F-f)/P),Ce="",K=0;K<u;K+=1)Te=1,f<=K&&K<_&&f<=F&&F<_&&D.isDark(se,Math.floor((K-f)/P))&&(Te=0),Ce+=Te?k:q;for(se=0;se<P;se+=1)Q+=Ce+`
115
+ `}return Q.substring(0,Q.length-1)},D.renderTo2dContext=function(P,z){z=z||2;for(var F=D.getModuleCount(),K=0;K<F;K++)for(var se=0;se<F;se++)P.fillStyle=D.isDark(K,se)?"black":"white",P.fillRect(K*z,se*z,z,z)},D};E.stringToBytes=(E.stringToBytesFuncs={default:function(Y){for(var R=[],A=0;A<Y.length;A+=1){var g=Y.charCodeAt(A);R.push(255&g)}return R}}).default,E.createStringToBytes=function(Y,R){var A=function(){for(var p=Oe(Y),w=function(){var ae=p.read();if(ae==-1)throw"eof";return ae},h=0,v={};;){var D=p.read();if(D==-1)break;var W=w(),V=w()<<8|w();v[String.fromCharCode(D<<8|W)]=V,h+=1}if(h!=R)throw h+" != "+R;return v}(),g=63;return function(p){for(var w=[],h=0;h<p.length;h+=1){var v=p.charCodeAt(h);if(v<128)w.push(v);else{var D=A[p.charAt(h)];typeof D=="number"?(255&D)==D?w.push(D):(w.push(D>>>8),w.push(255&D)):w.push(g)}}return w}};var N,M,I,$,j,J={L:1,M:0,Q:3,H:2},te=(N=[[],[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]],M=1335,I=7973,j=function(Y){for(var R=0;Y!=0;)R+=1,Y>>>=1;return R},($={}).getBCHTypeInfo=function(Y){for(var R=Y<<10;j(R)-j(M)>=0;)R^=M<<j(R)-j(M);return 21522^(Y<<10|R)},$.getBCHTypeNumber=function(Y){for(var R=Y<<12;j(R)-j(I)>=0;)R^=I<<j(R)-j(I);return Y<<12|R},$.getPatternPosition=function(Y){return N[Y-1]},$.getMaskFunction=function(Y){switch(Y){case 0:return function(R,A){return(R+A)%2==0};case 1:return function(R,A){return R%2==0};case 2:return function(R,A){return A%3==0};case 3:return function(R,A){return(R+A)%3==0};case 4:return function(R,A){return(Math.floor(R/2)+Math.floor(A/3))%2==0};case 5:return function(R,A){return R*A%2+R*A%3==0};case 6:return function(R,A){return(R*A%2+R*A%3)%2==0};case 7:return function(R,A){return(R*A%3+(R+A)%2)%2==0};default:throw"bad maskPattern:"+Y}},$.getErrorCorrectPolynomial=function(Y){for(var R=ue([1],0),A=0;A<Y;A+=1)R=R.multiply(ue([1,ne.gexp(A)],0));return R},$.getLengthInBits=function(Y,R){if(1<=R&&R<10)switch(Y){case 1:return 10;case 2:return 9;case 4:case 8:return 8;default:throw"mode:"+Y}else if(R<27)switch(Y){case 1:return 12;case 2:return 11;case 4:return 16;case 8:return 10;default:throw"mode:"+Y}else{if(!(R<41))throw"type:"+R;switch(Y){case 1:return 14;case 2:return 13;case 4:return 16;case 8:return 12;default:throw"mode:"+Y}}},$.getLostPoint=function(Y){for(var R=Y.getModuleCount(),A=0,g=0;g<R;g+=1)for(var p=0;p<R;p+=1){for(var w=0,h=Y.isDark(g,p),v=-1;v<=1;v+=1)if(!(g+v<0||R<=g+v))for(var D=-1;D<=1;D+=1)p+D<0||R<=p+D||v==0&&D==0||h==Y.isDark(g+v,p+D)&&(w+=1);w>5&&(A+=3+w-5)}for(g=0;g<R-1;g+=1)for(p=0;p<R-1;p+=1){var W=0;Y.isDark(g,p)&&(W+=1),Y.isDark(g+1,p)&&(W+=1),Y.isDark(g,p+1)&&(W+=1),Y.isDark(g+1,p+1)&&(W+=1),W!=0&&W!=4||(A+=3)}for(g=0;g<R;g+=1)for(p=0;p<R-6;p+=1)Y.isDark(g,p)&&!Y.isDark(g,p+1)&&Y.isDark(g,p+2)&&Y.isDark(g,p+3)&&Y.isDark(g,p+4)&&!Y.isDark(g,p+5)&&Y.isDark(g,p+6)&&(A+=40);for(p=0;p<R;p+=1)for(g=0;g<R-6;g+=1)Y.isDark(g,p)&&!Y.isDark(g+1,p)&&Y.isDark(g+2,p)&&Y.isDark(g+3,p)&&Y.isDark(g+4,p)&&!Y.isDark(g+5,p)&&Y.isDark(g+6,p)&&(A+=40);var V=0;for(p=0;p<R;p+=1)for(g=0;g<R;g+=1)Y.isDark(g,p)&&(V+=1);return A+Math.abs(100*V/R/R-50)/5*10},$),ne=function(){for(var Y=new Array(256),R=new Array(256),A=0;A<8;A+=1)Y[A]=1<<A;for(A=8;A<256;A+=1)Y[A]=Y[A-4]^Y[A-5]^Y[A-6]^Y[A-8];for(A=0;A<255;A+=1)R[Y[A]]=A;return{glog:function(g){if(g<1)throw"glog("+g+")";return R[g]},gexp:function(g){for(;g<0;)g+=255;for(;g>=256;)g-=255;return Y[g]}}}();function ue(Y,R){if(Y.length===void 0)throw Y.length+"/"+R;var A=function(){for(var p=0;p<Y.length&&Y[p]==0;)p+=1;for(var w=new Array(Y.length-p+R),h=0;h<Y.length-p;h+=1)w[h]=Y[h+p];return w}(),g={getAt:function(p){return A[p]},getLength:function(){return A.length},multiply:function(p){for(var w=new Array(g.getLength()+p.getLength()-1),h=0;h<g.getLength();h+=1)for(var v=0;v<p.getLength();v+=1)w[h+v]^=ne.gexp(ne.glog(g.getAt(h))+ne.glog(p.getAt(v)));return ue(w,0)},mod:function(p){if(g.getLength()-p.getLength()<0)return g;for(var w=ne.glog(g.getAt(0))-ne.glog(p.getAt(0)),h=new Array(g.getLength()),v=0;v<g.getLength();v+=1)h[v]=g.getAt(v);for(v=0;v<p.getLength();v+=1)h[v]^=ne.gexp(ne.glog(p.getAt(v))+w);return ue(h,0).mod(p)}};return g}var Z=function(){var Y=[[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]],R=function(g,p){var w={};return w.totalCount=g,w.dataCount=p,w},A={getRSBlocks:function(g,p){var w=function(we,ee){switch(ee){case J.L:return Y[4*(we-1)+0];case J.M:return Y[4*(we-1)+1];case J.Q:return Y[4*(we-1)+2];case J.H:return Y[4*(we-1)+3];default:return}}(g,p);if(w===void 0)throw"bad rs block @ typeNumber:"+g+"/errorCorrectionLevel:"+p;for(var h=w.length/3,v=[],D=0;D<h;D+=1)for(var W=w[3*D+0],V=w[3*D+1],ae=w[3*D+2],fe=0;fe<W;fe+=1)v.push(R(V,ae));return v}};return A}(),le=function(){var Y=[],R=0,A={getBuffer:function(){return Y},getAt:function(g){var p=Math.floor(g/8);return(Y[p]>>>7-g%8&1)==1},put:function(g,p){for(var w=0;w<p;w+=1)A.putBit((g>>>p-w-1&1)==1)},getLengthInBits:function(){return R},putBit:function(g){var p=Math.floor(R/8);Y.length<=p&&Y.push(0),g&&(Y[p]|=128>>>R%8),R+=1}};return A},oe=function(Y){var R=Y,A={getMode:function(){return 1},getLength:function(w){return R.length},write:function(w){for(var h=R,v=0;v+2<h.length;)w.put(g(h.substring(v,v+3)),10),v+=3;v<h.length&&(h.length-v==1?w.put(g(h.substring(v,v+1)),4):h.length-v==2&&w.put(g(h.substring(v,v+2)),7))}},g=function(w){for(var h=0,v=0;v<w.length;v+=1)h=10*h+p(w.charAt(v));return h},p=function(w){if("0"<=w&&w<="9")return w.charCodeAt(0)-48;throw"illegal char :"+w};return A},X=function(Y){var R=Y,A={getMode:function(){return 2},getLength:function(p){return R.length},write:function(p){for(var w=R,h=0;h+1<w.length;)p.put(45*g(w.charAt(h))+g(w.charAt(h+1)),11),h+=2;h<w.length&&p.put(g(w.charAt(h)),6)}},g=function(p){if("0"<=p&&p<="9")return p.charCodeAt(0)-48;if("A"<=p&&p<="Z")return p.charCodeAt(0)-65+10;switch(p){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 :"+p}};return A},me=function(Y){var R=E.stringToBytes(Y);return{getMode:function(){return 4},getLength:function(A){return R.length},write:function(A){for(var g=0;g<R.length;g+=1)A.put(R[g],8)}}},de=function(Y){var R=E.stringToBytesFuncs.SJIS;if(!R)throw"sjis not supported.";(function(){var p=R("友");if(p.length!=2||(p[0]<<8|p[1])!=38726)throw"sjis not supported."})();var A=R(Y),g={getMode:function(){return 8},getLength:function(p){return~~(A.length/2)},write:function(p){for(var w=A,h=0;h+1<w.length;){var v=(255&w[h])<<8|255&w[h+1];if(33088<=v&&v<=40956)v-=33088;else{if(!(57408<=v&&v<=60351))throw"illegal char at "+(h+1)+"/"+v;v-=49472}v=192*(v>>>8&255)+(255&v),p.put(v,13),h+=2}if(h<w.length)throw"illegal char at "+(h+1)}};return g},re=function(){var Y=[],R={writeByte:function(A){Y.push(255&A)},writeShort:function(A){R.writeByte(A),R.writeByte(A>>>8)},writeBytes:function(A,g,p){g=g||0,p=p||A.length;for(var w=0;w<p;w+=1)R.writeByte(A[w+g])},writeString:function(A){for(var g=0;g<A.length;g+=1)R.writeByte(A.charCodeAt(g))},toByteArray:function(){return Y},toString:function(){var A="";A+="[";for(var g=0;g<Y.length;g+=1)g>0&&(A+=","),A+=Y[g];return A+"]"}};return R},Oe=function(Y){var R=Y,A=0,g=0,p=0,w={read:function(){for(;p<8;){if(A>=R.length){if(p==0)return-1;throw"unexpected end of file./"+p}var v=R.charAt(A);if(A+=1,v=="=")return p=0,-1;v.match(/^\s$/)||(g=g<<6|h(v.charCodeAt(0)),p+=6)}var D=g>>>p-8&255;return p-=8,D}},h=function(v){if(65<=v&&v<=90)return v-65;if(97<=v&&v<=122)return v-97+26;if(48<=v&&v<=57)return v-48+52;if(v==43)return 62;if(v==47)return 63;throw"c:"+v};return w},Ae=function(Y,R,A){for(var g=function(V,ae){var fe=V,we=ae,ee=new Array(V*ae),he={setPixel:function(P,z,F){ee[z*fe+P]=F},write:function(P){P.writeString("GIF87a"),P.writeShort(fe),P.writeShort(we),P.writeByte(128),P.writeByte(0),P.writeByte(0),P.writeByte(0),P.writeByte(0),P.writeByte(0),P.writeByte(255),P.writeByte(255),P.writeByte(255),P.writeString(","),P.writeShort(0),P.writeShort(0),P.writeShort(fe),P.writeShort(we),P.writeByte(0);var z=De(2);P.writeByte(2);for(var F=0;z.length-F>255;)P.writeByte(255),P.writeBytes(z,F,255),F+=255;P.writeByte(z.length-F),P.writeBytes(z,F,z.length-F),P.writeByte(0),P.writeString(";")}},De=function(P){for(var z=1<<P,F=1+(1<<P),K=P+1,se=_e(),Te=0;Te<z;Te+=1)se.add(String.fromCharCode(Te));se.add(String.fromCharCode(z)),se.add(String.fromCharCode(F));var u,f,_,k=re(),q=(u=k,f=0,_=0,{write:function(Re,Se){if(Re>>>Se)throw"length over";for(;f+Se>=8;)u.writeByte(255&(Re<<f|_)),Se-=8-f,Re>>>=8-f,_=0,f=0;_|=Re<<f,f+=Se},flush:function(){f>0&&u.writeByte(_)}});q.write(z,K);var Q=0,Ce=String.fromCharCode(ee[Q]);for(Q+=1;Q<ee.length;){var be=String.fromCharCode(ee[Q]);Q+=1,se.contains(Ce+be)?Ce+=be:(q.write(se.indexOf(Ce),K),se.size()<4095&&(se.size()==1<<K&&(K+=1),se.add(Ce+be)),Ce=be)}return q.write(se.indexOf(Ce),K),q.write(F,K),q.flush(),k.toByteArray()},_e=function(){var P={},z=0,F={add:function(K){if(F.contains(K))throw"dup key:"+K;P[K]=z,z+=1},size:function(){return z},indexOf:function(K){return P[K]},contains:function(K){return P[K]!==void 0}};return F};return he}(Y,R),p=0;p<R;p+=1)for(var w=0;w<Y;w+=1)g.setPixel(w,p,A(w,p));var h=re();g.write(h);for(var v=function(){var V=0,ae=0,fe=0,we="",ee={},he=function(_e){we+=String.fromCharCode(De(63&_e))},De=function(_e){if(!(_e<0)){if(_e<26)return 65+_e;if(_e<52)return _e-26+97;if(_e<62)return _e-52+48;if(_e==62)return 43;if(_e==63)return 47}throw"n:"+_e};return ee.writeByte=function(_e){for(V=V<<8|255&_e,ae+=8,fe+=1;ae>=6;)he(V>>>ae-6),ae-=6},ee.flush=function(){if(ae>0&&(he(V<<6-ae),V=0,ae=0),fe%3!=0)for(var _e=3-fe%3,P=0;P<_e;P+=1)we+="="},ee.toString=function(){return we},ee}(),D=h.toByteArray(),W=0;W<D.length;W+=1)v.writeByte(D[W]);return v.flush(),"data:image/gif;base64,"+v};return E}();O.stringToBytesFuncs["UTF-8"]=function(E){return function(N){for(var M=[],I=0;I<N.length;I++){var $=N.charCodeAt(I);$<128?M.push($):$<2048?M.push(192|$>>6,128|63&$):$<55296||$>=57344?M.push(224|$>>12,128|$>>6&63,128|63&$):(I++,$=65536+((1023&$)<<10|1023&N.charCodeAt(I)),M.push(240|$>>18,128|$>>12&63,128|$>>6&63,128|63&$))}return M}(E)},(C=typeof(x=function(){return O})=="function"?x.apply(c,[]):x)===void 0||(m.exports=C)}},s={};function l(m){var c=s[m];if(c!==void 0)return c.exports;var x=s[m]={exports:{}};return r[m](x,x.exports,l),x.exports}l.n=m=>{var c=m&&m.__esModule?()=>m.default:()=>m;return l.d(c,{a:c}),c},l.d=(m,c)=>{for(var x in c)l.o(c,x)&&!l.o(m,x)&&Object.defineProperty(m,x,{enumerable:!0,get:c[x]})},l.o=(m,c)=>Object.prototype.hasOwnProperty.call(m,c);var d={};return(()=>{l.d(d,{default:()=>R});const m=A=>!!A&&typeof A=="object"&&!Array.isArray(A);function c(A,...g){if(!g.length)return A;const p=g.shift();return p!==void 0&&m(A)&&m(p)?(A=Object.assign({},A),Object.keys(p).forEach(w=>{const h=A[w],v=p[w];Array.isArray(h)&&Array.isArray(v)?A[w]=v:m(h)&&m(v)?A[w]=c(Object.assign({},h),v):A[w]=v}),c(A,...g)):A}function x(A,g){const p=document.createElement("a");p.download=g,p.href=A,document.body.appendChild(p),p.click(),document.body.removeChild(p)}const C={L:.07,M:.15,Q:.25,H:.3};class O{constructor({svg:g,type:p,window:w}){this._svg=g,this._type=p,this._window=w}draw(g,p,w,h){let v;switch(this._type){case"dots":v=this._drawDot;break;case"classy":v=this._drawClassy;break;case"classy-rounded":v=this._drawClassyRounded;break;case"rounded":v=this._drawRounded;break;case"extra-rounded":v=this._drawExtraRounded;break;default:v=this._drawSquare}v.call(this,{x:g,y:p,size:w,getNeighbor:h})}_rotateFigure({x:g,y:p,size:w,rotation:h=0,draw:v}){var D;const W=g+w/2,V=p+w/2;v(),(D=this._element)===null||D===void 0||D.setAttribute("transform",`rotate(${180*h/Math.PI},${W},${V})`)}_basicDot(g){const{size:p,x:w,y:h}=g;this._rotateFigure(Object.assign(Object.assign({},g),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","circle"),this._element.setAttribute("cx",String(w+p/2)),this._element.setAttribute("cy",String(h+p/2)),this._element.setAttribute("r",String(p/2))}}))}_basicSquare(g){const{size:p,x:w,y:h}=g;this._rotateFigure(Object.assign(Object.assign({},g),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","rect"),this._element.setAttribute("x",String(w)),this._element.setAttribute("y",String(h)),this._element.setAttribute("width",String(p)),this._element.setAttribute("height",String(p))}}))}_basicSideRounded(g){const{size:p,x:w,y:h}=g;this._rotateFigure(Object.assign(Object.assign({},g),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",`M ${w} ${h}v ${p}h `+p/2+`a ${p/2} ${p/2}, 0, 0, 0, 0 ${-p}`)}}))}_basicCornerRounded(g){const{size:p,x:w,y:h}=g;this._rotateFigure(Object.assign(Object.assign({},g),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",`M ${w} ${h}v ${p}h ${p}v `+-p/2+`a ${p/2} ${p/2}, 0, 0, 0, ${-p/2} ${-p/2}`)}}))}_basicCornerExtraRounded(g){const{size:p,x:w,y:h}=g;this._rotateFigure(Object.assign(Object.assign({},g),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",`M ${w} ${h}v ${p}h ${p}a ${p} ${p}, 0, 0, 0, ${-p} ${-p}`)}}))}_basicCornersRounded(g){const{size:p,x:w,y:h}=g;this._rotateFigure(Object.assign(Object.assign({},g),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",`M ${w} ${h}v `+p/2+`a ${p/2} ${p/2}, 0, 0, 0, ${p/2} ${p/2}h `+p/2+"v "+-p/2+`a ${p/2} ${p/2}, 0, 0, 0, ${-p/2} ${-p/2}`)}}))}_drawDot({x:g,y:p,size:w}){this._basicDot({x:g,y:p,size:w,rotation:0})}_drawSquare({x:g,y:p,size:w}){this._basicSquare({x:g,y:p,size:w,rotation:0})}_drawRounded({x:g,y:p,size:w,getNeighbor:h}){const v=h?+h(-1,0):0,D=h?+h(1,0):0,W=h?+h(0,-1):0,V=h?+h(0,1):0,ae=v+D+W+V;if(ae!==0)if(ae>2||v&&D||W&&V)this._basicSquare({x:g,y:p,size:w,rotation:0});else{if(ae===2){let fe=0;return v&&W?fe=Math.PI/2:W&&D?fe=Math.PI:D&&V&&(fe=-Math.PI/2),void this._basicCornerRounded({x:g,y:p,size:w,rotation:fe})}if(ae===1){let fe=0;return W?fe=Math.PI/2:D?fe=Math.PI:V&&(fe=-Math.PI/2),void this._basicSideRounded({x:g,y:p,size:w,rotation:fe})}}else this._basicDot({x:g,y:p,size:w,rotation:0})}_drawExtraRounded({x:g,y:p,size:w,getNeighbor:h}){const v=h?+h(-1,0):0,D=h?+h(1,0):0,W=h?+h(0,-1):0,V=h?+h(0,1):0,ae=v+D+W+V;if(ae!==0)if(ae>2||v&&D||W&&V)this._basicSquare({x:g,y:p,size:w,rotation:0});else{if(ae===2){let fe=0;return v&&W?fe=Math.PI/2:W&&D?fe=Math.PI:D&&V&&(fe=-Math.PI/2),void this._basicCornerExtraRounded({x:g,y:p,size:w,rotation:fe})}if(ae===1){let fe=0;return W?fe=Math.PI/2:D?fe=Math.PI:V&&(fe=-Math.PI/2),void this._basicSideRounded({x:g,y:p,size:w,rotation:fe})}}else this._basicDot({x:g,y:p,size:w,rotation:0})}_drawClassy({x:g,y:p,size:w,getNeighbor:h}){const v=h?+h(-1,0):0,D=h?+h(1,0):0,W=h?+h(0,-1):0,V=h?+h(0,1):0;v+D+W+V!==0?v||W?D||V?this._basicSquare({x:g,y:p,size:w,rotation:0}):this._basicCornerRounded({x:g,y:p,size:w,rotation:Math.PI/2}):this._basicCornerRounded({x:g,y:p,size:w,rotation:-Math.PI/2}):this._basicCornersRounded({x:g,y:p,size:w,rotation:Math.PI/2})}_drawClassyRounded({x:g,y:p,size:w,getNeighbor:h}){const v=h?+h(-1,0):0,D=h?+h(1,0):0,W=h?+h(0,-1):0,V=h?+h(0,1):0;v+D+W+V!==0?v||W?D||V?this._basicSquare({x:g,y:p,size:w,rotation:0}):this._basicCornerExtraRounded({x:g,y:p,size:w,rotation:Math.PI/2}):this._basicCornerExtraRounded({x:g,y:p,size:w,rotation:-Math.PI/2}):this._basicCornersRounded({x:g,y:p,size:w,rotation:Math.PI/2})}}const E={dot:"dot",square:"square",extraRounded:"extra-rounded"},N=Object.values(E);class M{constructor({svg:g,type:p,window:w}){this._svg=g,this._type=p,this._window=w}draw(g,p,w,h){let v;switch(this._type){case E.square:v=this._drawSquare;break;case E.extraRounded:v=this._drawExtraRounded;break;default:v=this._drawDot}v.call(this,{x:g,y:p,size:w,rotation:h})}_rotateFigure({x:g,y:p,size:w,rotation:h=0,draw:v}){var D;const W=g+w/2,V=p+w/2;v(),(D=this._element)===null||D===void 0||D.setAttribute("transform",`rotate(${180*h/Math.PI},${W},${V})`)}_basicDot(g){const{size:p,x:w,y:h}=g,v=p/7;this._rotateFigure(Object.assign(Object.assign({},g),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("clip-rule","evenodd"),this._element.setAttribute("d",`M ${w+p/2} ${h}a ${p/2} ${p/2} 0 1 0 0.1 0zm 0 ${v}a ${p/2-v} ${p/2-v} 0 1 1 -0.1 0Z`)}}))}_basicSquare(g){const{size:p,x:w,y:h}=g,v=p/7;this._rotateFigure(Object.assign(Object.assign({},g),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("clip-rule","evenodd"),this._element.setAttribute("d",`M ${w} ${h}v ${p}h ${p}v `+-p+`zM ${w+v} ${h+v}h `+(p-2*v)+"v "+(p-2*v)+"h "+(2*v-p)+"z")}}))}_basicExtraRounded(g){const{size:p,x:w,y:h}=g,v=p/7;this._rotateFigure(Object.assign(Object.assign({},g),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("clip-rule","evenodd"),this._element.setAttribute("d",`M ${w} ${h+2.5*v}v `+2*v+`a ${2.5*v} ${2.5*v}, 0, 0, 0, ${2.5*v} ${2.5*v}h `+2*v+`a ${2.5*v} ${2.5*v}, 0, 0, 0, ${2.5*v} ${2.5*-v}v `+-2*v+`a ${2.5*v} ${2.5*v}, 0, 0, 0, ${2.5*-v} ${2.5*-v}h `+-2*v+`a ${2.5*v} ${2.5*v}, 0, 0, 0, ${2.5*-v} ${2.5*v}M ${w+2.5*v} ${h+v}h `+2*v+`a ${1.5*v} ${1.5*v}, 0, 0, 1, ${1.5*v} ${1.5*v}v `+2*v+`a ${1.5*v} ${1.5*v}, 0, 0, 1, ${1.5*-v} ${1.5*v}h `+-2*v+`a ${1.5*v} ${1.5*v}, 0, 0, 1, ${1.5*-v} ${1.5*-v}v `+-2*v+`a ${1.5*v} ${1.5*v}, 0, 0, 1, ${1.5*v} ${1.5*-v}`)}}))}_drawDot({x:g,y:p,size:w,rotation:h}){this._basicDot({x:g,y:p,size:w,rotation:h})}_drawSquare({x:g,y:p,size:w,rotation:h}){this._basicSquare({x:g,y:p,size:w,rotation:h})}_drawExtraRounded({x:g,y:p,size:w,rotation:h}){this._basicExtraRounded({x:g,y:p,size:w,rotation:h})}}const I={dot:"dot",square:"square"},$=Object.values(I);class j{constructor({svg:g,type:p,window:w}){this._svg=g,this._type=p,this._window=w}draw(g,p,w,h){let v;v=this._type===I.square?this._drawSquare:this._drawDot,v.call(this,{x:g,y:p,size:w,rotation:h})}_rotateFigure({x:g,y:p,size:w,rotation:h=0,draw:v}){var D;const W=g+w/2,V=p+w/2;v(),(D=this._element)===null||D===void 0||D.setAttribute("transform",`rotate(${180*h/Math.PI},${W},${V})`)}_basicDot(g){const{size:p,x:w,y:h}=g;this._rotateFigure(Object.assign(Object.assign({},g),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","circle"),this._element.setAttribute("cx",String(w+p/2)),this._element.setAttribute("cy",String(h+p/2)),this._element.setAttribute("r",String(p/2))}}))}_basicSquare(g){const{size:p,x:w,y:h}=g;this._rotateFigure(Object.assign(Object.assign({},g),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","rect"),this._element.setAttribute("x",String(w)),this._element.setAttribute("y",String(h)),this._element.setAttribute("width",String(p)),this._element.setAttribute("height",String(p))}}))}_drawDot({x:g,y:p,size:w,rotation:h}){this._basicDot({x:g,y:p,size:w,rotation:h})}_drawSquare({x:g,y:p,size:w,rotation:h}){this._basicSquare({x:g,y:p,size:w,rotation:h})}}const J="circle",te=[[1,1,1,1,1,1,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,1,1,1,1,1,1]],ne=[[0,0,0,0,0,0,0],[0,0,0,0,0,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,0,0,0,0,0],[0,0,0,0,0,0,0]];class ue{constructor(g,p){this._roundSize=w=>this._options.dotsOptions.roundSize?Math.floor(w):w,this._window=p,this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("width",String(g.width)),this._element.setAttribute("height",String(g.height)),this._element.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),g.dotsOptions.roundSize||this._element.setAttribute("shape-rendering","crispEdges"),this._element.setAttribute("viewBox",`0 0 ${g.width} ${g.height}`),this._defs=this._window.document.createElementNS("http://www.w3.org/2000/svg","defs"),this._element.appendChild(this._defs),this._imageUri=g.image,this._instanceId=ue.instanceCount++,this._options=g}get width(){return this._options.width}get height(){return this._options.height}getElement(){return this._element}async drawQR(g){const p=g.getModuleCount(),w=Math.min(this._options.width,this._options.height)-2*this._options.margin,h=this._options.shape===J?w/Math.sqrt(2):w,v=this._roundSize(h/p);let D={hideXDots:0,hideYDots:0,width:0,height:0};if(this._qr=g,this._options.image){if(await this.loadImage(),!this._image)return;const{imageOptions:W,qrOptions:V}=this._options,ae=W.imageSize*C[V.errorCorrectionLevel],fe=Math.floor(ae*p*p);D=function({originalHeight:we,originalWidth:ee,maxHiddenDots:he,maxHiddenAxisDots:De,dotSize:_e}){const P={x:0,y:0},z={x:0,y:0};if(we<=0||ee<=0||he<=0||_e<=0)return{height:0,width:0,hideYDots:0,hideXDots:0};const F=we/ee;return P.x=Math.floor(Math.sqrt(he/F)),P.x<=0&&(P.x=1),De&&De<P.x&&(P.x=De),P.x%2==0&&P.x--,z.x=P.x*_e,P.y=1+2*Math.ceil((P.x*F-1)/2),z.y=Math.round(z.x*F),(P.y*P.x>he||De&&De<P.y)&&(De&&De<P.y?(P.y=De,P.y%2==0&&P.x--):P.y-=2,z.y=P.y*_e,P.x=1+2*Math.ceil((P.y/F-1)/2),z.x=Math.round(z.y/F)),{height:z.y,width:z.x,hideYDots:P.y,hideXDots:P.x}}({originalWidth:this._image.width,originalHeight:this._image.height,maxHiddenDots:fe,maxHiddenAxisDots:p-14,dotSize:v})}this.drawBackground(),this.drawDots((W,V)=>{var ae,fe,we,ee,he,De;return!(this._options.imageOptions.hideBackgroundDots&&W>=(p-D.hideYDots)/2&&W<(p+D.hideYDots)/2&&V>=(p-D.hideXDots)/2&&V<(p+D.hideXDots)/2||!((ae=te[W])===null||ae===void 0)&&ae[V]||!((fe=te[W-p+7])===null||fe===void 0)&&fe[V]||!((we=te[W])===null||we===void 0)&&we[V-p+7]||!((ee=ne[W])===null||ee===void 0)&&ee[V]||!((he=ne[W-p+7])===null||he===void 0)&&he[V]||!((De=ne[W])===null||De===void 0)&&De[V-p+7])}),this.drawCorners(),this._options.image&&await this.drawImage({width:D.width,height:D.height,count:p,dotSize:v})}drawBackground(){var g,p,w;const h=this._element,v=this._options;if(h){const D=(g=v.backgroundOptions)===null||g===void 0?void 0:g.gradient,W=(p=v.backgroundOptions)===null||p===void 0?void 0:p.color;let V=v.height,ae=v.width;if(D||W){const fe=this._window.document.createElementNS("http://www.w3.org/2000/svg","rect");this._backgroundClipPath=this._window.document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._backgroundClipPath.setAttribute("id",`clip-path-background-color-${this._instanceId}`),this._defs.appendChild(this._backgroundClipPath),!((w=v.backgroundOptions)===null||w===void 0)&&w.round&&(V=ae=Math.min(v.width,v.height),fe.setAttribute("rx",String(V/2*v.backgroundOptions.round))),fe.setAttribute("x",String(this._roundSize((v.width-ae)/2))),fe.setAttribute("y",String(this._roundSize((v.height-V)/2))),fe.setAttribute("width",String(ae)),fe.setAttribute("height",String(V)),this._backgroundClipPath.appendChild(fe),this._createColor({options:D,color:W,additionalRotation:0,x:0,y:0,height:v.height,width:v.width,name:`background-color-${this._instanceId}`})}}}drawDots(g){var p,w;if(!this._qr)throw"QR code is not defined";const h=this._options,v=this._qr.getModuleCount();if(v>h.width||v>h.height)throw"The canvas is too small.";const D=Math.min(h.width,h.height)-2*h.margin,W=h.shape===J?D/Math.sqrt(2):D,V=this._roundSize(W/v),ae=this._roundSize((h.width-v*V)/2),fe=this._roundSize((h.height-v*V)/2),we=new O({svg:this._element,type:h.dotsOptions.type,window:this._window});this._dotsClipPath=this._window.document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._dotsClipPath.setAttribute("id",`clip-path-dot-color-${this._instanceId}`),this._defs.appendChild(this._dotsClipPath),this._createColor({options:(p=h.dotsOptions)===null||p===void 0?void 0:p.gradient,color:h.dotsOptions.color,additionalRotation:0,x:0,y:0,height:h.height,width:h.width,name:`dot-color-${this._instanceId}`});for(let ee=0;ee<v;ee++)for(let he=0;he<v;he++)g&&!g(ee,he)||!((w=this._qr)===null||w===void 0)&&w.isDark(ee,he)&&(we.draw(ae+he*V,fe+ee*V,V,(De,_e)=>!(he+De<0||ee+_e<0||he+De>=v||ee+_e>=v)&&!(g&&!g(ee+_e,he+De))&&!!this._qr&&this._qr.isDark(ee+_e,he+De)),we._element&&this._dotsClipPath&&this._dotsClipPath.appendChild(we._element));if(h.shape===J){const ee=this._roundSize((D/V-v)/2),he=v+2*ee,De=ae-ee*V,_e=fe-ee*V,P=[],z=this._roundSize(he/2);for(let F=0;F<he;F++){P[F]=[];for(let K=0;K<he;K++)F>=ee-1&&F<=he-ee&&K>=ee-1&&K<=he-ee||Math.sqrt((F-z)*(F-z)+(K-z)*(K-z))>z?P[F][K]=0:P[F][K]=this._qr.isDark(K-2*ee<0?K:K>=v?K-2*ee:K-ee,F-2*ee<0?F:F>=v?F-2*ee:F-ee)?1:0}for(let F=0;F<he;F++)for(let K=0;K<he;K++)P[F][K]&&(we.draw(De+K*V,_e+F*V,V,(se,Te)=>{var u;return!!(!((u=P[F+Te])===null||u===void 0)&&u[K+se])}),we._element&&this._dotsClipPath&&this._dotsClipPath.appendChild(we._element))}}drawCorners(){if(!this._qr)throw"QR code is not defined";const g=this._element,p=this._options;if(!g)throw"Element code is not defined";const w=this._qr.getModuleCount(),h=Math.min(p.width,p.height)-2*p.margin,v=p.shape===J?h/Math.sqrt(2):h,D=this._roundSize(v/w),W=7*D,V=3*D,ae=this._roundSize((p.width-w*D)/2),fe=this._roundSize((p.height-w*D)/2);[[0,0,0],[1,0,Math.PI/2],[0,1,-Math.PI/2]].forEach(([we,ee,he])=>{var De,_e,P,z,F,K,se,Te,u,f,_,k,q,Q;const Ce=ae+we*D*(w-7),be=fe+ee*D*(w-7);let Re=this._dotsClipPath,Se=this._dotsClipPath;if((!((De=p.cornersSquareOptions)===null||De===void 0)&&De.gradient||!((_e=p.cornersSquareOptions)===null||_e===void 0)&&_e.color)&&(Re=this._window.document.createElementNS("http://www.w3.org/2000/svg","clipPath"),Re.setAttribute("id",`clip-path-corners-square-color-${we}-${ee}-${this._instanceId}`),this._defs.appendChild(Re),this._cornersSquareClipPath=this._cornersDotClipPath=Se=Re,this._createColor({options:(P=p.cornersSquareOptions)===null||P===void 0?void 0:P.gradient,color:(z=p.cornersSquareOptions)===null||z===void 0?void 0:z.color,additionalRotation:he,x:Ce,y:be,height:W,width:W,name:`corners-square-color-${we}-${ee}-${this._instanceId}`})),((F=p.cornersSquareOptions)===null||F===void 0?void 0:F.type)&&N.includes(p.cornersSquareOptions.type)){const Le=new M({svg:this._element,type:p.cornersSquareOptions.type,window:this._window});Le.draw(Ce,be,W,he),Le._element&&Re&&Re.appendChild(Le._element)}else{const Le=new O({svg:this._element,type:((K=p.cornersSquareOptions)===null||K===void 0?void 0:K.type)||p.dotsOptions.type,window:this._window});for(let Ne=0;Ne<te.length;Ne++)for(let ke=0;ke<te[Ne].length;ke++)!((se=te[Ne])===null||se===void 0)&&se[ke]&&(Le.draw(Ce+ke*D,be+Ne*D,D,(Ge,Je)=>{var Ve;return!!(!((Ve=te[Ne+Je])===null||Ve===void 0)&&Ve[ke+Ge])}),Le._element&&Re&&Re.appendChild(Le._element))}if((!((Te=p.cornersDotOptions)===null||Te===void 0)&&Te.gradient||!((u=p.cornersDotOptions)===null||u===void 0)&&u.color)&&(Se=this._window.document.createElementNS("http://www.w3.org/2000/svg","clipPath"),Se.setAttribute("id",`clip-path-corners-dot-color-${we}-${ee}-${this._instanceId}`),this._defs.appendChild(Se),this._cornersDotClipPath=Se,this._createColor({options:(f=p.cornersDotOptions)===null||f===void 0?void 0:f.gradient,color:(_=p.cornersDotOptions)===null||_===void 0?void 0:_.color,additionalRotation:he,x:Ce+2*D,y:be+2*D,height:V,width:V,name:`corners-dot-color-${we}-${ee}-${this._instanceId}`})),((k=p.cornersDotOptions)===null||k===void 0?void 0:k.type)&&$.includes(p.cornersDotOptions.type)){const Le=new j({svg:this._element,type:p.cornersDotOptions.type,window:this._window});Le.draw(Ce+2*D,be+2*D,V,he),Le._element&&Se&&Se.appendChild(Le._element)}else{const Le=new O({svg:this._element,type:((q=p.cornersDotOptions)===null||q===void 0?void 0:q.type)||p.dotsOptions.type,window:this._window});for(let Ne=0;Ne<ne.length;Ne++)for(let ke=0;ke<ne[Ne].length;ke++)!((Q=ne[Ne])===null||Q===void 0)&&Q[ke]&&(Le.draw(Ce+ke*D,be+Ne*D,D,(Ge,Je)=>{var Ve;return!!(!((Ve=ne[Ne+Je])===null||Ve===void 0)&&Ve[ke+Ge])}),Le._element&&Se&&Se.appendChild(Le._element))}})}loadImage(){return new Promise((g,p)=>{var w;const h=this._options;if(!h.image)return p("Image is not defined");if(!((w=h.nodeCanvas)===null||w===void 0)&&w.loadImage)h.nodeCanvas.loadImage(h.image).then(v=>{var D,W;if(this._image=v,this._options.imageOptions.saveAsBlob){const V=(D=h.nodeCanvas)===null||D===void 0?void 0:D.createCanvas(this._image.width,this._image.height);(W=V==null?void 0:V.getContext("2d"))===null||W===void 0||W.drawImage(v,0,0),this._imageUri=V==null?void 0:V.toDataURL()}g()}).catch(p);else{const v=new this._window.Image;typeof h.imageOptions.crossOrigin=="string"&&(v.crossOrigin=h.imageOptions.crossOrigin),this._image=v,v.onload=async()=>{this._options.imageOptions.saveAsBlob&&(this._imageUri=await async function(D,W){return new Promise(V=>{const ae=new W.XMLHttpRequest;ae.onload=function(){const fe=new W.FileReader;fe.onloadend=function(){V(fe.result)},fe.readAsDataURL(ae.response)},ae.open("GET",D),ae.responseType="blob",ae.send()})}(h.image||"",this._window)),g()},v.src=h.image}})}async drawImage({width:g,height:p,count:w,dotSize:h}){const v=this._options,D=this._roundSize((v.width-w*h)/2),W=this._roundSize((v.height-w*h)/2),V=D+this._roundSize(v.imageOptions.margin+(w*h-g)/2),ae=W+this._roundSize(v.imageOptions.margin+(w*h-p)/2),fe=g-2*v.imageOptions.margin,we=p-2*v.imageOptions.margin,ee=this._window.document.createElementNS("http://www.w3.org/2000/svg","image");ee.setAttribute("href",this._imageUri||""),ee.setAttribute("xlink:href",this._imageUri||""),ee.setAttribute("x",String(V)),ee.setAttribute("y",String(ae)),ee.setAttribute("width",`${fe}px`),ee.setAttribute("height",`${we}px`),this._element.appendChild(ee)}_createColor({options:g,color:p,additionalRotation:w,x:h,y:v,height:D,width:W,name:V}){const ae=W>D?W:D,fe=this._window.document.createElementNS("http://www.w3.org/2000/svg","rect");if(fe.setAttribute("x",String(h)),fe.setAttribute("y",String(v)),fe.setAttribute("height",String(D)),fe.setAttribute("width",String(W)),fe.setAttribute("clip-path",`url('#clip-path-${V}')`),g){let we;if(g.type==="radial")we=this._window.document.createElementNS("http://www.w3.org/2000/svg","radialGradient"),we.setAttribute("id",V),we.setAttribute("gradientUnits","userSpaceOnUse"),we.setAttribute("fx",String(h+W/2)),we.setAttribute("fy",String(v+D/2)),we.setAttribute("cx",String(h+W/2)),we.setAttribute("cy",String(v+D/2)),we.setAttribute("r",String(ae/2));else{const ee=((g.rotation||0)+w)%(2*Math.PI),he=(ee+2*Math.PI)%(2*Math.PI);let De=h+W/2,_e=v+D/2,P=h+W/2,z=v+D/2;he>=0&&he<=.25*Math.PI||he>1.75*Math.PI&&he<=2*Math.PI?(De-=W/2,_e-=D/2*Math.tan(ee),P+=W/2,z+=D/2*Math.tan(ee)):he>.25*Math.PI&&he<=.75*Math.PI?(_e-=D/2,De-=W/2/Math.tan(ee),z+=D/2,P+=W/2/Math.tan(ee)):he>.75*Math.PI&&he<=1.25*Math.PI?(De+=W/2,_e+=D/2*Math.tan(ee),P-=W/2,z-=D/2*Math.tan(ee)):he>1.25*Math.PI&&he<=1.75*Math.PI&&(_e+=D/2,De+=W/2/Math.tan(ee),z-=D/2,P-=W/2/Math.tan(ee)),we=this._window.document.createElementNS("http://www.w3.org/2000/svg","linearGradient"),we.setAttribute("id",V),we.setAttribute("gradientUnits","userSpaceOnUse"),we.setAttribute("x1",String(Math.round(De))),we.setAttribute("y1",String(Math.round(_e))),we.setAttribute("x2",String(Math.round(P))),we.setAttribute("y2",String(Math.round(z)))}g.colorStops.forEach(({offset:ee,color:he})=>{const De=this._window.document.createElementNS("http://www.w3.org/2000/svg","stop");De.setAttribute("offset",100*ee+"%"),De.setAttribute("stop-color",he),we.appendChild(De)}),fe.setAttribute("fill",`url('#${V}')`),this._defs.appendChild(we)}else p&&fe.setAttribute("fill",p);this._element.appendChild(fe)}}ue.instanceCount=0;const Z=ue,le="canvas",oe={};for(let A=0;A<=40;A++)oe[A]=A;const X={type:le,shape:"square",width:300,height:300,data:"",margin:0,qrOptions:{typeNumber:oe[0],mode:void 0,errorCorrectionLevel:"Q"},imageOptions:{saveAsBlob:!0,hideBackgroundDots:!0,imageSize:.4,crossOrigin:void 0,margin:0},dotsOptions:{type:"square",color:"#000",roundSize:!0},backgroundOptions:{round:0,color:"#fff"}};function me(A){const g=Object.assign({},A);if(!g.colorStops||!g.colorStops.length)throw"Field 'colorStops' is required in gradient";return g.rotation?g.rotation=Number(g.rotation):g.rotation=0,g.colorStops=g.colorStops.map(p=>Object.assign(Object.assign({},p),{offset:Number(p.offset)})),g}function de(A){const g=Object.assign({},A);return g.width=Number(g.width),g.height=Number(g.height),g.margin=Number(g.margin),g.imageOptions=Object.assign(Object.assign({},g.imageOptions),{hideBackgroundDots:!!g.imageOptions.hideBackgroundDots,imageSize:Number(g.imageOptions.imageSize),margin:Number(g.imageOptions.margin)}),g.margin>Math.min(g.width,g.height)&&(g.margin=Math.min(g.width,g.height)),g.dotsOptions=Object.assign({},g.dotsOptions),g.dotsOptions.gradient&&(g.dotsOptions.gradient=me(g.dotsOptions.gradient)),g.cornersSquareOptions&&(g.cornersSquareOptions=Object.assign({},g.cornersSquareOptions),g.cornersSquareOptions.gradient&&(g.cornersSquareOptions.gradient=me(g.cornersSquareOptions.gradient))),g.cornersDotOptions&&(g.cornersDotOptions=Object.assign({},g.cornersDotOptions),g.cornersDotOptions.gradient&&(g.cornersDotOptions.gradient=me(g.cornersDotOptions.gradient))),g.backgroundOptions&&(g.backgroundOptions=Object.assign({},g.backgroundOptions),g.backgroundOptions.gradient&&(g.backgroundOptions.gradient=me(g.backgroundOptions.gradient))),g}var re=l(873),Oe=l.n(re);function Ae(A){if(!A)throw new Error("Extension must be defined");A[0]==="."&&(A=A.substring(1));const g={bmp:"image/bmp",gif:"image/gif",ico:"image/vnd.microsoft.icon",jpeg:"image/jpeg",jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",tif:"image/tiff",tiff:"image/tiff",webp:"image/webp",pdf:"application/pdf"}[A.toLowerCase()];if(!g)throw new Error(`Extension "${A}" is not supported`);return g}class Y{constructor(g){g!=null&&g.jsdom?this._window=new g.jsdom("",{resources:"usable"}).window:this._window=window,this._options=g?de(c(X,g)):X,this.update()}static _clearContainer(g){g&&(g.innerHTML="")}_setupSvg(){if(!this._qr)return;const g=new Z(this._options,this._window);this._svg=g.getElement(),this._svgDrawingPromise=g.drawQR(this._qr).then(()=>{var p;this._svg&&((p=this._extension)===null||p===void 0||p.call(this,g.getElement(),this._options))})}_setupCanvas(){var g,p;this._qr&&(!((g=this._options.nodeCanvas)===null||g===void 0)&&g.createCanvas?(this._nodeCanvas=this._options.nodeCanvas.createCanvas(this._options.width,this._options.height),this._nodeCanvas.width=this._options.width,this._nodeCanvas.height=this._options.height):(this._domCanvas=document.createElement("canvas"),this._domCanvas.width=this._options.width,this._domCanvas.height=this._options.height),this._setupSvg(),this._canvasDrawingPromise=(p=this._svgDrawingPromise)===null||p===void 0?void 0:p.then(()=>{var w;if(!this._svg)return;const h=this._svg,v=new this._window.XMLSerializer().serializeToString(h),D=btoa(v),W=`data:${Ae("svg")};base64,${D}`;if(!((w=this._options.nodeCanvas)===null||w===void 0)&&w.loadImage)return this._options.nodeCanvas.loadImage(W).then(V=>{var ae,fe;V.width=this._options.width,V.height=this._options.height,(fe=(ae=this._nodeCanvas)===null||ae===void 0?void 0:ae.getContext("2d"))===null||fe===void 0||fe.drawImage(V,0,0)});{const V=new this._window.Image;return new Promise(ae=>{V.onload=()=>{var fe,we;(we=(fe=this._domCanvas)===null||fe===void 0?void 0:fe.getContext("2d"))===null||we===void 0||we.drawImage(V,0,0),ae()},V.src=W})}}))}async _getElement(g="png"){if(!this._qr)throw"QR code is empty";return g.toLowerCase()==="svg"?(this._svg&&this._svgDrawingPromise||this._setupSvg(),await this._svgDrawingPromise,this._svg):((this._domCanvas||this._nodeCanvas)&&this._canvasDrawingPromise||this._setupCanvas(),await this._canvasDrawingPromise,this._domCanvas||this._nodeCanvas)}update(g){Y._clearContainer(this._container),this._options=g?de(c(this._options,g)):this._options,this._options.data&&(this._qr=Oe()(this._options.qrOptions.typeNumber,this._options.qrOptions.errorCorrectionLevel),this._qr.addData(this._options.data,this._options.qrOptions.mode||function(p){switch(!0){case/^[0-9]*$/.test(p):return"Numeric";case/^[0-9A-Z $%*+\-./:]*$/.test(p):return"Alphanumeric";default:return"Byte"}}(this._options.data)),this._qr.make(),this._options.type===le?this._setupCanvas():this._setupSvg(),this.append(this._container))}append(g){if(g){if(typeof g.appendChild!="function")throw"Container should be a single DOM node";this._options.type===le?this._domCanvas&&g.appendChild(this._domCanvas):this._svg&&g.appendChild(this._svg),this._container=g}}applyExtension(g){if(!g)throw"Extension function should be defined.";this._extension=g,this.update()}deleteExtension(){this._extension=void 0,this.update()}async getRawData(g="png"){if(!this._qr)throw"QR code is empty";const p=await this._getElement(g),w=Ae(g);if(!p)return null;if(g.toLowerCase()==="svg"){const h=`<?xml version="1.0" standalone="no"?>\r
116
116
  ${new this._window.XMLSerializer().serializeToString(p)}`;return typeof Blob>"u"||this._options.jsdom?Buffer.from(h):new Blob([h],{type:w})}return new Promise(h=>{const v=p;if("toBuffer"in v)if(w==="image/png")h(v.toBuffer(w));else if(w==="image/jpeg")h(v.toBuffer(w));else{if(w!=="application/pdf")throw Error("Unsupported extension");h(v.toBuffer(w))}else"toBlob"in v&&v.toBlob(h,w,1)})}async download(g){if(!this._qr)throw"QR code is empty";if(typeof Blob>"u")throw"Cannot download in Node.js, call getRawData instead.";let p="png",w="qr";typeof g=="string"?(p=g,console.warn("Extension is deprecated as argument for 'download' method, please pass object { name: '...', extension: '...' } as argument")):typeof g=="object"&&g!==null&&(g.name&&(w=g.name),g.extension&&(p=g.extension));const h=await this._getElement(p);if(h)if(p.toLowerCase()==="svg"){let v=new XMLSerializer().serializeToString(h);v=`<?xml version="1.0" standalone="no"?>\r
117
- `+v,x(`data:${Se(p)};charset=utf-8,${encodeURIComponent(v)}`,`${w}.svg`)}else x(h.toDataURL(Se(p)),`${w}.${p}`)}}const L=Y})(),d.default})())}(wa)),wa.exports}Pg();const lc=ye.createContext(void 0);function Ng(i){const n=an.c(9),{children:r,baseUrl:s,queryClient:l}=i;let d;n[0]!==s||n[1]!==l?(d={baseUrl:s,queryClient:l},n[0]=s,n[1]=l,n[2]=d):d=n[2];let m;n[3]!==r||n[4]!==l?(m=T.jsx(bl,{client:l,children:r}),n[3]=r,n[4]=l,n[5]=m):m=n[5];let c;return n[6]!==d||n[7]!==m?(c=T.jsx(lc.Provider,{value:d,children:m}),n[6]=d,n[7]=m,n[8]=c):c=n[8],c}function nr(){const i=ye.useContext(lc);if(!i)throw new Error("useDataTable must be used within a DataTableProvider");return i}function $g(){const i=localStorage.getItem("a360.assumed-org");return i?{"X-Assume-Org":i}:{}}async function kr(){return{"Content-Type":"application/json",Authorization:`Bearer ${await Cg()??""}`,...$g()}}async function cc(i){return fetch(i,{method:"GET",headers:await kr()}).then(async n=>{if(n.status>=400)throw await n.text();return n}).then(n=>n.json()).then(n=>n)}async function fc(i,n){return fetch(`${i}/${n}`,{method:"GET",headers:await kr()}).then(async r=>{if(r.status>=400)throw await r.text();return r}).then(r=>r.json()).then(r=>r)}async function hc(i,n){await fetch(`${i}/${n}`,{method:"DELETE",headers:await kr()}).then(async r=>{if(r.status>=400)throw await r.text();return r})}async function dc(i,n){return fetch(i,{method:"POST",headers:await kr(),body:JSON.stringify(n)}).then(async r=>{if(r.status>=400)throw await r.text();return r}).then(r=>r.status==204?n:r.json()).then(r=>r)}async function Bg(i,n,r){return fetch(n,{method:i,headers:await kr(),body:r?JSON.stringify(r):void 0}).then(async s=>{if(s.status>=400)throw await s.text();return s}).then(s=>{if(s.status!=204)return s.json()}).then(s=>s)}async function pc(i,n){return fetch(`${i}/${n.id}`,{method:"PUT",headers:await kr(),body:JSON.stringify(n)}).then(async r=>{if(r.status>=400)throw await r.text();return r}).then(r=>r.status==204?n:r.json()).then(r=>r)}function gc(i,n,r){const s=an.c(13),{baseUrl:l}=nr();let d;if(s[0]!==r||s[1]!==n){let C;s[3]!==r?(C=r==null?void 0:r.toString(),s[3]=r,s[4]=C):C=s[4],d=[...n.map(jg),String(C)],s[0]=r,s[1]=n,s[2]=d}else d=s[2];let m;s[5]!==i||s[6]!==l||s[7]!==r?(m=()=>fc(`${l}${i}`,r),s[5]=i,s[6]=l,s[7]=r,s[8]=m):m=s[8];const c=!!r;let x;return s[9]!==d||s[10]!==m||s[11]!==c?(x={queryKey:d,queryFn:m,enabled:c},s[9]=d,s[10]=m,s[11]=c,s[12]=x):x=s[12],Cl(x)}function jg(i){return i.toString()}function mc(i,n){const r=an.c(8),{baseUrl:s}=nr();let l;r[0]!==n?(l=[...n.map(Yg)],r[0]=n,r[1]=l):l=r[1];let d;r[2]!==i||r[3]!==s?(d=()=>cc(`${s}${i}`),r[2]=i,r[3]=s,r[4]=d):d=r[4];let m;return r[5]!==l||r[6]!==d?(m={queryKey:l,queryFn:d},r[5]=l,r[6]=d,r[7]=m):m=r[7],Cl(m)}function Yg(i){return i.toString()}function vc(i,n){const r=an.c(10),{baseUrl:s,queryClient:l}=nr();let d;r[0]!==n?(d=[...n.map(Fg)],r[0]=n,r[1]=d):d=r[1];let m;r[2]!==i||r[3]!==s?(m=x=>dc(`${s}${i}`,x),r[2]=i,r[3]=s,r[4]=m):m=r[4];let c;return r[5]!==l||r[6]!==n||r[7]!==d||r[8]!==m?(c={mutationKey:d,mutationFn:m,onSettled(){return l.invalidateQueries({queryKey:[...n.map(Ug)]})}},r[5]=l,r[6]=n,r[7]=d,r[8]=m,r[9]=c):c=r[9],ta(c)}function Ug(i){return i.toString()}function Fg(i){return i.toString()}function ba(i,n){const r=an.c(10),{baseUrl:s,queryClient:l}=nr();let d;r[0]!==n?(d=[...n.map(zg)],r[0]=n,r[1]=d):d=r[1];let m;r[2]!==i||r[3]!==s?(m=x=>pc(`${s}${i}`,x),r[2]=i,r[3]=s,r[4]=m):m=r[4];let c;return r[5]!==l||r[6]!==n||r[7]!==d||r[8]!==m?(c={mutationKey:d,mutationFn:m,onSettled(){return l.invalidateQueries({queryKey:[...n.map(Wg)]})}},r[5]=l,r[6]=n,r[7]=d,r[8]=m,r[9]=c):c=r[9],ta(c)}function Wg(i){return i.toString()}function zg(i){return i.toString()}function yc(i,n){const r=an.c(10),{baseUrl:s,queryClient:l}=nr();let d;r[0]!==n?(d=[...n.map(Hg)],r[0]=n,r[1]=d):d=r[1];let m;r[2]!==i||r[3]!==s?(m=x=>hc(`${s}${i}`,x),r[2]=i,r[3]=s,r[4]=m):m=r[4];let c;return r[5]!==l||r[6]!==n||r[7]!==d||r[8]!==m?(c={mutationKey:d,mutationFn:m,onSettled(){return l.invalidateQueries({queryKey:[...n.map(qg)]})}},r[5]=l,r[6]=n,r[7]=d,r[8]=m,r[9]=c):c=r[9],ta(c)}function qg(i){return i.toString()}function Hg(i){return i.toString()}var No={exports:{}},Gg=No.exports,_c;function Vg(){return _c||(_c=1,function(i,n){(function(r,s){i.exports=s()})(Gg,function(){var r=1e3,s=6e4,l=36e5,d="millisecond",m="second",c="minute",x="hour",C="day",O="week",R="month",N="quarter",E="year",I="date",$="Invalid Date",j=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,X=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,te={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(Y){var L=["th","st","nd","rd"],A=Y%100;return"["+Y+(L[(A-20)%10]||L[A]||L[0])+"]"}},ne=function(Y,L,A){var g=String(Y);return!g||g.length>=L?Y:""+Array(L+1-g.length).join(A)+Y},ue={s:ne,z:function(Y){var L=-Y.utcOffset(),A=Math.abs(L),g=Math.floor(A/60),p=A%60;return(L<=0?"+":"-")+ne(g,2,"0")+":"+ne(p,2,"0")},m:function Y(L,A){if(L.date()<A.date())return-Y(A,L);var g=12*(A.year()-L.year())+(A.month()-L.month()),p=L.clone().add(g,R),w=A-p<0,h=L.clone().add(g+(w?-1:1),R);return+(-(g+(A-p)/(w?p-h:h-p))||0)},a:function(Y){return Y<0?Math.ceil(Y)||0:Math.floor(Y)},p:function(Y){return{M:R,y:E,w:O,d:C,D:I,h:x,m:c,s:m,ms:d,Q:N}[Y]||String(Y||"").toLowerCase().replace(/s$/,"")},u:function(Y){return Y===void 0}},V="en",ce={};ce[V]=te;var oe="$isDayjsObject",ee=function(Y){return Y instanceof Ae||!(!Y||!Y[oe])},de=function Y(L,A,g){var p;if(!L)return V;if(typeof L=="string"){var w=L.toLowerCase();ce[w]&&(p=w),A&&(ce[w]=A,p=w);var h=L.split("-");if(!p&&h.length>1)return Y(h[0])}else{var v=L.name;ce[v]=L,p=v}return!g&&p&&(V=p),p||!g&&V},pe=function(Y,L){if(ee(Y))return Y.clone();var A=typeof L=="object"?L:{};return A.date=Y,A.args=arguments,new Ae(A)},re=ue;re.l=de,re.i=ee,re.w=function(Y,L){return pe(Y,{locale:L.$L,utc:L.$u,x:L.$x,$offset:L.$offset})};var Ae=function(){function Y(A){this.$L=de(A.locale,null,!0),this.parse(A),this.$x=this.$x||A.x||{},this[oe]=!0}var L=Y.prototype;return L.parse=function(A){this.$d=function(g){var p=g.date,w=g.utc;if(p===null)return new Date(NaN);if(re.u(p))return new Date;if(p instanceof Date)return new Date(p);if(typeof p=="string"&&!/Z$/i.test(p)){var h=p.match(j);if(h){var v=h[2]-1||0,D=(h[7]||"0").substring(0,3);return w?new Date(Date.UTC(h[1],v,h[3]||1,h[4]||0,h[5]||0,h[6]||0,D)):new Date(h[1],v,h[3]||1,h[4]||0,h[5]||0,h[6]||0,D)}}return new Date(p)}(A),this.init()},L.init=function(){var A=this.$d;this.$y=A.getFullYear(),this.$M=A.getMonth(),this.$D=A.getDate(),this.$W=A.getDay(),this.$H=A.getHours(),this.$m=A.getMinutes(),this.$s=A.getSeconds(),this.$ms=A.getMilliseconds()},L.$utils=function(){return re},L.isValid=function(){return this.$d.toString()!==$},L.isSame=function(A,g){var p=pe(A);return this.startOf(g)<=p&&p<=this.endOf(g)},L.isAfter=function(A,g){return pe(A)<this.startOf(g)},L.isBefore=function(A,g){return this.endOf(g)<pe(A)},L.$g=function(A,g,p){return re.u(A)?this[g]:this.set(p,A)},L.unix=function(){return Math.floor(this.valueOf()/1e3)},L.valueOf=function(){return this.$d.getTime()},L.startOf=function(A,g){var p=this,w=!!re.u(g)||g,h=re.p(A),v=function(he,De){var be=re.w(p.$u?Date.UTC(p.$y,De,he):new Date(p.$y,De,he),p);return w?be:be.endOf(C)},D=function(he,De){return re.w(p.toDate()[he].apply(p.toDate("s"),(w?[0,0,0,0]:[23,59,59,999]).slice(De)),p)},z=this.$W,Z=this.$M,ae=this.$D,fe="set"+(this.$u?"UTC":"");switch(h){case E:return w?v(1,0):v(31,11);case R:return w?v(1,Z):v(0,Z+1);case O:var _e=this.$locale().weekStart||0,J=(z<_e?z+7:z)-_e;return v(w?ae-J:ae+(6-J),Z);case C:case I:return D(fe+"Hours",0);case x:return D(fe+"Minutes",1);case c:return D(fe+"Seconds",2);case m:return D(fe+"Milliseconds",3);default:return this.clone()}},L.endOf=function(A){return this.startOf(A,!1)},L.$set=function(A,g){var p,w=re.p(A),h="set"+(this.$u?"UTC":""),v=(p={},p[C]=h+"Date",p[I]=h+"Date",p[R]=h+"Month",p[E]=h+"FullYear",p[x]=h+"Hours",p[c]=h+"Minutes",p[m]=h+"Seconds",p[d]=h+"Milliseconds",p)[w],D=w===C?this.$D+(g-this.$W):g;if(w===R||w===E){var z=this.clone().set(I,1);z.$d[v](D),z.init(),this.$d=z.set(I,Math.min(this.$D,z.daysInMonth())).$d}else v&&this.$d[v](D);return this.init(),this},L.set=function(A,g){return this.clone().$set(A,g)},L.get=function(A){return this[re.p(A)]()},L.add=function(A,g){var p,w=this;A=Number(A);var h=re.p(g),v=function(Z){var ae=pe(w);return re.w(ae.date(ae.date()+Math.round(Z*A)),w)};if(h===R)return this.set(R,this.$M+A);if(h===E)return this.set(E,this.$y+A);if(h===C)return v(1);if(h===O)return v(7);var D=(p={},p[c]=s,p[x]=l,p[m]=r,p)[h]||1,z=this.$d.getTime()+A*D;return re.w(z,this)},L.subtract=function(A,g){return this.add(-1*A,g)},L.format=function(A){var g=this,p=this.$locale();if(!this.isValid())return p.invalidDate||$;var w=A||"YYYY-MM-DDTHH:mm:ssZ",h=re.z(this),v=this.$H,D=this.$m,z=this.$M,Z=p.weekdays,ae=p.months,fe=p.meridiem,_e=function(De,be,P,q){return De&&(De[be]||De(g,w))||P[be].slice(0,q)},J=function(De){return re.s(v%12||12,De,"0")},he=fe||function(De,be,P){var q=De<12?"AM":"PM";return P?q.toLowerCase():q};return w.replace(X,function(De,be){return be||function(P){switch(P){case"YY":return String(g.$y).slice(-2);case"YYYY":return re.s(g.$y,4,"0");case"M":return z+1;case"MM":return re.s(z+1,2,"0");case"MMM":return _e(p.monthsShort,z,ae,3);case"MMMM":return _e(ae,z);case"D":return g.$D;case"DD":return re.s(g.$D,2,"0");case"d":return String(g.$W);case"dd":return _e(p.weekdaysMin,g.$W,Z,2);case"ddd":return _e(p.weekdaysShort,g.$W,Z,3);case"dddd":return Z[g.$W];case"H":return String(v);case"HH":return re.s(v,2,"0");case"h":return J(1);case"hh":return J(2);case"a":return he(v,D,!0);case"A":return he(v,D,!1);case"m":return String(D);case"mm":return re.s(D,2,"0");case"s":return String(g.$s);case"ss":return re.s(g.$s,2,"0");case"SSS":return re.s(g.$ms,3,"0");case"Z":return h}return null}(De)||h.replace(":","")})},L.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},L.diff=function(A,g,p){var w,h=this,v=re.p(g),D=pe(A),z=(D.utcOffset()-this.utcOffset())*s,Z=this-D,ae=function(){return re.m(h,D)};switch(v){case E:w=ae()/12;break;case R:w=ae();break;case N:w=ae()/3;break;case O:w=(Z-z)/6048e5;break;case C:w=(Z-z)/864e5;break;case x:w=Z/l;break;case c:w=Z/s;break;case m:w=Z/r;break;default:w=Z}return p?w:re.a(w)},L.daysInMonth=function(){return this.endOf(R).$D},L.$locale=function(){return ce[this.$L]},L.locale=function(A,g){if(!A)return this.$L;var p=this.clone(),w=de(A,g,!0);return w&&(p.$L=w),p},L.clone=function(){return re.w(this.$d,this)},L.toDate=function(){return new Date(this.valueOf())},L.toJSON=function(){return this.isValid()?this.toISOString():null},L.toISOString=function(){return this.$d.toISOString()},L.toString=function(){return this.$d.toUTCString()},Y}(),Se=Ae.prototype;return pe.prototype=Se,[["$ms",d],["$s",m],["$m",c],["$H",x],["$W",C],["$M",R],["$y",E],["$D",I]].forEach(function(Y){Se[Y[1]]=function(L){return this.$g(L,Y[0],Y[1])}}),pe.extend=function(Y,L){return Y.$i||(Y(L,Ae,pe),Y.$i=!0),pe},pe.locale=de,pe.isDayjs=ee,pe.unix=function(Y){return pe(1e3*Y)},pe.en=ce[V],pe.Ls=ce,pe.p={},pe})}(No)),No.exports}var Zg=Vg();const Ee=rl(Zg);function Kg({direction:i,levelIndex:n,rowIndex:r,cellIndex:s,size:l}){switch(i){case"up":return n===0&&r===0?null:r===0?{levelIndex:n-1,rowIndex:s<=l[n-1][l[n-1].length-1]-1?l[n-1].length-1:l[n-1].length-2,cellIndex:s}:{levelIndex:n,rowIndex:r-1,cellIndex:s};case"down":return r===l[n].length-1?{levelIndex:n+1,rowIndex:0,cellIndex:s}:r===l[n].length-2&&s>=l[n][l[n].length-1]?{levelIndex:n+1,rowIndex:0,cellIndex:s}:{levelIndex:n,rowIndex:r+1,cellIndex:s};case"left":return n===0&&r===0&&s===0?null:r===0&&s===0?{levelIndex:n-1,rowIndex:l[n-1].length-1,cellIndex:l[n-1][l[n-1].length-1]-1}:s===0?{levelIndex:n,rowIndex:r-1,cellIndex:l[n][r-1]-1}:{levelIndex:n,rowIndex:r,cellIndex:s-1};case"right":return r===l[n].length-1&&s===l[n][r]-1?{levelIndex:n+1,rowIndex:0,cellIndex:0}:s===l[n][r]-1?{levelIndex:n,rowIndex:r+1,cellIndex:0}:{levelIndex:n,rowIndex:r,cellIndex:s+1};default:return{levelIndex:n,rowIndex:r,cellIndex:s}}}function wc({controlsRef:i,direction:n,levelIndex:r,rowIndex:s,cellIndex:l,size:d}){var x,C,O;const m=Kg({direction:n,size:d,rowIndex:s,cellIndex:l,levelIndex:r});if(!m)return;const c=(O=(C=(x=i.current)==null?void 0:x[m.levelIndex])==null?void 0:C[m.rowIndex])==null?void 0:O[m.cellIndex];c&&(c.disabled||c.getAttribute("data-hidden")||c.getAttribute("data-outside")?wc({controlsRef:i,direction:n,levelIndex:m.levelIndex,cellIndex:m.cellIndex,rowIndex:m.rowIndex,size:d}):c.focus())}function Qg(i){switch(i){case"ArrowDown":return"down";case"ArrowUp":return"up";case"ArrowRight":return"right";case"ArrowLeft":return"left";default:return null}}function Jg(i){var n;return(n=i.current)==null?void 0:n.map(r=>r.map(s=>s.length))}function xa({controlsRef:i,levelIndex:n,rowIndex:r,cellIndex:s,event:l}){const d=Qg(l.key);if(d){l.preventDefault();const m=Jg(i);wc({controlsRef:i,direction:d,levelIndex:n,rowIndex:r,cellIndex:s,size:m})}}function cn(i){return i==null||i===""?i:Ee(i).format("YYYY-MM-DD")}function bc(i){return i==null||i===""?i:Ee(i).format("YYYY-MM-DD HH:mm:ss")}const Xg={locale:"en",firstDayOfWeek:1,weekendDays:[0,6],labelSeparator:"–",consistentWeeks:!1},e1=ye.createContext(Xg);function rr(){const i=ye.useContext(e1),n=ye.useCallback(d=>d||i.locale,[i.locale]),r=ye.useCallback(d=>typeof d=="number"?d:i.firstDayOfWeek,[i.firstDayOfWeek]),s=ye.useCallback(d=>Array.isArray(d)?d:i.weekendDays,[i.weekendDays]),l=ye.useCallback(d=>typeof d=="string"?d:i.labelSeparator,[i.labelSeparator]);return{...i,getLocale:n,getFirstDayOfWeek:r,getWeekendDays:s,getLabelSeparator:l}}function t1({value:i,type:n,withTime:r}){const s=r?bc:cn;if(n==="range"&&Array.isArray(i)){const l=s(i[0]),d=s(i[1]);return l?d?`${l} – ${d}`:`${l} –`:""}return n==="multiple"&&Array.isArray(i)?i.filter(Boolean).join(", "):!Array.isArray(i)&&i?s(i):""}function xc({value:i,type:n,name:r,form:s,withTime:l=!1}){return T.jsx("input",{type:"hidden",value:t1({value:i,type:n,withTime:l}),name:r,form:s})}xc.displayName="@mantine/dates/HiddenDatesInput";function Sc(i){var n,r,s="";if(typeof i=="string"||typeof i=="number")s+=i;else if(typeof i=="object")if(Array.isArray(i)){var l=i.length;for(n=0;n<l;n++)i[n]&&(r=Sc(i[n]))&&(s&&(s+=" "),s+=r)}else for(r in i)i[r]&&(s&&(s+=" "),s+=r);return s}function mt(){for(var i,n,r=0,s="",l=arguments.length;r<l;r++)(i=arguments[r])&&(n=Sc(i))&&(s&&(s+=" "),s+=n);return s}var Cc={day:"m_396ce5cb"};const n1={},r1=B.createVarsResolver((i,{size:n})=>({day:{"--day-size":B.getSize(n,"day-size")}})),Sa=B.factory((i,n)=>{const r=B.useProps("Day",n1,i),{classNames:s,className:l,style:d,styles:m,unstyled:c,vars:x,date:C,disabled:O,__staticSelector:R,weekend:N,outside:E,selected:I,renderDay:$,inRange:j,firstInRange:X,lastInRange:te,hidden:ne,static:ue,highlightToday:V,...ce}=r,oe=B.useStyles({name:R||"Day",classes:Cc,props:r,className:l,style:d,classNames:s,styles:m,unstyled:c,vars:x,varsResolver:r1,rootSelector:"day"});return T.jsx(B.UnstyledButton,{...oe("day",{style:ne?{display:"none"}:void 0}),component:ue?"div":"button",ref:n,disabled:O,"data-today":Ee(C).isSame(new Date,"day")||void 0,"data-hidden":ne||void 0,"data-highlight-today":V||void 0,"data-disabled":O||void 0,"data-weekend":!O&&!E&&N||void 0,"data-outside":!O&&E||void 0,"data-selected":!O&&I||void 0,"data-in-range":j&&!O||void 0,"data-first-in-range":X&&!O||void 0,"data-last-in-range":te&&!O||void 0,"data-static":ue||void 0,unstyled:c,...ce,children:($==null?void 0:$(C))||Ee(C).date()})});Sa.classes=Cc,Sa.displayName="@mantine/dates/Day";function i1({locale:i,format:n="dd",firstDayOfWeek:r=1}){const s=Ee().day(r),l=[];for(let d=0;d<7;d+=1)typeof n=="string"?l.push(Ee(s).add(d,"days").locale(i).format(n)):l.push(n(Ee(s).add(d,"days").format("YYYY-MM-DD")));return l}var Ac={weekday:"m_18a3eca"};const o1={},s1=B.createVarsResolver((i,{size:n})=>({weekdaysRow:{"--wr-fz":B.getFontSize(n),"--wr-spacing":B.getSpacing(n)}})),Ca=B.factory((i,n)=>{const r=B.useProps("WeekdaysRow",o1,i),{classNames:s,className:l,style:d,styles:m,unstyled:c,vars:x,locale:C,firstDayOfWeek:O,weekdayFormat:R,cellComponent:N="th",__staticSelector:E,withWeekNumbers:I,...$}=r,j=B.useStyles({name:E||"WeekdaysRow",classes:Ac,props:r,className:l,style:d,classNames:s,styles:m,unstyled:c,vars:x,varsResolver:s1,rootSelector:"weekdaysRow"}),X=rr(),te=i1({locale:X.getLocale(C),format:R,firstDayOfWeek:X.getFirstDayOfWeek(O)}).map((ne,ue)=>T.jsx(N,{...j("weekday"),children:ne},ue));return T.jsxs(B.Box,{component:"tr",ref:n,...j("weekdaysRow"),...$,children:[I&&T.jsx(N,{...j("weekday"),children:"#"}),te]})});Ca.classes=Ac,Ca.displayName="@mantine/dates/WeekdaysRow";function a1(i,n=1){let r=Ee(i);const s=n===0?6:n-1;for(;r.day()!==s;)r=r.add(1,"day");return r.format("YYYY-MM-DD")}function u1(i,n=1){let r=Ee(i);for(;r.day()!==n;)r=r.subtract(1,"day");return r.format("YYYY-MM-DD")}function l1({month:i,firstDayOfWeek:n=1,consistentWeeks:r}){const s=Ee(i).subtract(Ee(i).date()-1,"day"),l=Ee(s.format("YYYY-M-D")),d=l.format("YYYY-MM-DD"),m=l.add(+l.daysInMonth()-1,"day").format("YYYY-MM-DD"),c=a1(m,n),x=[];let C=Ee(u1(d,n));for(;Ee(C).isBefore(c,"day");){const O=[];for(let R=0;R<7;R+=1)O.push(C.format("YYYY-MM-DD")),C=C.add(1,"day");x.push(O)}if(r&&x.length<6){const O=x[x.length-1],R=O[O.length-1];let N=Ee(R).add(1,"day");for(;x.length<6;){const E=[];for(let I=0;I<7;I+=1)E.push(N.format("YYYY-MM-DD")),N=N.add(1,"day");x.push(E)}}return x}function Dc(i,n){return Ee(i).format("YYYY-MM")===Ee(n).format("YYYY-MM")}function Oc(i,n){return n?Ee(i).isAfter(Ee(n).subtract(1,"day"),"day"):!0}function Tc(i,n){return n?Ee(i).isBefore(Ee(n).add(1,"day"),"day"):!0}function c1({dates:i,minDate:n,maxDate:r,getDayProps:s,excludeDate:l,hideOutsideDates:d,month:m}){const c=i.flat().filter(O=>{var R;return Tc(O,r)&&Oc(O,n)&&!(l!=null&&l(O))&&!((R=s==null?void 0:s(O))!=null&&R.disabled)&&(!d||Dc(O,m))}),x=c.find(O=>{var R;return(R=s==null?void 0:s(O))==null?void 0:R.selected});if(x)return x;const C=c.find(O=>Ee().isSame(O,"date"));return C||c[0]}var $o={exports:{}},f1=$o.exports,Mc;function h1(){return Mc||(Mc=1,function(i,n){(function(r,s){i.exports=s()})(f1,function(){var r="day";return function(s,l,d){var m=function(C){return C.add(4-C.isoWeekday(),r)},c=l.prototype;c.isoWeekYear=function(){return m(this).year()},c.isoWeek=function(C){if(!this.$utils().u(C))return this.add(7*(C-this.isoWeek()),r);var O,R,N,E,I=m(this),$=(O=this.isoWeekYear(),R=this.$u,N=(R?d.utc:d)().year(O).startOf("year"),E=4-N.isoWeekday(),N.isoWeekday()>4&&(E+=7),N.add(E,r));return I.diff($,"week")+1},c.isoWeekday=function(C){return this.$utils().u(C)?this.day()||7:this.day(this.day()%7?C:C-7)};var x=c.startOf;c.startOf=function(C,O){var R=this.$utils(),N=!!R.u(O)||O;return R.p(C)==="isoweek"?N?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):x.bind(this)(C,O)}}})}($o)),$o.exports}var d1=h1();const p1=rl(d1);Ee.extend(p1);function g1(i){const n=i.find(r=>Ee(r).day()===1);return Ee(n).isoWeek()}var Ec={month:"m_cc9820d3",monthCell:"m_8f457cd5",weekNumber:"m_6cff9dea"};const m1={withCellSpacing:!0},v1=B.createVarsResolver((i,{size:n})=>({weekNumber:{"--wn-fz":B.getFontSize(n),"--wn-size":B.getSize(n,"wn-size")}})),Bo=B.factory((i,n)=>{const r=B.useProps("Month",m1,i),{classNames:s,className:l,style:d,styles:m,unstyled:c,vars:x,__staticSelector:C,locale:O,firstDayOfWeek:R,weekdayFormat:N,month:E,weekendDays:I,getDayProps:$,excludeDate:j,minDate:X,maxDate:te,renderDay:ne,hideOutsideDates:ue,hideWeekdays:V,getDayAriaLabel:ce,static:oe,__getDayRef:ee,__onDayKeyDown:de,__onDayClick:pe,__onDayMouseEnter:re,__preventFocus:Ae,__stopPropagation:Se,withCellSpacing:Y,size:L,highlightToday:A,withWeekNumbers:g,...p}=r,w=B.useStyles({name:C||"Month",classes:Ec,props:r,className:l,style:d,classNames:s,styles:m,unstyled:c,vars:x,varsResolver:v1,rootSelector:"month"}),h=rr(),v=l1({month:E,firstDayOfWeek:h.getFirstDayOfWeek(R),consistentWeeks:h.consistentWeeks}),D=c1({dates:v,minDate:cn(X),maxDate:cn(te),getDayProps:$,excludeDate:j,hideOutsideDates:ue,month:E}),{resolvedClassNames:z,resolvedStyles:Z}=B.useResolvedStylesApi({classNames:s,styles:m,props:r}),ae=v.map((fe,_e)=>{const J=fe.map((he,De)=>{const be=!Dc(he,E),P=(ce==null?void 0:ce(he))||Ee(he).locale(O||h.locale).format("D MMMM YYYY"),q=$==null?void 0:$(he),F=Ee(he).isSame(D,"date");return T.jsx("td",{...w("monthCell"),"data-with-spacing":Y||void 0,children:T.jsx(Sa,{__staticSelector:C||"Month",classNames:z,styles:Z,unstyled:c,"data-mantine-stop-propagation":Se||void 0,highlightToday:A,renderDay:ne,date:he,size:L,weekend:h.getWeekendDays(I).includes(Ee(he).get("day")),outside:be,hidden:ue?be:!1,"aria-label":P,static:oe,disabled:(j==null?void 0:j(he))||!Tc(he,cn(te))||!Oc(he,cn(X)),ref:K=>ee==null?void 0:ee(_e,De,K),...q,onKeyDown:K=>{var se;(se=q==null?void 0:q.onKeyDown)==null||se.call(q,K),de==null||de(K,{rowIndex:_e,cellIndex:De,date:he})},onMouseEnter:K=>{var se;(se=q==null?void 0:q.onMouseEnter)==null||se.call(q,K),re==null||re(K,he)},onClick:K=>{var se;(se=q==null?void 0:q.onClick)==null||se.call(q,K),pe==null||pe(K,he)},onMouseDown:K=>{var se;(se=q==null?void 0:q.onMouseDown)==null||se.call(q,K),Ae&&K.preventDefault()},tabIndex:Ae||!F?-1:0})},he.toString())});return T.jsxs("tr",{...w("monthRow"),children:[g&&T.jsx("td",{...w("weekNumber"),children:g1(fe)}),J]},_e)});return T.jsxs(B.Box,{component:"table",...w("month"),size:L,ref:n,...p,children:[!V&&T.jsx("thead",{...w("monthThead"),children:T.jsx(Ca,{__staticSelector:C||"Month",locale:O,firstDayOfWeek:R,weekdayFormat:N,size:L,classNames:z,styles:Z,unstyled:c,withWeekNumbers:g})}),T.jsx("tbody",{...w("monthTbody"),children:ae})]})});Bo.classes=Ec,Bo.displayName="@mantine/dates/Month";var Rc={pickerControl:"m_dc6a3c71"};const y1={},_1=B.createVarsResolver((i,{size:n})=>({pickerControl:{"--dpc-fz":B.getFontSize(n),"--dpc-size":B.getSize(n,"dpc-size")}})),jo=B.factory((i,n)=>{const r=B.useProps("PickerControl",y1,i),{classNames:s,className:l,style:d,styles:m,unstyled:c,vars:x,firstInRange:C,lastInRange:O,inRange:R,__staticSelector:N,selected:E,disabled:I,...$}=r,j=B.useStyles({name:N||"PickerControl",classes:Rc,props:r,className:l,style:d,classNames:s,styles:m,unstyled:c,vars:x,varsResolver:_1,rootSelector:"pickerControl"});return T.jsx(B.UnstyledButton,{...j("pickerControl"),ref:n,unstyled:c,"data-picker-control":!0,"data-selected":E&&!I||void 0,"data-disabled":I||void 0,"data-in-range":R&&!I&&!E||void 0,"data-first-in-range":C&&!I||void 0,"data-last-in-range":O&&!I||void 0,disabled:I,...$})});jo.classes=Rc,jo.displayName="@mantine/dates/PickerControl";function Lc({year:i,minDate:n,maxDate:r}){return!n&&!r?!1:!!(n&&Ee(i).isBefore(n,"year")||r&&Ee(i).isAfter(r,"year"))}function w1({years:i,minDate:n,maxDate:r,getYearControlProps:s}){const l=i.flat().filter(c=>{var x;return!Lc({year:c,minDate:n,maxDate:r})&&!((x=s==null?void 0:s(c))!=null&&x.disabled)}),d=l.find(c=>{var x;return(x=s==null?void 0:s(c))==null?void 0:x.selected});if(d)return d;const m=l.find(c=>Ee().isSame(c,"year"));return m||l[0]}function kc(i){const n=Ee(i).year(),r=n-n%10;let s=0;const l=[[],[],[],[]];for(let d=0;d<4;d+=1){const m=d===3?1:3;for(let c=0;c<m;c+=1)l[d].push(Ee(new Date(r+s,0)).format("YYYY-MM-DD")),s+=1}return l}var Ic={yearsList:"m_9206547b",yearsListCell:"m_c5a19c7d"};const b1={yearsListFormat:"YYYY",withCellSpacing:!0},Yo=B.factory((i,n)=>{const r=B.useProps("YearsList",b1,i),{classNames:s,className:l,style:d,styles:m,unstyled:c,vars:x,decade:C,yearsListFormat:O,locale:R,minDate:N,maxDate:E,getYearControlProps:I,__staticSelector:$,__getControlRef:j,__onControlKeyDown:X,__onControlClick:te,__onControlMouseEnter:ne,__preventFocus:ue,__stopPropagation:V,withCellSpacing:ce,size:oe,...ee}=r,de=B.useStyles({name:$||"YearsList",classes:Ic,props:r,className:l,style:d,classNames:s,styles:m,unstyled:c,vars:x,rootSelector:"yearsList"}),pe=rr(),re=kc(C),Ae=w1({years:re,minDate:N,maxDate:E,getYearControlProps:I}),Se=re.map((Y,L)=>{const A=Y.map((g,p)=>{const w=I==null?void 0:I(g),h=Ee(g).isSame(Ae,"year");return T.jsx("td",{...de("yearsListCell"),"data-with-spacing":ce||void 0,children:T.jsx(jo,{...de("yearsListControl"),size:oe,unstyled:c,"data-mantine-stop-propagation":V||void 0,disabled:Lc({year:g,minDate:N,maxDate:E}),ref:v=>j==null?void 0:j(L,p,v),...w,onKeyDown:v=>{var D;(D=w==null?void 0:w.onKeyDown)==null||D.call(w,v),X==null||X(v,{rowIndex:L,cellIndex:p,date:g})},onClick:v=>{var D;(D=w==null?void 0:w.onClick)==null||D.call(w,v),te==null||te(v,g)},onMouseEnter:v=>{var D;(D=w==null?void 0:w.onMouseEnter)==null||D.call(w,v),ne==null||ne(v,g)},onMouseDown:v=>{var D;(D=w==null?void 0:w.onMouseDown)==null||D.call(w,v),ue&&v.preventDefault()},tabIndex:ue||!h?-1:0,children:Ee(g).locale(pe.getLocale(R)).format(O)})},p)});return T.jsx("tr",{...de("yearsListRow"),children:A},L)});return T.jsx(B.Box,{component:"table",ref:n,size:oe,...de("yearsList"),...ee,children:T.jsx("tbody",{children:Se})})});Yo.classes=Ic,Yo.displayName="@mantine/dates/YearsList";function Pc({month:i,minDate:n,maxDate:r}){return!n&&!r?!1:!!(n&&Ee(i).isBefore(n,"month")||r&&Ee(i).isAfter(r,"month"))}function x1({months:i,minDate:n,maxDate:r,getMonthControlProps:s}){const l=i.flat().filter(c=>{var x;return!Pc({month:c,minDate:n,maxDate:r})&&!((x=s==null?void 0:s(c))!=null&&x.disabled)}),d=l.find(c=>{var x;return(x=s==null?void 0:s(c))==null?void 0:x.selected});if(d)return d;const m=l.find(c=>Ee().isSame(c,"month"));return m||l[0]}function S1(i){const n=Ee(i).startOf("year").toDate(),r=[[],[],[],[]];let s=0;for(let l=0;l<4;l+=1)for(let d=0;d<3;d+=1)r[l].push(Ee(n).add(s,"months").format("YYYY-MM-DD")),s+=1;return r}var Nc={monthsList:"m_2a6c32d",monthsListCell:"m_fe27622f"};const C1={monthsListFormat:"MMM",withCellSpacing:!0},Uo=B.factory((i,n)=>{const r=B.useProps("MonthsList",C1,i),{classNames:s,className:l,style:d,styles:m,unstyled:c,vars:x,__staticSelector:C,year:O,monthsListFormat:R,locale:N,minDate:E,maxDate:I,getMonthControlProps:$,__getControlRef:j,__onControlKeyDown:X,__onControlClick:te,__onControlMouseEnter:ne,__preventFocus:ue,__stopPropagation:V,withCellSpacing:ce,size:oe,...ee}=r,de=B.useStyles({name:C||"MonthsList",classes:Nc,props:r,className:l,style:d,classNames:s,styles:m,unstyled:c,vars:x,rootSelector:"monthsList"}),pe=rr(),re=S1(O),Ae=x1({months:re,minDate:cn(E),maxDate:cn(I),getMonthControlProps:$}),Se=re.map((Y,L)=>{const A=Y.map((g,p)=>{const w=$==null?void 0:$(g),h=Ee(g).isSame(Ae,"month");return T.jsx("td",{...de("monthsListCell"),"data-with-spacing":ce||void 0,children:T.jsx(jo,{...de("monthsListControl"),size:oe,unstyled:c,__staticSelector:C||"MonthsList","data-mantine-stop-propagation":V||void 0,disabled:Pc({month:g,minDate:cn(E),maxDate:cn(I)}),ref:v=>j==null?void 0:j(L,p,v),...w,onKeyDown:v=>{var D;(D=w==null?void 0:w.onKeyDown)==null||D.call(w,v),X==null||X(v,{rowIndex:L,cellIndex:p,date:g})},onClick:v=>{var D;(D=w==null?void 0:w.onClick)==null||D.call(w,v),te==null||te(v,g)},onMouseEnter:v=>{var D;(D=w==null?void 0:w.onMouseEnter)==null||D.call(w,v),ne==null||ne(v,g)},onMouseDown:v=>{var D;(D=w==null?void 0:w.onMouseDown)==null||D.call(w,v),ue&&v.preventDefault()},tabIndex:ue||!h?-1:0,children:Ee(g).locale(pe.getLocale(N)).format(R)})},p)});return T.jsx("tr",{...de("monthsListRow"),children:A},L)});return T.jsx(B.Box,{component:"table",ref:n,size:oe,...de("monthsList"),...ee,children:T.jsx("tbody",{children:Se})})});Uo.classes=Nc,Uo.displayName="@mantine/dates/MonthsList";var $c={calendarHeader:"m_730a79ed",calendarHeaderLevel:"m_f6645d97",calendarHeaderControl:"m_2351eeb0",calendarHeaderControlIcon:"m_367dc749"};const A1={nextDisabled:!1,previousDisabled:!1,hasNextLevel:!0,withNext:!0,withPrevious:!0},D1=B.createVarsResolver((i,{size:n})=>({calendarHeader:{"--dch-control-size":B.getSize(n,"dch-control-size"),"--dch-fz":B.getFontSize(n)}})),ir=B.factory((i,n)=>{const r=B.useProps("CalendarHeader",A1,i),{classNames:s,className:l,style:d,styles:m,unstyled:c,vars:x,nextIcon:C,previousIcon:O,nextLabel:R,previousLabel:N,onNext:E,onPrevious:I,onLevelClick:$,label:j,nextDisabled:X,previousDisabled:te,hasNextLevel:ne,levelControlAriaLabel:ue,withNext:V,withPrevious:ce,__staticSelector:oe,__preventFocus:ee,__stopPropagation:de,...pe}=r,re=B.useStyles({name:oe||"CalendarHeader",classes:$c,props:r,className:l,style:d,classNames:s,styles:m,unstyled:c,vars:x,varsResolver:D1,rootSelector:"calendarHeader"}),Ae=ee?Se=>Se.preventDefault():void 0;return T.jsxs(B.Box,{...re("calendarHeader"),ref:n,...pe,children:[ce&&T.jsx(B.UnstyledButton,{...re("calendarHeaderControl"),"data-direction":"previous","aria-label":N,onClick:I,unstyled:c,onMouseDown:Ae,disabled:te,"data-disabled":te||void 0,tabIndex:ee||te?-1:0,"data-mantine-stop-propagation":de||void 0,children:O||T.jsx(B.AccordionChevron,{...re("calendarHeaderControlIcon"),"data-direction":"previous",size:"45%"})}),T.jsx(B.UnstyledButton,{component:ne?"button":"div",...re("calendarHeaderLevel"),onClick:ne?$:void 0,unstyled:c,onMouseDown:ne?Ae:void 0,disabled:!ne,"data-static":!ne||void 0,"aria-label":ue,tabIndex:ee||!ne?-1:0,"data-mantine-stop-propagation":de||void 0,children:j}),V&&T.jsx(B.UnstyledButton,{...re("calendarHeaderControl"),"data-direction":"next","aria-label":R,onClick:E,unstyled:c,onMouseDown:Ae,disabled:X,"data-disabled":X||void 0,tabIndex:ee||X?-1:0,"data-mantine-stop-propagation":de||void 0,children:C||T.jsx(B.AccordionChevron,{...re("calendarHeaderControlIcon"),"data-direction":"next",size:"45%"})})]})});ir.classes=$c,ir.displayName="@mantine/dates/CalendarHeader";function O1(i){const n=kc(i);return[n[0][0],n[3][0]]}const T1={decadeLabelFormat:"YYYY"},Fo=B.factory((i,n)=>{const r=B.useProps("DecadeLevel",T1,i),{decade:s,locale:l,minDate:d,maxDate:m,yearsListFormat:c,getYearControlProps:x,__getControlRef:C,__onControlKeyDown:O,__onControlClick:R,__onControlMouseEnter:N,withCellSpacing:E,__preventFocus:I,nextIcon:$,previousIcon:j,nextLabel:X,previousLabel:te,onNext:ne,onPrevious:ue,nextDisabled:V,previousDisabled:ce,levelControlAriaLabel:oe,withNext:ee,withPrevious:de,decadeLabelFormat:pe,classNames:re,styles:Ae,unstyled:Se,__staticSelector:Y,__stopPropagation:L,size:A,...g}=r,p=rr(),[w,h]=O1(s),v={__staticSelector:Y||"DecadeLevel",classNames:re,styles:Ae,unstyled:Se,size:A},D=typeof V=="boolean"?V:m?!Ee(h).endOf("year").isBefore(m):!1,z=typeof ce=="boolean"?ce:d?!Ee(w).startOf("year").isAfter(d):!1,Z=(ae,fe)=>Ee(ae).locale(l||p.locale).format(fe);return T.jsxs(B.Box,{"data-decade-level":!0,size:A,ref:n,...g,children:[T.jsx(ir,{label:typeof pe=="function"?pe(w,h):`${Z(w,pe)} – ${Z(h,pe)}`,__preventFocus:I,__stopPropagation:L,nextIcon:$,previousIcon:j,nextLabel:X,previousLabel:te,onNext:ne,onPrevious:ue,nextDisabled:D,previousDisabled:z,hasNextLevel:!1,levelControlAriaLabel:oe,withNext:ee,withPrevious:de,...v}),T.jsx(Yo,{decade:s,locale:l,minDate:d,maxDate:m,yearsListFormat:c,getYearControlProps:x,__getControlRef:C,__onControlKeyDown:O,__onControlClick:R,__onControlMouseEnter:N,__preventFocus:I,__stopPropagation:L,withCellSpacing:E,...v})]})});Fo.classes={...Yo.classes,...ir.classes},Fo.displayName="@mantine/dates/DecadeLevel";const M1={yearLabelFormat:"YYYY"},Wo=B.factory((i,n)=>{const r=B.useProps("YearLevel",M1,i),{year:s,locale:l,minDate:d,maxDate:m,monthsListFormat:c,getMonthControlProps:x,__getControlRef:C,__onControlKeyDown:O,__onControlClick:R,__onControlMouseEnter:N,withCellSpacing:E,__preventFocus:I,nextIcon:$,previousIcon:j,nextLabel:X,previousLabel:te,onNext:ne,onPrevious:ue,onLevelClick:V,nextDisabled:ce,previousDisabled:oe,hasNextLevel:ee,levelControlAriaLabel:de,withNext:pe,withPrevious:re,yearLabelFormat:Ae,__staticSelector:Se,__stopPropagation:Y,size:L,classNames:A,styles:g,unstyled:p,...w}=r,h=rr(),v={__staticSelector:Se||"YearLevel",classNames:A,styles:g,unstyled:p,size:L},D=typeof ce=="boolean"?ce:m?!Ee(s).endOf("year").isBefore(m):!1,z=typeof oe=="boolean"?oe:d?!Ee(s).startOf("year").isAfter(d):!1;return T.jsxs(B.Box,{"data-year-level":!0,size:L,ref:n,...w,children:[T.jsx(ir,{label:typeof Ae=="function"?Ae(s):Ee(s).locale(l||h.locale).format(Ae),__preventFocus:I,__stopPropagation:Y,nextIcon:$,previousIcon:j,nextLabel:X,previousLabel:te,onNext:ne,onPrevious:ue,onLevelClick:V,nextDisabled:D,previousDisabled:z,hasNextLevel:ee,levelControlAriaLabel:de,withNext:pe,withPrevious:re,...v}),T.jsx(Uo,{year:s,locale:l,minDate:d,maxDate:m,monthsListFormat:c,getMonthControlProps:x,__getControlRef:C,__onControlKeyDown:O,__onControlClick:R,__onControlMouseEnter:N,__preventFocus:I,__stopPropagation:Y,withCellSpacing:E,...v})]})});Wo.classes={...ir.classes,...Uo.classes},Wo.displayName="@mantine/dates/YearLevel";const E1={monthLabelFormat:"MMMM YYYY"},zo=B.factory((i,n)=>{const r=B.useProps("MonthLevel",E1,i),{month:s,locale:l,firstDayOfWeek:d,weekdayFormat:m,weekendDays:c,getDayProps:x,excludeDate:C,minDate:O,maxDate:R,renderDay:N,hideOutsideDates:E,hideWeekdays:I,getDayAriaLabel:$,__getDayRef:j,__onDayKeyDown:X,__onDayClick:te,__onDayMouseEnter:ne,withCellSpacing:ue,highlightToday:V,withWeekNumbers:ce,__preventFocus:oe,__stopPropagation:ee,nextIcon:de,previousIcon:pe,nextLabel:re,previousLabel:Ae,onNext:Se,onPrevious:Y,onLevelClick:L,nextDisabled:A,previousDisabled:g,hasNextLevel:p,levelControlAriaLabel:w,withNext:h,withPrevious:v,monthLabelFormat:D,classNames:z,styles:Z,unstyled:ae,__staticSelector:fe,size:_e,static:J,...he}=r,De=rr(),be={__staticSelector:fe||"MonthLevel",classNames:z,styles:Z,unstyled:ae,size:_e},P=typeof A=="boolean"?A:R?!Ee(s).endOf("month").isBefore(R):!1,q=typeof g=="boolean"?g:O?!Ee(s).startOf("month").isAfter(O):!1;return T.jsxs(B.Box,{"data-month-level":!0,size:_e,ref:n,...he,children:[T.jsx(ir,{label:typeof D=="function"?D(s):Ee(s).locale(l||De.locale).format(D),__preventFocus:oe,__stopPropagation:ee,nextIcon:de,previousIcon:pe,nextLabel:re,previousLabel:Ae,onNext:Se,onPrevious:Y,onLevelClick:L,nextDisabled:P,previousDisabled:q,hasNextLevel:p,levelControlAriaLabel:w,withNext:h,withPrevious:v,...be}),T.jsx(Bo,{month:s,locale:l,firstDayOfWeek:d,weekdayFormat:m,weekendDays:c,getDayProps:x,excludeDate:C,minDate:O,maxDate:R,renderDay:N,hideOutsideDates:E,hideWeekdays:I,getDayAriaLabel:$,__getDayRef:j,__onDayKeyDown:X,__onDayClick:te,__onDayMouseEnter:ne,__preventFocus:oe,__stopPropagation:ee,static:J,withCellSpacing:ue,highlightToday:V,withWeekNumbers:ce,...be})]})});zo.classes={...Bo.classes,...ir.classes},zo.displayName="@mantine/dates/MonthLevel";var Bc={levelsGroup:"m_30b26e33"};const R1={},or=B.factory((i,n)=>{const r=B.useProps("LevelsGroup",R1,i),{classNames:s,className:l,style:d,styles:m,unstyled:c,vars:x,__staticSelector:C,...O}=r,R=B.useStyles({name:C||"LevelsGroup",classes:Bc,props:r,className:l,style:d,classNames:s,styles:m,unstyled:c,vars:x,rootSelector:"levelsGroup"});return T.jsx(B.Box,{ref:n,...R("levelsGroup"),...O})});or.classes=Bc,or.displayName="@mantine/dates/LevelsGroup";const L1={numberOfColumns:1},qo=B.factory((i,n)=>{const r=B.useProps("DecadeLevelGroup",L1,i),{decade:s,locale:l,minDate:d,maxDate:m,yearsListFormat:c,getYearControlProps:x,__onControlClick:C,__onControlMouseEnter:O,withCellSpacing:R,__preventFocus:N,nextIcon:E,previousIcon:I,nextLabel:$,previousLabel:j,onNext:X,onPrevious:te,nextDisabled:ne,previousDisabled:ue,classNames:V,styles:ce,unstyled:oe,__staticSelector:ee,__stopPropagation:de,numberOfColumns:pe,levelControlAriaLabel:re,decadeLabelFormat:Ae,size:Se,vars:Y,...L}=r,A=ye.useRef([]),g=Array(pe).fill(0).map((p,w)=>{const h=Ee(s).add(w*10,"years").format("YYYY-MM-DD");return T.jsx(Fo,{size:Se,yearsListFormat:c,decade:h,withNext:w===pe-1,withPrevious:w===0,decadeLabelFormat:Ae,__onControlClick:C,__onControlMouseEnter:O,__onControlKeyDown:(v,D)=>xa({levelIndex:w,rowIndex:D.rowIndex,cellIndex:D.cellIndex,event:v,controlsRef:A}),__getControlRef:(v,D,z)=>{Array.isArray(A.current[w])||(A.current[w]=[]),Array.isArray(A.current[w][v])||(A.current[w][v]=[]),A.current[w][v][D]=z},levelControlAriaLabel:typeof re=="function"?re(h):re,locale:l,minDate:d,maxDate:m,__preventFocus:N,__stopPropagation:de,nextIcon:E,previousIcon:I,nextLabel:$,previousLabel:j,onNext:X,onPrevious:te,nextDisabled:ne,previousDisabled:ue,getYearControlProps:x,__staticSelector:ee||"DecadeLevelGroup",classNames:V,styles:ce,unstyled:oe,withCellSpacing:R},w)});return T.jsx(or,{classNames:V,styles:ce,__staticSelector:ee||"DecadeLevelGroup",ref:n,size:Se,unstyled:oe,...L,children:g})});qo.classes={...or.classes,...Fo.classes},qo.displayName="@mantine/dates/DecadeLevelGroup";const k1={numberOfColumns:1},Ho=B.factory((i,n)=>{const r=B.useProps("YearLevelGroup",k1,i),{year:s,locale:l,minDate:d,maxDate:m,monthsListFormat:c,getMonthControlProps:x,__onControlClick:C,__onControlMouseEnter:O,withCellSpacing:R,__preventFocus:N,nextIcon:E,previousIcon:I,nextLabel:$,previousLabel:j,onNext:X,onPrevious:te,onLevelClick:ne,nextDisabled:ue,previousDisabled:V,hasNextLevel:ce,classNames:oe,styles:ee,unstyled:de,__staticSelector:pe,__stopPropagation:re,numberOfColumns:Ae,levelControlAriaLabel:Se,yearLabelFormat:Y,size:L,vars:A,...g}=r,p=ye.useRef([]),w=Array(Ae).fill(0).map((h,v)=>{const D=Ee(s).add(v,"years").format("YYYY-MM-DD");return T.jsx(Wo,{size:L,monthsListFormat:c,year:D,withNext:v===Ae-1,withPrevious:v===0,yearLabelFormat:Y,__stopPropagation:re,__onControlClick:C,__onControlMouseEnter:O,__onControlKeyDown:(z,Z)=>xa({levelIndex:v,rowIndex:Z.rowIndex,cellIndex:Z.cellIndex,event:z,controlsRef:p}),__getControlRef:(z,Z,ae)=>{Array.isArray(p.current[v])||(p.current[v]=[]),Array.isArray(p.current[v][z])||(p.current[v][z]=[]),p.current[v][z][Z]=ae},levelControlAriaLabel:typeof Se=="function"?Se(D):Se,locale:l,minDate:d,maxDate:m,__preventFocus:N,nextIcon:E,previousIcon:I,nextLabel:$,previousLabel:j,onNext:X,onPrevious:te,onLevelClick:ne,nextDisabled:ue,previousDisabled:V,hasNextLevel:ce,getMonthControlProps:x,classNames:oe,styles:ee,unstyled:de,__staticSelector:pe||"YearLevelGroup",withCellSpacing:R},v)});return T.jsx(or,{classNames:oe,styles:ee,__staticSelector:pe||"YearLevelGroup",ref:n,size:L,unstyled:de,...g,children:w})});Ho.classes={...Wo.classes,...or.classes},Ho.displayName="@mantine/dates/YearLevelGroup";const I1={numberOfColumns:1},Go=B.factory((i,n)=>{const r=B.useProps("MonthLevelGroup",I1,i),{month:s,locale:l,firstDayOfWeek:d,weekdayFormat:m,weekendDays:c,getDayProps:x,excludeDate:C,minDate:O,maxDate:R,renderDay:N,hideOutsideDates:E,hideWeekdays:I,getDayAriaLabel:$,__onDayClick:j,__onDayMouseEnter:X,withCellSpacing:te,highlightToday:ne,withWeekNumbers:ue,__preventFocus:V,nextIcon:ce,previousIcon:oe,nextLabel:ee,previousLabel:de,onNext:pe,onPrevious:re,onLevelClick:Ae,nextDisabled:Se,previousDisabled:Y,hasNextLevel:L,classNames:A,styles:g,unstyled:p,numberOfColumns:w,levelControlAriaLabel:h,monthLabelFormat:v,__staticSelector:D,__stopPropagation:z,size:Z,static:ae,vars:fe,..._e}=r,J=ye.useRef([]),he=Array(w).fill(0).map((De,be)=>{const P=Ee(s).add(be,"months").format("YYYY-MM-DD");return T.jsx(zo,{month:P,withNext:be===w-1,withPrevious:be===0,monthLabelFormat:v,__stopPropagation:z,__onDayClick:j,__onDayMouseEnter:X,__onDayKeyDown:(q,F)=>xa({levelIndex:be,rowIndex:F.rowIndex,cellIndex:F.cellIndex,event:q,controlsRef:J}),__getDayRef:(q,F,K)=>{Array.isArray(J.current[be])||(J.current[be]=[]),Array.isArray(J.current[be][q])||(J.current[be][q]=[]),J.current[be][q][F]=K},levelControlAriaLabel:typeof h=="function"?h(P):h,locale:l,firstDayOfWeek:d,weekdayFormat:m,weekendDays:c,getDayProps:x,excludeDate:C,minDate:O,maxDate:R,renderDay:N,hideOutsideDates:E,hideWeekdays:I,getDayAriaLabel:$,__preventFocus:V,nextIcon:ce,previousIcon:oe,nextLabel:ee,previousLabel:de,onNext:pe,onPrevious:re,onLevelClick:Ae,nextDisabled:Se,previousDisabled:Y,hasNextLevel:L,classNames:A,styles:g,unstyled:p,__staticSelector:D||"MonthLevelGroup",size:Z,static:ae,withCellSpacing:te,highlightToday:ne,withWeekNumbers:ue},be)});return T.jsx(or,{classNames:A,styles:g,__staticSelector:D||"MonthLevelGroup",ref:n,size:Z,..._e,children:he})});Go.classes={...or.classes,...zo.classes},Go.displayName="@mantine/dates/MonthLevelGroup";const jc=i=>i==="range"?[null,null]:i==="multiple"?[]:null,Yc=(i,n)=>{const r=n?bc:cn;return Array.isArray(i)?i.map(r):r(i)};function Aa({type:i,value:n,defaultValue:r,onChange:s,withTime:l=!1}){const d=ye.useRef(i),[m,c,x]=At.useUncontrolled({value:Yc(n,l),defaultValue:Yc(r,l),finalValue:jc(i),onChange:s});let C=m;return d.current!==i&&(d.current=i,n===void 0&&(C=r!==void 0?r:jc(i),c(C))),[C,c,x]}function Da(i,n){return i?i==="month"?0:i==="year"?1:2:n||0}function P1(i){return i===0?"month":i===1?"year":"decade"}function Wi(i,n,r){return P1(At.clamp(Da(i,0),Da(n,0),Da(r,2)))}const N1={maxLevel:"decade",minLevel:"month",__updateDateOnYearSelect:!0,__updateDateOnMonthSelect:!0},Vo=B.factory((i,n)=>{const r=B.useProps("Calendar",N1,i),{vars:s,maxLevel:l,minLevel:d,defaultLevel:m,level:c,onLevelChange:x,date:C,defaultDate:O,onDateChange:R,numberOfColumns:N,columnsToScroll:E,ariaLabels:I,nextLabel:$,previousLabel:j,onYearSelect:X,onMonthSelect:te,onYearMouseEnter:ne,onMonthMouseEnter:ue,__updateDateOnYearSelect:V,__updateDateOnMonthSelect:ce,firstDayOfWeek:oe,weekdayFormat:ee,weekendDays:de,getDayProps:pe,excludeDate:re,renderDay:Ae,hideOutsideDates:Se,hideWeekdays:Y,getDayAriaLabel:L,monthLabelFormat:A,nextIcon:g,previousIcon:p,__onDayClick:w,__onDayMouseEnter:h,withCellSpacing:v,highlightToday:D,withWeekNumbers:z,monthsListFormat:Z,getMonthControlProps:ae,yearLabelFormat:fe,yearsListFormat:_e,getYearControlProps:J,decadeLabelFormat:he,classNames:De,styles:be,unstyled:P,minDate:q,maxDate:F,locale:K,__staticSelector:se,size:Oe,__preventFocus:u,__stopPropagation:f,onNextDecade:_,onPreviousDecade:M,onNextYear:W,onPreviousYear:Q,onNextMonth:xe,onPreviousMonth:Me,static:Ie,...Ce}=r,{resolvedClassNames:ke,resolvedStyles:Ne}=B.useResolvedStylesApi({classNames:De,styles:be,props:r}),[Re,Ge]=At.useUncontrolled({value:c?Wi(c,d,l):void 0,defaultValue:m?Wi(m,d,l):void 0,finalValue:Wi(void 0,d,l),onChange:x}),[Je,Ve]=Aa({type:"default",value:cn(C),defaultValue:cn(O),onChange:R}),xt={__staticSelector:se||"Calendar",styles:Ne,classNames:ke,unstyled:P,size:Oe},vt=E||N||1,ut=new Date,qt=q&&Ee(ut).isAfter(q)?q:Ee(ut).format("YYYY-MM-DD"),Dt=Je||qt,$n=()=>{const it=Ee(Dt).add(vt,"month").format("YYYY-MM-DD");xe==null||xe(it),Ve(it)},fn=()=>{const it=Ee(Dt).subtract(vt,"month").format("YYYY-MM-DD");Me==null||Me(it),Ve(it)},Qt=()=>{const it=Ee(Dt).add(vt,"year").format("YYYY-MM-DD");W==null||W(it),Ve(it)},xn=()=>{const it=Ee(Dt).subtract(vt,"year").format("YYYY-MM-DD");Q==null||Q(it),Ve(it)},Bn=()=>{const it=Ee(Dt).add(10*vt,"year").format("YYYY-MM-DD");_==null||_(it),Ve(it)},En=()=>{const it=Ee(Dt).subtract(10*vt,"year").format("YYYY-MM-DD");M==null||M(it),Ve(it)};return T.jsxs(B.Box,{ref:n,size:Oe,"data-calendar":!0,...Ce,children:[Re==="month"&&T.jsx(Go,{month:Dt,minDate:q,maxDate:F,firstDayOfWeek:oe,weekdayFormat:ee,weekendDays:de,getDayProps:pe,excludeDate:re,renderDay:Ae,hideOutsideDates:Se,hideWeekdays:Y,getDayAriaLabel:L,onNext:$n,onPrevious:fn,hasNextLevel:l!=="month",onLevelClick:()=>Ge("year"),numberOfColumns:N,locale:K,levelControlAriaLabel:I==null?void 0:I.monthLevelControl,nextLabel:(I==null?void 0:I.nextMonth)??$,nextIcon:g,previousLabel:(I==null?void 0:I.previousMonth)??j,previousIcon:p,monthLabelFormat:A,__onDayClick:w,__onDayMouseEnter:h,__preventFocus:u,__stopPropagation:f,static:Ie,withCellSpacing:v,highlightToday:D,withWeekNumbers:z,...xt}),Re==="year"&&T.jsx(Ho,{year:Dt,numberOfColumns:N,minDate:q,maxDate:F,monthsListFormat:Z,getMonthControlProps:ae,locale:K,onNext:Qt,onPrevious:xn,hasNextLevel:l!=="month"&&l!=="year",onLevelClick:()=>Ge("decade"),levelControlAriaLabel:I==null?void 0:I.yearLevelControl,nextLabel:(I==null?void 0:I.nextYear)??$,nextIcon:g,previousLabel:(I==null?void 0:I.previousYear)??j,previousIcon:p,yearLabelFormat:fe,__onControlMouseEnter:ue,__onControlClick:(it,It)=>{ce&&Ve(It),Ge(Wi("month",d,l)),te==null||te(It)},__preventFocus:u,__stopPropagation:f,withCellSpacing:v,...xt}),Re==="decade"&&T.jsx(qo,{decade:Dt,minDate:q,maxDate:F,yearsListFormat:_e,getYearControlProps:J,locale:K,onNext:Bn,onPrevious:En,numberOfColumns:N,nextLabel:(I==null?void 0:I.nextDecade)??$,nextIcon:g,previousLabel:(I==null?void 0:I.previousDecade)??j,previousIcon:p,decadeLabelFormat:he,__onControlMouseEnter:ne,__onControlClick:(it,It)=>{V&&Ve(It),Ge(Wi("year",d,l)),X==null||X(It)},__preventFocus:u,__stopPropagation:f,withCellSpacing:v,...xt})]})});Vo.classes={...qo.classes,...Ho.classes,...Go.classes},Vo.displayName="@mantine/dates/Calendar";function $1(i){const{maxLevel:n,minLevel:r,defaultLevel:s,level:l,onLevelChange:d,nextIcon:m,previousIcon:c,date:x,defaultDate:C,onDateChange:O,numberOfColumns:R,columnsToScroll:N,ariaLabels:E,nextLabel:I,previousLabel:$,onYearSelect:j,onMonthSelect:X,onYearMouseEnter:te,onMonthMouseEnter:ne,onNextMonth:ue,onPreviousMonth:V,onNextYear:ce,onPreviousYear:oe,onNextDecade:ee,onPreviousDecade:de,withCellSpacing:pe,highlightToday:re,__updateDateOnYearSelect:Ae,__updateDateOnMonthSelect:Se,withWeekNumbers:Y,firstDayOfWeek:L,weekdayFormat:A,weekendDays:g,getDayProps:p,excludeDate:w,renderDay:h,hideOutsideDates:v,hideWeekdays:D,getDayAriaLabel:z,monthLabelFormat:Z,monthsListFormat:ae,getMonthControlProps:fe,yearLabelFormat:_e,yearsListFormat:J,getYearControlProps:he,decadeLabelFormat:De,allowSingleDateInRange:be,allowDeselect:P,minDate:q,maxDate:F,locale:K,...se}=i;return{calendarProps:{maxLevel:n,minLevel:r,defaultLevel:s,level:l,onLevelChange:d,nextIcon:m,previousIcon:c,date:x,defaultDate:C,onDateChange:O,numberOfColumns:R,columnsToScroll:N,ariaLabels:E,nextLabel:I,previousLabel:$,onYearSelect:j,onMonthSelect:X,onYearMouseEnter:te,onMonthMouseEnter:ne,onNextMonth:ue,onPreviousMonth:V,onNextYear:ce,onPreviousYear:oe,onNextDecade:ee,onPreviousDecade:de,withCellSpacing:pe,highlightToday:re,__updateDateOnYearSelect:Ae,__updateDateOnMonthSelect:Se,withWeekNumbers:Y,firstDayOfWeek:L,weekdayFormat:A,weekendDays:g,getDayProps:p,excludeDate:w,renderDay:h,hideOutsideDates:v,hideWeekdays:D,getDayAriaLabel:z,monthLabelFormat:Z,monthsListFormat:ae,getMonthControlProps:fe,yearLabelFormat:_e,yearsListFormat:J,getYearControlProps:he,decadeLabelFormat:De,allowSingleDateInRange:be,allowDeselect:P,minDate:q,maxDate:F,locale:K},others:se}}function B1(i){if(i===null)return null;const n=new Date(i);return Number.isNaN(n.getTime())||!i?null:Ee(n).format("YYYY-MM-DD")}function j1({date:i,maxDate:n,minDate:r}){return!(i==null||Number.isNaN(new Date(i).getTime())||n&&Ee(i).isAfter(n,"date")||r&&Ee(i).isBefore(r,"date"))}const Y1={valueFormat:"MMMM D, YYYY",fixOnBlur:!0},Zo=B.factory((i,n)=>{const r=B.useInputProps("DateInput",Y1,i),{inputProps:s,wrapperProps:l,value:d,defaultValue:m,onChange:c,clearable:x,clearButtonProps:C,popoverProps:O,getDayProps:R,locale:N,valueFormat:E,dateParser:I,minDate:$,maxDate:j,fixOnBlur:X,onFocus:te,onBlur:ne,onClick:ue,readOnly:V,name:ce,form:oe,rightSection:ee,unstyled:de,classNames:pe,styles:re,allowDeselect:Ae,date:Se,defaultDate:Y,onDateChange:L,...A}=r,g=ye.useRef(null),p=ye.useRef(null),[w,h]=ye.useState(!1),{calendarProps:v,others:D}=$1(A),z=rr(),ae=I||(M=>{const W=Ee(M,E,z.getLocale(N)).toDate();return Number.isNaN(W.getTime())?B1(M):Ee(W).format("YYYY-MM-DD")}),fe=Ae!==void 0?Ae:x,_e=M=>M?Ee(M).locale(z.getLocale(N)).format(E):"",[J,he,De]=Aa({type:"default",value:d,defaultValue:m,onChange:c}),[be,P]=Aa({type:"default",value:Se,defaultValue:m||Y,onChange:L});ye.useEffect(()=>{De&&d!==null&&P(d)},[De,d]);const[q,F]=ye.useState(_e(J));ye.useEffect(()=>{F(_e(J))},[z.getLocale(N)]);const K=M=>{const W=M.currentTarget.value;if(F(W),h(!0),W.trim()===""&&x)he(null);else{const Q=ae(W);j1({date:Q,minDate:$,maxDate:j})&&(he(Q),P(Q))}},se=M=>{ne==null||ne(M),h(!1),X&&F(_e(J))},Oe=M=>{te==null||te(M),h(!0)},u=M=>{ue==null||ue(M),h(!0)},f=M=>({...R==null?void 0:R(M),selected:Ee(J).isSame(M,"day"),onClick:W=>{var xe,Me;(Me=R==null?void 0:(xe=R(M)).onClick)==null||Me.call(xe,W);const Q=x&&fe&&Ee(J).isSame(M,"day")?null:M;he(Q),!De&&F(_e(Q)),h(!1)}}),_=ee||(x&&J&&!V?T.jsx(B.CloseButton,{variant:"transparent",onMouseDown:M=>M.preventDefault(),tabIndex:-1,onClick:()=>{he(null),!De&&F(""),h(!1)},unstyled:de,size:s.size||"sm",...C}):null);return At.useDidUpdate(()=>{J!==void 0&&!w&&F(_e(J))},[J]),At.useClickOutside(()=>h(!1),void 0,[g.current,p.current]),T.jsxs(T.Fragment,{children:[T.jsx(B.Input.Wrapper,{...l,__staticSelector:"DateInput",ref:g,children:T.jsxs(B.Popover,{opened:w,trapFocus:!1,position:"bottom-start",disabled:V,withRoles:!1,unstyled:de,...O,children:[T.jsx(B.Popover.Target,{children:T.jsx(B.Input,{"data-dates-input":!0,"data-read-only":V||void 0,autoComplete:"off",ref:n,value:q,onChange:K,onBlur:se,onFocus:Oe,onClick:u,readOnly:V,rightSection:_,...s,...D,__staticSelector:"DateInput"})}),T.jsx(B.Popover.Dropdown,{onMouseDown:M=>M.preventDefault(),"data-dates-dropdown":!0,ref:p,children:T.jsx(Vo,{__staticSelector:"DateInput",...v,classNames:pe,styles:re,unstyled:de,__preventFocus:!0,minDate:$,maxDate:j,locale:N,getDayProps:f,size:s.size,date:be,onDateChange:P})})]})}),T.jsx(xc,{name:ce,form:oe,value:J,type:"default"})]})});Zo.classes={...B.Input.classes,...Vo.classes},Zo.displayName="@mantine/dates/DateInput";function U1(i){const n=an.c(47),{fields:r,onClose:s,queryKey:l,apiPath:d,steps:m,onCreated:c}=i,[x,C]=ye.useState(0),[O,R]=ye.useState(!1),[N,E]=ye.useState(),{mutateAsync:I,isError:$,error:j,isPending:X}=vc(d,l),{mutateAsync:te,isPending:ne}=ba(d,l),ue=X||ne;let V;n[0]!==r?(V=new Set(r.filter(G1).map(H1)),n[0]=r,n[1]=V):V=n[1];let ce;n[2]!==V?(ce=[...V],n[2]=V,n[3]=ce):ce=n[3];const oe=ce;let ee;n[4]!==r?(ee=r.reduce(q1,{}),n[4]=r,n[5]=ee):ee=n[5];let de;n[6]!==r?(de=r.filter(z1).reduce(F1,{}),n[6]=r,n[7]=de):de=n[7];let pe;n[8]!==ee||n[9]!==de?(pe={mode:"uncontrolled",initialValues:ee,validate:de},n[8]=ee,n[9]=de,n[10]=pe):pe=n[10];const re=Mi.useForm(pe);let Ae;n[11]!==re||n[12]!==N?(Ae=function(v){return T.jsxs(ye.Fragment,{children:[(v.type===void 0||v.type=="text")&&T.jsx(B.TextInput,{label:v.column.title,placeholder:v.placeholder??"",...re.getInputProps(v.id),type:v.id.includes("email")?"email":void 0},re.key(v.id)),v.type==="number"&&T.jsx(B.NumberInput,{decimalSeparator:",",label:v.column.title,placeholder:v.placeholder??"",...re.getInputProps(v.id)},re.key(v.id)),v.type==="date"&&T.jsx(Zo,{label:v.column.title,placeholder:v.placeholder??"",valueFormat:"DD.MM.YYYY",clearable:!0,...re.getInputProps(v.id)},re.key(v.id)),v.type==="boolean"&&T.jsx(B.Checkbox,{mt:"md",label:v.column.title,...re.getInputProps(v.id,{type:"checkbox"})},re.key(v.id)),v.type==="custom"&&v.render&&v.render({...re.getValues(),...N&&{id:N}},re.setValues,R)]},v.id)},n[11]=re,n[12]=N,n[13]=Ae):Ae=n[13];const Se=Ae;let Y;n[14]!==(j==null?void 0:j.message)||n[15]!==(j==null?void 0:j.name)||n[16]!==$?(Y=$&&T.jsx(B.Alert,{variant:"outline",color:"red",title:(j==null?void 0:j.name)??"Fehler aufgetreten",mb:"lg",children:(j==null?void 0:j.message)??"Fehler aufgetreten"}),n[14]=j==null?void 0:j.message,n[15]=j==null?void 0:j.name,n[16]=$,n[17]=Y):Y=n[17];let L;n[18]!==x||n[19]!==I||n[20]!==re||n[21]!==$||n[22]!==s||n[23]!==c||n[24]!==N||n[25]!==oe.length||n[26]!==te?(L=re.onSubmit(async h=>{if(N)await te({...h,id:N});else{const v=await I(h);E(v.id),c==null||c(v.id)}oe.length&&x<oe.length-1?$||C(x+1):$||(re.setInitialValues(h),re.reset(),s())}),n[18]=x,n[19]=I,n[20]=re,n[21]=$,n[22]=s,n[23]=c,n[24]=N,n[25]=oe.length,n[26]=te,n[27]=L):L=n[27];let A;n[28]!==x||n[29]!==r||n[30]!==Se||n[31]!==m||n[32]!==oe?(A=oe.length?T.jsx(B.Stepper,{active:x,size:"sm",children:oe.map(h=>T.jsx(B.Stepper.Step,{...m&&m[h-1]?{label:m[h-1].label}:{},children:r.filter(v=>v.step===h).map(v=>Se(v))},h))}):r.map(h=>Se(h)),n[28]=x,n[29]=r,n[30]=Se,n[31]=m,n[32]=oe,n[33]=A):A=n[33];let g;n[34]!==x||n[35]!==O||n[36]!==ue||n[37]!==s||n[38]!==oe.length?(g=!O&&T.jsxs(B.Group,{mt:"md",justify:"end",children:[T.jsx(B.Button,{onClick:()=>oe.length?x===0?s():C(x-1):s(),variant:"outline",children:oe.length?x===0?"Abbrechen":"Zurück":"Abbrechen"}),T.jsx(B.Button,{type:"submit",loading:ue,children:oe.length?x===oe.length-1?"Speichern":"Weiter":"Speichern"})]}),n[34]=x,n[35]=O,n[36]=ue,n[37]=s,n[38]=oe.length,n[39]=g):g=n[39];let p;n[40]!==g||n[41]!==L||n[42]!==A?(p=T.jsxs("form",{onSubmit:L,children:[A,g]}),n[40]=g,n[41]=L,n[42]=A,n[43]=p):p=n[43];let w;return n[44]!==p||n[45]!==Y?(w=T.jsxs(T.Fragment,{children:[Y,p]}),n[44]=p,n[45]=Y,n[46]=w):w=n[46],w}function F1(i,n){return i[n.id]=W1,i}function W1(i){return i?null:"Pflichtfeld"}function z1(i){return i.required}function q1(i,n){return i[n.id]=n.type==="boolean"?!1:n.defaultValue??"",i}function H1(i){return i.step}function G1(i){return typeof i.step=="number"}var[V1,Oa]=B.createSafeContext("useDataTableColumnsContext must be used within DataTableColumnProvider"),Uc=i=>{let{children:n,columnsOrder:r,setColumnsOrder:s,columnsToggle:l,setColumnsToggle:d,resetColumnsOrder:m,resetColumnsToggle:c,setColumnWidth:x,resetColumnsWidth:C}=i,[O,R]=ye.useState(""),[N,E]=ye.useState("");return T.jsx(V1,{value:{sourceColumn:O,setSourceColumn:R,targetColumn:N,setTargetColumn:E,columnsToggle:l,setColumnsToggle:d,swapColumns:()=>{if(!r||!s||!O||!N)return;let I=r.indexOf(O),$=r.indexOf(N);if(I!==-1&&$!==-1){let j=r.splice(I,1)[0];r.splice($,0,j),s([...r])}},resetColumnsOrder:m,resetColumnsToggle:c,setColumnWidth:x,resetColumnsWidth:C},children:n})};function Z1(){return T.jsx("tr",{className:"mantine-datatable-empty-row",children:T.jsx("td",{})})}function K1(){return T.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[T.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),T.jsx("path",{d:"M12.983 8.978c3.955 -.182 7.017 -1.446 7.017 -2.978c0 -1.657 -3.582 -3 -8 -3c-1.661 0 -3.204 .19 -4.483 .515m-2.783 1.228c-.471 .382 -.734 .808 -.734 1.257c0 1.22 1.944 2.271 4.734 2.74"}),T.jsx("path",{d:"M4 6v6c0 1.657 3.582 3 8 3c.986 0 1.93 -.067 2.802 -.19m3.187 -.82c1.251 -.53 2.011 -1.228 2.011 -1.99v-6"}),T.jsx("path",{d:"M4 12v6c0 1.657 3.582 3 8 3c3.217 0 5.991 -.712 7.261 -1.74m.739 -3.26v-4"}),T.jsx("path",{d:"M3 3l18 18"})]})}function Q1({icon:i,text:n,pt:r,pb:s,active:l,children:d}){return T.jsx(B.Center,{pt:r,pb:s,className:"mantine-datatable-empty-state","data-active":l||void 0,children:d||T.jsxs(T.Fragment,{children:[i||T.jsx("div",{className:"mantine-datatable-empty-state-icon",children:T.jsx(K1,{})}),T.jsx(B.Text,{component:"div",size:"sm",c:"dimmed",children:n})]})})}var J1=({key:i,columns:n=[],getInitialValueInEffect:r=!0})=>{function s(V,ce){let oe=[];return V.forEach(ee=>{ce.find(de=>de.accessor===ee)&&oe.push(ee)}),ce.forEach(ee=>{oe.includes(ee.accessor)||oe.push(ee.accessor)}),oe}function l(V,ce){let oe=[];return V.forEach(ee=>{ce.find(de=>de.accessor===ee.accessor)&&oe.push(ee)}),ce.forEach(ee=>{oe.find(de=>de.accessor===ee.accessor)||oe.push({accessor:ee.accessor,defaultToggle:ee.defaultToggle||!0,toggleable:ee.toggleable,toggled:ee.defaultToggle===void 0?!0:ee.defaultToggle})}),oe}function d(V,ce){let oe=[];return V.forEach(ee=>{let de=Object.keys(ee)[0];ce.find(pe=>pe.accessor===de)&&oe.push(ee)}),ce.forEach(ee=>{let de=ee.accessor;if(!oe.find(pe=>Object.keys(pe)[0]===de)){let pe={};pe[de]="",oe.push(pe)}}),oe}function m(){let[V,ce]=At.useLocalStorage({key:i?`${i}-columns-order`:"",defaultValue:i?C:void 0,getInitialValueInEffect:r});function oe(pe){i&&ce(pe)}if(!i)return[V,oe];let ee=s(V,n),de=JSON.stringify(V);return JSON.stringify(ee)!==de&&oe(ee),[ee,oe]}function c(){let[V,ce]=At.useLocalStorage({key:i?`${i}-columns-toggle`:"",defaultValue:i?R:void 0,getInitialValueInEffect:r});function oe(pe){i&&ce(pe)}if(!i)return[V,oe];let ee=l(V,n),de=JSON.stringify(V);return JSON.stringify(ee)!==de&&oe(ee),[l(V,n),oe]}function x(){let[V,ce]=At.useLocalStorage({key:i?`${i}-columns-width`:"",defaultValue:i?O:void 0,getInitialValueInEffect:r});function oe(pe){i&&ce(pe)}if(!i)return[V,oe];let ee=d(V,n),de=JSON.stringify(V);return JSON.stringify(ee)!==de&&oe(ee),[d(V,n),oe]}let C=n&&n.map(V=>V.accessor)||[],O=n&&n.map(V=>({[V.accessor]:V.width??"initial"}))||[],R=n&&n.map(V=>({accessor:V.accessor,defaultToggle:V.defaultToggle||!0,toggleable:V.toggleable,toggled:V.defaultToggle===void 0?!0:V.defaultToggle})),[N,E]=m(),[I,$]=c(),[j,X]=x(),te=()=>E(C),ne=()=>{$(R)},ue=()=>X(O);return{effectiveColumns:ye.useMemo(()=>N?N.map(V=>n.find(ce=>ce.accessor===V)).map(V=>{var ce;return{...V,hidden:(V==null?void 0:V.hidden)||!((ce=I.find(oe=>oe.accessor===(V==null?void 0:V.accessor)))!=null&&ce.toggled)}}).map(V=>{var ce;return{...V,width:(ce=j.find(oe=>oe[V==null?void 0:V.accessor]))==null?void 0:ce[V==null?void 0:V.accessor]}}):n,[n,N,I,j]),setColumnsOrder:E,columnsOrder:N,resetColumnsOrder:te,columnsToggle:I,setColumnsToggle:$,resetColumnsToggle:ne,columnsWidth:j,setColumnsWidth:X,setColumnWidth:(V,ce)=>{let oe=j.map(ee=>ee[V]?{[V]:ce}:ee);X(oe)},resetColumnsWidth:ue}};function ti(){var s;let[i]=At.useResizeObserver(),{width:n,height:r}=((s=i.current)==null?void 0:s.getBoundingClientRect())||{width:0,height:0};return{ref:i,width:n,height:r}}var X1=typeof window<"u"?ye.useLayoutEffect:ye.useEffect;function e0(i){let[n,r]=ye.useState(null),s=(i==null?void 0:i.join(":"))||"";return ye.useEffect(()=>{r(null)},[s]),{lastSelectionChangeIndex:n,setLastSelectionChangeIndex:r}}function t0(i,n){let r=()=>{n(i.map(l=>l.matches))},s=i.map(l=>{try{return l.addEventListener("change",r),()=>l.removeEventListener("change",r)}catch{return l.addListener(r),()=>l.removeListener(r)}});return()=>{s.forEach(l=>l())}}function n0(i,n){return n||(typeof window<"u"&&"matchMedia"in window?i.map(r=>window.matchMedia(r).matches):i.map(()=>!1))}function r0(i,n,{getInitialValueInEffect:r}={getInitialValueInEffect:!0}){let[s,l]=ye.useState(r?n:n0(i,n)),d=ye.useRef(null);return ye.useEffect(()=>{if("matchMedia"in window)return d.current=i.map(m=>window.matchMedia(m)),l(d.current.map(m=>m.matches)),t0(d.current,m=>{l(m)})},[i]),s}function i0(i){let n=B.useMantineTheme(),r=ye.useMemo(()=>i.map(l=>(typeof l=="function"?l(n):l)??""),[i,n]),s=ye.useMemo(()=>i.map(()=>!0),[i]);return r0(r,s)}function Ko(i){let n=B.useMantineTheme(),r=typeof i=="function"?i(n):i;return At.useMediaQuery(r||"",!0)}function Ta(i){let n=i.replace(/([a-z\d])([A-Z]+)/g,"$1 $2").replace(/\W|_/g," ").trim().toLowerCase();return`${n.charAt(0).toUpperCase()}${n.slice(1)}`}function o0(i,n,r){return i.filter(s=>!n.map(r).includes(r(s)))}function Ma(i,n){return i.filter((r,s,l)=>s===l.findIndex(d=>n(r)===n(d)))}function Fc(i,n){return n?n.match(/([^[.\]])+/g).reduce((r,s)=>r&&r[s],i):void 0}function Bt(i,n){return typeof n=="string"?Fc(i,n):n(i)}function s0({rowExpansion:i,records:n,idAccessor:r}){let s=[];if(i&&n){let{trigger:c,allowMultiple:x,initiallyExpanded:C}=i;n&&c==="always"?s=n.map(O=>Bt(O,r)):C&&(s=n.filter((O,R)=>C({record:O,index:R})).map(O=>Bt(O,r)),x||(s=[s[0]]))}let l,d,m=ye.useState(s);if(i){let{expandable:c,trigger:x,allowMultiple:C,collapseProps:O,content:R}=i;i.expanded?{recordIds:l,onRecordIdsChange:d}=i.expanded:[l,d]=m;let N=E=>d==null?void 0:d(l.filter(I=>I!==Bt(E,r)));return{expandOnClick:x!=="always"&&x!=="never",isRowExpanded:E=>x==="always"?!0:l.includes(Bt(E,r)),isExpandable:({record:E,index:I})=>c?c({record:E,index:I}):!0,expandRow:E=>{let I=Bt(E,r);d==null||d(C?[...l,I]:[I])},collapseRow:N,collapseProps:O,content:({record:E,index:I})=>()=>R({record:E,index:I,collapse:()=>N(E)})}}}function a0(i,n){let[r,s]=ye.useState(i),[l,d]=ye.useState(i),m=At.useTimeout(()=>s(!0),0),c=At.useTimeout(()=>d(!1),n||200);return ye.useEffect(()=>{i?(c.clear(),d(!0),m.start()):(m.clear(),s(!1),c.start())},[m,c,i]),{expanded:r,visible:l}}var Ea="mantine-datatable-nowrap",Ra="mantine-datatable-ellipsis",ni="mantine-datatable-pointer-cursor",Wc="mantine-datatable-context-menu-cursor",u0="mantine-datatable-text-selection-disabled",Qo="mantine-datatable-text-align-left",Jo="mantine-datatable-text-align-center",Xo="mantine-datatable-text-align-right";function l0({className:i,style:n,visibleMediaQuery:r,title:s,noWrap:l,ellipsis:d,textAlign:m,width:c}){return Ko(r)?T.jsx(B.TableTh,{className:mt({[Ea]:l||d,[Ra]:d,[Qo]:m==="left",[Jo]:m==="center",[Xo]:m==="right"},i),style:[{width:c,minWidth:c,maxWidth:c},n],children:s}):null}function c0({shadowVisible:i}){return T.jsx(B.TableTh,{className:"mantine-datatable-footer-selector-placeholder-cell","data-shadow-visible":i||void 0})}var f0=ye.forwardRef(function({className:i,style:n,columns:r,defaultColumnProps:s,selectionVisible:l,selectorCellShadowVisible:d,scrollDiff:m},c){let x=m<0;return T.jsx(B.TableTfoot,{ref:c,className:mt("mantine-datatable-footer",i),style:[{position:x?"relative":"sticky",bottom:B.rem(x?m:0)},n],children:T.jsxs(B.TableTr,{children:[l&&T.jsx(c0,{shadowVisible:d}),r.map(({hidden:C,...O})=>{if(C)return null;let{accessor:R,visibleMediaQuery:N,textAlign:E,width:I,footer:$,footerClassName:j,footerStyle:X,noWrap:te,ellipsis:ne}={...s,...O};return T.jsx(l0,{className:j,style:X,visibleMediaQuery:N,textAlign:E,width:I,title:$,noWrap:te,ellipsis:ne},R)})]})})});function h0({group:{id:i,columns:n,title:r,textAlign:s,className:l,style:d}}){let m=ye.useMemo(()=>n.map(({visibleMediaQuery:C})=>C),[n]),c=i0(m),x=ye.useMemo(()=>n.filter(({hidden:C},O)=>!C&&(c==null?void 0:c[O])).length,[n,c]);return x>0?T.jsx(B.TableTh,{colSpan:x,className:mt("mantine-datatable-column-group-header-cell",{[Qo]:s==="left",[Jo]:s==="center",[Xo]:s==="right"},l),style:d,children:r??Ta(i)}):null}function d0(){return T.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[T.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),T.jsx("path",{d:"M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z"})]})}function p0(){return T.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[T.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),T.jsx("path",{d:"M20 3h-16a1 1 0 0 0 -1 1v2.227l.008 .223a3 3 0 0 0 .772 1.795l4.22 4.641v8.114a1 1 0 0 0 1.316 .949l6 -2l.108 -.043a1 1 0 0 0 .576 -.906v-6.586l4.121 -4.12a3 3 0 0 0 .879 -2.123v-2.171a1 1 0 0 0 -1 -1z",strokeWidth:"0",fill:"currentColor"})]})}function g0({children:i,isActive:n,filterPopoverProps:r}){let[s,{close:l,toggle:d}]=At.useDisclosure(!1),m=n?p0:d0,c=At.useClickOutside(l);return T.jsxs(B.Popover,{withArrow:!0,shadow:"md",opened:s,onClose:l,trapFocus:!0,...r,children:[T.jsx(B.PopoverTarget,{children:T.jsx(B.ActionIcon,{className:"mantine-datatable-header-cell-filter-action-icon","data-active":n||void 0,size:"sm",variant:"default",onClick:x=>{x.preventDefault(),d()},onKeyDown:x=>x.stopPropagation(),children:T.jsx(m,{})})}),T.jsx(B.PopoverDropdown,{ref:c,onClick:x=>x.stopPropagation(),onKeyDown:x=>x.stopPropagation(),children:typeof i=="function"?i({close:l}):i})]})}var m0=i=>{let{accessor:n,columnRef:r}=i,s=ye.useRef(null),[l,d]=ye.useState(0),{setColumnWidth:m}=Oa(),c=O=>{O.preventDefault(),O.stopPropagation(),document.addEventListener("mousemove",x),document.addEventListener("mouseup",C),document.body.style.cursor="col-resize"},x=O=>{if(!r.current)return;let R=O.clientX-r.current.getBoundingClientRect().right,N=`${r.current.getBoundingClientRect().width+R}px`;r.current.style.width=N,m(n,r.current.style.width),d(-R)},C=()=>{r.current&&(document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",C),document.body.style.cursor="initial",m(n,r.current.style.width),d(0))};return T.jsx("div",{ref:s,onClick:O=>O.stopPropagation(),onMouseDown:c,onDoubleClick:()=>{r.current&&(r.current.style.maxWidth="initial",r.current.style.minWidth="initial",r.current.style.width="initial",m(n,"initial"))},className:"mantine-datatable-header-resizable-handle",style:{right:B.rem(l)}})};function v0(){return T.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[T.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),T.jsx("path",{d:"M12 5l0 14"}),T.jsx("path",{d:"M16 9l-4 -4"}),T.jsx("path",{d:"M8 9l4 -4"})]})}function y0(){return T.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[T.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),T.jsx("path",{d:"M8 7l4 -4l4 4"}),T.jsx("path",{d:"M8 17l4 4l4 -4"}),T.jsx("path",{d:"M12 3l0 18"})]})}function _0(){return T.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[T.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),T.jsx("path",{d:"M9 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),T.jsx("path",{d:"M9 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),T.jsx("path",{d:"M9 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),T.jsx("path",{d:"M15 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),T.jsx("path",{d:"M15 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),T.jsx("path",{d:"M15 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"})]})}function w0(){return T.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[T.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),T.jsx("path",{d:"M18 6l-12 12"}),T.jsx("path",{d:"M6 6l12 12"})]})}function b0({className:i,style:n,accessor:r,visibleMediaQuery:s,title:l,sortable:d,draggable:m,toggleable:c,resizable:x,sortIcons:C,textAlign:O,width:R,sortStatus:N,onSortStatusChange:E,filter:I,filterPopoverProps:$,filtering:j,sortKey:X}){let{setSourceColumn:te,setTargetColumn:ne,swapColumns:ue,setColumnsToggle:V}=Oa(),[ce,oe]=ye.useState(!1),ee=ye.useRef(null);if(!Ko(s))return null;let de=l??Ta(r),pe=typeof de=="string"?de:void 0,re=d&&E?p=>{p!=null&&p.defaultPrevented||E({sortKey:X,columnAccessor:r,direction:(N==null?void 0:N.columnAccessor)===r?N.direction==="asc"?"desc":"asc":(N==null?void 0:N.direction)??"asc"})}:void 0,Ae=p=>{p.stopPropagation(),te(r),oe(!1)},Se=p=>{p.preventDefault(),ne(r),oe(!0)},Y=()=>{ne(r),oe(!1),ue()},L=()=>{oe(!0)},A=()=>{oe(!1)},g=p=>{p.stopPropagation(),V(w=>w.map(h=>h.accessor===r?{...h,toggled:!1}:h))};return T.jsxs(B.TableTh,{className:mt({"mantine-datatable-header-cell-sortable":d,"mantine-datatable-header-cell-toggleable":c,"mantine-datatable-header-cell-resizable":x},i),style:[{width:R,...x?{minWidth:"1px"}:{minWidth:R,maxWidth:R}},n],role:d?"button":void 0,tabIndex:d?0:void 0,onClick:re,onKeyDown:p=>p.key==="Enter"&&(re==null?void 0:re()),ref:ee,children:[T.jsxs(B.Group,{className:"mantine-datatable-header-cell-sortable-group",justify:"space-between",wrap:"nowrap",children:[T.jsxs(B.Flex,{align:"center",w:"100%",className:mt({"mantine-datatable-header-cell-draggable":m,"mantine-datatable-header-cell-drag-over":ce}),draggable:m,onDragStart:m?Ae:void 0,onDragEnter:m?L:void 0,onDragOver:m?Se:void 0,onDrop:m?Y:void 0,onDragLeave:m?A:void 0,children:[m?T.jsx(B.Center,{role:"img","aria-label":"Drag column",children:T.jsx(B.ActionIcon,{className:"mantine-datatable-header-cell-draggable-action-icon",variant:"subtle",size:"xs",onClick:p=>{p.stopPropagation()},children:T.jsx(_0,{})})}):null,T.jsx(B.Box,{className:mt("mantine-datatable-header-cell-sortable-text",{[Qo]:O==="left",[Jo]:O==="center",[Xo]:O==="right"},Ea,Ra),title:pe,children:de})]}),c?T.jsx(B.Center,{className:"mantine-datatable-header-cell-toggleable-icon",role:"img","aria-label":"Toggle column",children:T.jsx(B.ActionIcon,{size:"xs",variant:"light",onClick:g,children:T.jsx(w0,{})})}):null,d||(N==null?void 0:N.columnAccessor)===r?T.jsx(T.Fragment,{children:(N==null?void 0:N.columnAccessor)===r?T.jsx(B.Center,{className:mt("mantine-datatable-header-cell-sortable-icon",{"mantine-datatable-header-cell-sortable-icon-reversed":N.direction==="desc"}),role:"img","aria-label":`Sorted ${N.direction==="desc"?"descending":"ascending"}`,children:(C==null?void 0:C.sorted)||T.jsx(v0,{})}):T.jsx(B.Center,{className:"mantine-datatable-header-cell-sortable-unsorted-icon",role:"img","aria-label":"Not sorted",children:(C==null?void 0:C.unsorted)||T.jsx(y0,{})})}):null,I?T.jsx(g0,{filterPopoverProps:$,isActive:!!j,children:I}):null]}),x?T.jsx(m0,{accessor:r,columnRef:ee}):null]})}var x0=ye.forwardRef(function({className:i,style:n,trigger:r,shadowVisible:s,checked:l,indeterminate:d,checkboxProps:m,onChange:c,rowSpan:x},C){let O=!m.disabled;return T.jsx(B.TableTh,{ref:C,className:mt("mantine-datatable-header-selector-cell",{[ni]:r==="cell"&&O},i),style:n,rowSpan:x,"data-shadow-visible":s||void 0,onClick:r==="cell"&&O?c:void 0,children:T.jsx(B.Checkbox,{classNames:O?{input:ni}:void 0,checked:l,indeterminate:d,onChange:c,...m,disabled:!(c||m.onChange)||m.disabled})})}),S0=ye.forwardRef(function({selectionColumnHeaderRef:i,className:n,style:r,sortStatus:s,sortIcons:l,onSortStatusChange:d,columns:m,defaultColumnProps:c,groups:x,selectionTrigger:C,selectionVisible:O,selectionChecked:R,selectionIndeterminate:N,onSelectionChange:E,selectionCheckboxProps:I,selectorCellShadowVisible:$,selectionColumnClassName:j,selectionColumnStyle:X},te){let ne=O?T.jsx(x0,{ref:i,className:j,style:X,trigger:C,shadowVisible:$,checked:R,indeterminate:N,checkboxProps:I,onChange:E,rowSpan:x?2:void 0}):null,{columnsToggle:ue,setColumnsToggle:V}=Oa(),[ce,oe]=ye.useState(!1),ee=m.some(re=>re.toggleable),de=ee?Object.fromEntries(m.map(({accessor:re,title:Ae})=>[re,Ae??Ta(String(re))])):void 0,pe=T.jsxs(B.TableThead,{className:mt("mantine-datatable-header",n),style:r,ref:te,onContextMenu:ee?re=>{re.preventDefault(),oe(Ae=>!Ae)}:void 0,children:[x&&T.jsxs(B.TableTr,{children:[ne,x.map(re=>T.jsx(h0,{group:re},re.id))]}),T.jsxs(B.TableTr,{children:[!x&&ne,m.map(({hidden:re,...Ae},Se)=>{if(re)return null;let{accessor:Y,visibleMediaQuery:L,textAlign:A,width:g,title:p,sortable:w,draggable:h,toggleable:v,resizable:D,titleClassName:z,titleStyle:Z,filter:ae,filterPopoverProps:fe,filtering:_e,sortKey:J}={...c,...Ae};return T.jsx(b0,{accessor:Y,className:z,style:Z,visibleMediaQuery:L,textAlign:A,width:g,title:p,sortable:w,draggable:h,toggleable:v,resizable:D&&Se<m.length-1,sortStatus:s,sortIcons:l,sortKey:J,onSortStatusChange:d,filter:ae,filterPopoverProps:fe,filtering:_e},Y)})]})]});return ee?T.jsxs(B.Popover,{position:"bottom",withArrow:!0,shadow:"md",opened:ce,onChange:oe,children:[T.jsx(B.PopoverTarget,{children:pe}),T.jsx(B.PopoverDropdown,{children:T.jsx(B.Stack,{children:ue.filter(re=>re.toggleable).map(re=>T.jsx(B.Group,{children:T.jsx(B.Checkbox,{classNames:{label:"mantine-datatable-header-column-toggle-checkbox-label"},size:"xs",label:de[re.accessor],checked:re.toggled,onChange:Ae=>{V(ue.map(Se=>Se.accessor===re.accessor?{...Se,toggled:Ae.currentTarget.checked}:Se))}})},re.accessor))})})]}):pe});function C0({pt:i,pb:n,fetching:r,customContent:s,backgroundBlur:l,size:d,type:m,color:c}){return T.jsx(B.Center,{pt:i,pb:n,className:mt("mantine-datatable-loader",{"mantine-datatable-loader-fetching":r}),style:[{backdropFilter:l?`blur(${l}px)`:void 0}],children:r&&(s||T.jsx(B.Loader,{size:d,type:m,color:c}))})}function bt(i,n,r){return i?B.parseThemeColor({color:typeof i=="object"?i[r]:i,theme:n}).value:void 0}function A0({theme:i,c:n,backgroundColor:r,borderColor:s,rowBorderColor:l,stripedColor:d,highlightOnHoverColor:m}){return{"--mantine-datatable-color-light":bt(n,i,"light"),"--mantine-datatable-color-dark":bt(n,i,"dark"),"--mantine-datatable-background-color-light":bt(r,i,"light"),"--mantine-datatable-background-color-dark":bt(r,i,"dark"),"--mantine-datatable-border-color-light":bt(s,i,"light"),"--mantine-datatable-border-color-dark":bt(s,i,"dark"),"--mantine-datatable-row-border-color-light":bt(l,i,"light"),"--mantine-datatable-row-border-color-dark":bt(l,i,"dark"),"--mantine-datatable-striped-color-light":bt(d,i,"light"),"--mantine-datatable-striped-color-dark":bt(d,i,"dark"),"--mantine-datatable-highlight-on-hover-color-light":bt(m,i,"light"),"--mantine-datatable-highlight-on-hover-color-dark":bt(m,i,"dark")}}function zc({theme:i,paginationActiveTextColor:n,paginationActiveBackgroundColor:r}){return{"--mantine-datatable-pagination-active-text-color-light":bt(n,i,"light"),"--mantine-datatable-pagination-active-text-color-dark":bt(n,i,"dark"),"--mantine-datatable-pagination-active-background-color-light":bt(r,i,"light"),"--mantine-datatable-pagination-active-background-color-dark":bt(r,i,"dark")}}function D0({theme:i,color:n,backgroundColor:r}){return{"--mantine-datatable-row-color-light":bt(n,i,"light"),"--mantine-datatable-row-color-dark":bt(n,i,"dark"),"--mantine-datatable-row-background-color-light":bt(r,i,"light"),"--mantine-datatable-row-background-color-dark":bt(r,i,"dark")}}function O0(){return T.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[T.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),T.jsx("path",{d:"M8 9l4 -4l4 4"}),T.jsx("path",{d:"M16 15l-4 4l-4 -4"})]})}var qc={xs:B.rem(22),sm:B.rem(26),md:B.rem(32),lg:B.rem(38),xl:B.rem(44)};function T0({size:i,label:n,values:r,value:s,activeTextColor:l,activeBackgroundColor:d,onChange:m}){return T.jsxs(B.Group,{gap:"xs",children:[T.jsx(B.Text,{component:"div",size:i,children:n}),T.jsxs(B.Menu,{withinPortal:!0,withArrow:!0,classNames:{arrow:"mantine-datatable-page-size-selector-menu-arrow"},children:[T.jsx(B.MenuTarget,{children:T.jsx(B.Button,{size:i,variant:"default",classNames:{section:"mantine-datatable-page-size-selector-button-icon"},rightSection:T.jsx(O0,{}),style:[{fontWeight:"normal"},c=>({height:qc[i],paddingLeft:c.spacing[i],paddingRight:c.spacing[i]})],children:s})}),T.jsx(B.MenuDropdown,{children:r.map(c=>{let x=c===s;return T.jsx(B.MenuItem,{className:mt({"mantine-datatable-page-size-selector-active":x}),style:[{height:qc[i]},x&&(l||d)?C=>zc({theme:C,paginationActiveTextColor:l,paginationActiveBackgroundColor:d}):void 0],disabled:x,onClick:()=>m(c),children:T.jsx(B.Text,{component:"div",size:i,children:c})},c)})})]})]})}var M0=ye.forwardRef(function({className:i,style:n,fetching:r,page:s,onPageChange:l,paginationWithEdges:d,paginationWithControls:m,paginationActiveTextColor:c,paginationActiveBackgroundColor:x,paginationSize:C,loadingText:O,noRecordsText:R,paginationText:N,totalRecords:E,recordsPerPage:I,onRecordsPerPageChange:$,recordsPerPageLabel:j,recordsPerPageOptions:X,recordsLength:te,horizontalSpacing:ne,paginationWrapBreakpoint:ue,getPaginationControlProps:V},ce){let oe;if(E){let de=(s-1)*I+1,pe=de+(te||0)-1;oe=N({from:de,to:pe,totalRecords:E})}else oe=r?O:R;let ee=Ko(({breakpoints:de})=>`(min-width: ${typeof ue=="number"?`${B.rem(ue)}rem`:de[ue]||ue})`);return T.jsxs(B.Box,{ref:ce,px:ne??"xs",py:"xs",className:mt("mantine-datatable-pagination",i),style:[{flexDirection:ee?"row":"column"},n],children:[T.jsx(B.Text,{component:"div",className:"mantine-datatable-pagination-text",size:C,children:oe}),X&&T.jsx(T0,{activeTextColor:c,activeBackgroundColor:x,size:C,label:j,values:X,value:I,onChange:$}),T.jsx(B.Pagination,{classNames:{root:mt("mantine-datatable-pagination-pages",{"mantine-datatable-pagination-pages-fetching":r||!te}),control:"mantine-datatable-pagination-pages-control"},style:c||x?de=>zc({theme:de,paginationActiveTextColor:c,paginationActiveBackgroundColor:x}):void 0,withEdges:d,withControls:m,value:s,onChange:l,size:C,total:Math.ceil(E/I),getControlProps:V})]})});function E0({className:i,style:n,visibleMediaQuery:r,record:s,index:l,onClick:d,onDoubleClick:m,onContextMenu:c,noWrap:x,ellipsis:C,textAlign:O,width:R,accessor:N,render:E,defaultRender:I,customCellAttributes:$}){return Ko(r)?T.jsx(B.TableTd,{className:mt({[Ea]:x||C,[Ra]:C,[ni]:d||m,[Wc]:c,[Qo]:O==="left",[Jo]:O==="center",[Xo]:O==="right"},i),style:[{width:R,minWidth:R,maxWidth:R},n],onClick:d,onDoubleClick:m,onContextMenu:c,...$==null?void 0:$(s,l),children:E?E(s,l):I?I(s,l,N):Fc(s,N)}):null}function R0({open:i,colSpan:n,content:r,collapseProps:s}){let{expanded:l,visible:d}=a0(i,s==null?void 0:s.transitionDuration);return d?T.jsxs(T.Fragment,{children:[T.jsx(B.TableTr,{}),T.jsx(B.TableTr,{children:T.jsx(B.TableTd,{className:"mantine-datatable-row-expansion-cell",colSpan:n,children:T.jsx(B.Collapse,{in:l,...s,children:T.jsx("div",{className:"mantine-datatable-row-expansion-cell-content",children:r()})})})})]}):null}function L0({className:i,style:n,record:r,index:s,trigger:l,onChange:d,withRightShadow:m,checkboxProps:c,getCheckboxProps:x,...C}){let O={...c,...x(r,s)},R=!C.disabled&&!O.disabled,N=E=>{E.stopPropagation(),l==="cell"&&R&&(d==null||d(E))};return T.jsx(B.TableTd,{className:mt("mantine-datatable-row-selector-cell",{[ni]:l==="cell"&&R},i),style:n,"data-shadow-visible":m||void 0,onClick:N,children:T.jsx(B.Checkbox,{classNames:R?{input:ni}:void 0,onChange:d,...C,...O})})}function k0({record:i,index:n,columns:r,defaultColumnProps:s,defaultColumnRender:l,selectionTrigger:d,selectionVisible:m,selectionChecked:c,onSelectionChange:x,isRecordSelectable:C,selectionCheckboxProps:O,getSelectionCheckboxProps:R,onClick:N,onDoubleClick:E,onContextMenu:I,onCellClick:$,onCellDoubleClick:j,onCellContextMenu:X,expansion:te,customAttributes:ne,color:ue,backgroundColor:V,className:ce,style:oe,selectorCellShadowVisible:ee,selectionColumnClassName:de,selectionColumnStyle:pe,rowFactory:re}){let Ae=T.jsxs(T.Fragment,{children:[m&&T.jsx(L0,{className:de,style:pe,record:i,index:n,trigger:d,withRightShadow:ee,checked:c,disabled:!x||(C?!C(i,n):!1),onChange:x,checkboxProps:O,getCheckboxProps:R}),r.map(({hidden:L,hiddenContent:A,...g},p)=>{if(L||A)return null;let{accessor:w,visibleMediaQuery:h,textAlign:v,noWrap:D,ellipsis:z,width:Z,render:ae,cellsClassName:fe,cellsStyle:_e,customCellAttributes:J}={...s,...g};return T.jsx(E0,{className:typeof fe=="function"?fe(i,n):fe,style:_e==null?void 0:_e(i,n),visibleMediaQuery:h,record:i,index:n,onClick:$?he=>$({event:he,record:i,index:n,column:g,columnIndex:p}):void 0,onDoubleClick:j?he=>j({event:he,record:i,index:n,column:g,columnIndex:p}):void 0,onContextMenu:X?he=>X({event:he,record:i,index:n,column:g,columnIndex:p}):void 0,accessor:w,textAlign:v,noWrap:D,ellipsis:z,width:Z,render:ae,defaultRender:l,customCellAttributes:J},w)})]}),Se=te&&T.jsx(R0,{colSpan:r.filter(({hidden:L})=>!L).length+(m?1:0),open:te.isRowExpanded(i),content:te.content({record:i,index:n}),collapseProps:te.collapseProps}),Y=I0({record:i,index:n,selectionChecked:c,onClick:N,onDoubleClick:E,onContextMenu:I,expansion:te,customAttributes:ne,color:ue,backgroundColor:V,className:ce,style:oe});return re?re({record:i,index:n,rowProps:Y,children:Ae,expandedElement:Se}):T.jsxs(T.Fragment,{children:[T.jsx(B.TableTr,{...Y,children:Ae}),Se]})}function I0({record:i,index:n,selectionChecked:r,onClick:s,onDoubleClick:l,onContextMenu:d,expansion:m,customAttributes:c,color:x,backgroundColor:C,className:O,style:R}){return{className:mt("mantine-datatable-row",{[ni]:s||l||(m==null?void 0:m.isExpandable({record:i,index:n}))&&(m==null?void 0:m.expandOnClick)},{[Wc]:d},typeof O=="function"?O(i,n):O),"data-selected":r||void 0,onClick:N=>{if(m){let{isExpandable:E,isRowExpanded:I,expandOnClick:$,expandRow:j,collapseRow:X}=m;E({record:i,index:n})&&$&&(I(i)?X(i):j(i))}s==null||s({event:N,record:i,index:n})},onDoubleClick:l?N=>l({event:N,record:i,index:n}):void 0,onContextMenu:d?N=>d({event:N,record:i,index:n}):void 0,style:[x||C?N=>{let E=x==null?void 0:x(i,n),I=C==null?void 0:C(i,n);return D0({theme:N,color:E,backgroundColor:I})}:void 0,R==null?void 0:R(i,n)],...(c==null?void 0:c(i,n))??{}}}function P0({topShadowVisible:i,leftShadowVisible:n,leftShadowBehind:r,rightShadowVisible:s,rightShadowBehind:l,bottomShadowVisible:d,headerHeight:m,footerHeight:c,onScrollPositionChange:x,children:C,viewportRef:O,scrollAreaProps:R}){return T.jsxs(B.ScrollArea,{...R,viewportRef:O,classNames:{root:"mantine-datatable-scroll-area",scrollbar:"mantine-datatable-scroll-area-scrollbar",thumb:"mantine-datatable-scroll-area-thumb",corner:"mantine-datatable-scroll-area-corner"},onScrollPositionChange:x,children:[C,T.jsx(B.Box,{className:mt("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-top-shadow",{"mantine-datatable-scroll-area-shadow-visible":i}),style:{top:m?B.rem(m):0}}),T.jsx("div",{className:mt("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-left-shadow",{"mantine-datatable-scroll-area-shadow-visible":n,"mantine-datatable-scroll-area-shadow-behind":r})}),T.jsx("div",{className:mt("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-right-shadow",{"mantine-datatable-scroll-area-shadow-visible":s,"mantine-datatable-scroll-area-shadow-behind":l})}),T.jsx(B.Box,{className:mt("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-bottom-shadow",{"mantine-datatable-scroll-area-shadow-visible":d}),style:{bottom:c?B.rem(c+1):0}})]})}function N0({withTableBorder:i,borderRadius:n,textSelectionDisabled:r,height:s="100%",minHeight:l,maxHeight:d,shadow:m,verticalAlign:c="center",fetching:x,columns:C,storeColumnsKey:O,groups:R,pinFirstColumn:N,pinLastColumn:E,defaultColumnProps:I,defaultColumnRender:$,idAccessor:j="id",records:X,selectionTrigger:te="checkbox",selectedRecords:ne,onSelectedRecordsChange:ue,selectionColumnClassName:V,selectionColumnStyle:ce,isRecordSelectable:oe,selectionCheckboxProps:ee,allRecordsSelectionCheckboxProps:de={"aria-label":"Select all records"},getRecordSelectionCheckboxProps:pe=(Ht,jn)=>({"aria-label":`Select record ${jn+1}`}),sortStatus:re,sortIcons:Ae,onSortStatusChange:Se,horizontalSpacing:Y,page:L,onPageChange:A,totalRecords:g,recordsPerPage:p,onRecordsPerPageChange:w,recordsPerPageOptions:h,recordsPerPageLabel:v="Records per page",paginationWithEdges:D,paginationWithControls:z,paginationActiveTextColor:Z,paginationActiveBackgroundColor:ae,paginationSize:fe="sm",paginationText:_e=({from:Ht,to:jn,totalRecords:Yn})=>`${Ht} - ${jn} / ${Yn}`,paginationWrapBreakpoint:J="sm",getPaginationControlProps:he=Ht=>Ht==="previous"?{"aria-label":"Previous page"}:Ht==="next"?{"aria-label":"Next page"}:{},loaderBackgroundBlur:De,customLoader:be,loaderSize:P,loaderType:q,loaderColor:F,loadingText:K="...",emptyState:se,noRecordsText:Oe="No records",noRecordsIcon:u,highlightOnHover:f,striped:_,noHeader:M,onRowClick:W,onRowDoubleClick:Q,onRowContextMenu:xe,onCellClick:Me,onCellDoubleClick:Ie,onCellContextMenu:Ce,onScroll:ke,onScrollToTop:Ne,onScrollToBottom:Re,onScrollToLeft:Ge,onScrollToRight:Je,c:Ve,backgroundColor:xt,borderColor:vt,rowBorderColor:ut,stripedColor:qt,highlightOnHoverColor:Dt,rowColor:$n,rowBackgroundColor:fn,rowExpansion:Qt,rowClassName:xn,rowStyle:Bn,customRowAttributes:En,scrollViewportRef:it,scrollAreaProps:It,tableRef:Sn,bodyRef:dr,m:dt,my:Mt,mx:pr,mt:gr,mb:mr,ml:ci,mr:fi,className:hi,classNames:Et,style:La,styles:Rt,rowFactory:ka,tableWrapper:Gi,...Vi}){let{ref:Ht,width:jn,height:Yn}=ti(),Br=ye.useMemo(()=>(R==null?void 0:R.flatMap(Ze=>Ze.columns))??C,[C,R]),es=J1({key:O,columns:Br}),{ref:Ia,height:vr}=ti(),{ref:Pa,width:yr,height:jr}=ti(),{ref:Na,height:$a}=ti(),{ref:ts,height:Zi}=ti(),{ref:ns,width:Ba}=ti(),ja=At.useMergedRef(Pa,Sn),Ya=At.useMergedRef(Ht,it),[Ki,Qi]=ye.useState(!0),[di,Ji]=ye.useState(!0),[Un,rs]=ye.useState(!0),[Yr,Ur]=ye.useState(!0),is=s0({rowExpansion:Qt,records:X,idAccessor:j}),Xi=ye.useCallback(()=>{var wr,br;let Ze=((wr=Ht.current)==null?void 0:wr.scrollTop)??0,Jt=((br=Ht.current)==null?void 0:br.scrollLeft)??0;if(x||jr<=Yn)Qi(!0),Ji(!0);else{let hn=Ze===0,Xt=jr-Ze-Yn<1;Qi(hn),Ji(Xt),hn&&hn!==Ki&&(Ne==null||Ne()),Xt&&Xt!==di&&(Re==null||Re())}if(x||yr===jn)rs(!0),Ur(!0);else{let hn=Jt===0,Xt=yr-Jt-jn<1;rs(hn),Ur(Xt),hn&&hn!==Un&&(Ge==null||Ge()),Xt&&Xt!==Yr&&(Je==null||Je())}},[x,Re,Ge,Je,Ne,Yn,Ht,jn,di,Un,Yr,Ki,jr,yr]);X1(Xi,[Xi]);let eo=At.useDebouncedCallback(Xi,50),os=ye.useCallback(Ze=>{ke==null||ke(Ze),eo()},[eo,ke]),to=ye.useCallback(Ze=>{var Jt;(Jt=Ht.current)==null||Jt.scrollTo({top:0,left:0}),A(Ze)},[A,Ht]),pi=X==null?void 0:X.length,no=X==null?void 0:X.map(Ze=>Bt(Ze,j)),Rn=!!ne,Cn=ne==null?void 0:ne.map(Ze=>Bt(Ze,j)),Fn=no!==void 0&&Cn!==void 0&&Cn.length>0,_r=oe?X==null?void 0:X.filter(oe):X,Fr=_r==null?void 0:_r.map(Ze=>Bt(Ze,j)),gi=Fn&&Fr.every(Ze=>Cn.includes(Ze)),ss=Fn&&Fr.some(Ze=>Cn.includes(Ze)),as=ye.useCallback(()=>{ne&&ue&&ue(gi?ne.filter(Ze=>!Fr.includes(Bt(Ze,j))):Ma([...ne,..._r],Ze=>Bt(Ze,j)))},[gi,j,ue,Fr,_r,ne]),{lastSelectionChangeIndex:Wr,setLastSelectionChangeIndex:us}=e0(no),ro=Rn&&!Un&&!N,Ua={m:dt,my:Mt,mx:pr,mt:gr,mb:mr,ml:ci,mr:fi},Fa=ye.useCallback(({children:Ze})=>Gi?Gi({children:Ze}):Ze,[Gi]);return T.jsx(Uc,{...es,children:T.jsxs(B.Box,{...Ua,className:mt("mantine-datatable",{"mantine-datatable-with-border":i},hi,Et==null?void 0:Et.root),style:[Ze=>({...A0({theme:Ze,c:Ve,backgroundColor:xt,borderColor:vt,rowBorderColor:ut,stripedColor:qt,highlightOnHoverColor:Dt}),borderRadius:Ze.radius[n]||n,boxShadow:Ze.shadows[m]||m,height:s,minHeight:l,maxHeight:d}),La,Rt==null?void 0:Rt.root,{position:"relative"}],children:[T.jsx(P0,{viewportRef:Ya,topShadowVisible:!Ki,leftShadowVisible:!Un,leftShadowBehind:Rn||!!N,rightShadowVisible:!Yr,rightShadowBehind:E,bottomShadowVisible:!di,headerHeight:vr,footerHeight:$a,onScrollPositionChange:os,scrollAreaProps:It,children:T.jsx(Fa,{children:T.jsxs(B.Table,{ref:ja,horizontalSpacing:Y,className:mt("mantine-datatable-table",{[u0]:r,"mantine-datatable-vertical-align-top":c==="top","mantine-datatable-vertical-align-bottom":c==="bottom","mantine-datatable-last-row-border-bottom-visible":Vi.withRowBorders&&jr<Yn,"mantine-datatable-pin-last-column":E,"mantine-datatable-pin-last-column-scrolled":!Yr&&E,"mantine-datatable-selection-column-visible":Rn,"mantine-datatable-pin-first-column":N,"mantine-datatable-pin-first-column-scrolled":!Un&&N},Et==null?void 0:Et.table),style:{...Rt==null?void 0:Rt.table,"--mantine-datatable-selection-column-width":`${Ba}px`},"data-striped":pi&&_||void 0,"data-highlight-on-hover":f||void 0,...Vi,children:[M?null:T.jsx(Uc,{...es,children:T.jsx(S0,{ref:Ia,selectionColumnHeaderRef:ns,className:Et==null?void 0:Et.header,style:Rt==null?void 0:Rt.header,columns:Br,defaultColumnProps:I,groups:R,sortStatus:re,sortIcons:Ae,onSortStatusChange:Se,selectionTrigger:te,selectionVisible:Rn,selectionChecked:gi,selectionIndeterminate:ss&&!gi,onSelectionChange:as,selectionCheckboxProps:{...ee,...de},selectorCellShadowVisible:ro,selectionColumnClassName:V,selectionColumnStyle:ce})}),T.jsx("tbody",{ref:dr,children:pi?X.map((Ze,Jt)=>{let wr=Bt(Ze,j),br=(Cn==null?void 0:Cn.includes(wr))||!1,hn;return ue&&ne&&(hn=Xt=>{if(Xt.nativeEvent.shiftKey&&Wr!==null){let xr=X.filter(Jt>Wr?(Wn,zn)=>zn>=Wr&&zn<=Jt&&(oe?oe(Wn,zn):!0):(Wn,zn)=>zn>=Jt&&zn<=Wr&&(oe?oe(Wn,zn):!0));ue(br?o0(ne,xr,Wn=>Bt(Wn,j)):Ma([...ne,...xr],Wn=>Bt(Wn,j)))}else ue(br?ne.filter(xr=>Bt(xr,j)!==wr):Ma([...ne,Ze],xr=>Bt(xr,j)));us(Jt)}),T.jsx(k0,{record:Ze,index:Jt,columns:Br,defaultColumnProps:I,defaultColumnRender:$,selectionTrigger:te,selectionVisible:Rn,selectionChecked:br,onSelectionChange:hn,isRecordSelectable:oe,selectionCheckboxProps:ee,getSelectionCheckboxProps:pe,onClick:W,onDoubleClick:Q,onCellClick:Me,onCellDoubleClick:Ie,onContextMenu:xe,onCellContextMenu:Ce,expansion:is,color:$n,backgroundColor:fn,className:xn,style:Bn,customAttributes:En,selectorCellShadowVisible:ro,selectionColumnClassName:V,selectionColumnStyle:ce,idAccessor:j,rowFactory:ka},wr)}):T.jsx(Z1,{})}),Br.some(({footer:Ze})=>Ze)&&T.jsx(f0,{ref:Na,className:Et==null?void 0:Et.footer,style:Rt==null?void 0:Rt.footer,columns:Br,defaultColumnProps:I,selectionVisible:Rn,selectorCellShadowVisible:ro,scrollDiff:jr-Yn})]})})}),L&&T.jsx(M0,{ref:ts,className:Et==null?void 0:Et.pagination,style:Rt==null?void 0:Rt.pagination,horizontalSpacing:Y,fetching:x,page:L,onPageChange:to,totalRecords:g,recordsPerPage:p,onRecordsPerPageChange:w,recordsPerPageOptions:h,recordsPerPageLabel:v,paginationWithEdges:D,paginationWithControls:z,paginationActiveTextColor:Z,paginationActiveBackgroundColor:ae,paginationSize:fe,paginationText:_e,paginationWrapBreakpoint:J,getPaginationControlProps:he,noRecordsText:Oe,loadingText:K,recordsLength:pi}),T.jsx(C0,{pt:vr,pb:Zi,fetching:x,backgroundBlur:De,customContent:be,size:P,type:q,color:F}),T.jsx(Q1,{pt:vr,pb:Zi,icon:u,text:Oe,active:!x&&!pi,children:se})]})})}var $0=ye.forwardRef(function({children:i,isDragging:n,...r},s){let l=ye.useRef(null),d=At.useMergedRef(l,s);return ye.useEffect(()=>{if(!l.current||!n)return;let m=l.current.parentElement.parentElement.children[0].children[0];for(let c=0;c<m.children.length;c++){let x=m.children[c].getBoundingClientRect(),C=l.current.children[c];C.style.height=x.height+"px",C.style.width=x.width+"px",C.style.minWidth=x.width+"px",C.style.maxWidth=x.width+"px"}},[n,i]),T.jsx(B.TableTr,{"data-is-dragging":n,ref:d,...r,children:i})});$0.displayName="DataTableDraggableRow";var zi={exports:{}};/**
117
+ `+v,x(`data:${Ae(p)};charset=utf-8,${encodeURIComponent(v)}`,`${w}.svg`)}else x(h.toDataURL(Ae(p)),`${w}.${p}`)}}const R=Y})(),d.default})())}(wa)),wa.exports}Pg();const cc=ye.createContext(void 0);function Ng(i){const n=an.c(9),{children:r,baseUrl:s,queryClient:l}=i;let d;n[0]!==s||n[1]!==l?(d={baseUrl:s,queryClient:l},n[0]=s,n[1]=l,n[2]=d):d=n[2];let m;n[3]!==r||n[4]!==l?(m=T.jsx(xl,{client:l,children:r}),n[3]=r,n[4]=l,n[5]=m):m=n[5];let c;return n[6]!==d||n[7]!==m?(c=T.jsx(cc.Provider,{value:d,children:m}),n[6]=d,n[7]=m,n[8]=c):c=n[8],c}function nr(){const i=ye.useContext(cc);if(!i)throw new Error("useDataTable must be used within a DataTableProvider");return i}function $g(){const i=localStorage.getItem("a360.assumed-org");return i?{"X-Assume-Org":i}:{}}async function kr(){return{"Content-Type":"application/json",Authorization:`Bearer ${await Cg()??""}`,...$g()}}async function fc(i){return fetch(i,{method:"GET",headers:await kr()}).then(async n=>{if(n.status>=400)throw await n.text();return n}).then(n=>n.json()).then(n=>n)}async function hc(i,n){return fetch(`${i}/${n}`,{method:"GET",headers:await kr()}).then(async r=>{if(r.status>=400)throw await r.text();return r}).then(r=>r.json()).then(r=>r)}async function dc(i,n){await fetch(`${i}/${n}`,{method:"DELETE",headers:await kr()}).then(async r=>{if(r.status>=400)throw await r.text();return r})}async function pc(i,n){return fetch(i,{method:"POST",headers:await kr(),body:JSON.stringify(n)}).then(async r=>{if(r.status>=400)throw await r.text();return r}).then(r=>r.status==204?n:r.json()).then(r=>r)}async function Bg(i,n,r){return fetch(n,{method:i,headers:await kr(),body:r?JSON.stringify(r):void 0}).then(async s=>{if(s.status>=400)throw await s.text();return s}).then(s=>{if(s.status!=204)return s.json()}).then(s=>s)}async function gc(i,n){return fetch(`${i}/${n.id}`,{method:"PUT",headers:await kr(),body:JSON.stringify(n)}).then(async r=>{if(r.status>=400)throw await r.text();return r}).then(r=>r.status==204?n:r.json()).then(r=>r)}function mc(i,n,r){const s=an.c(13),{baseUrl:l}=nr();let d;if(s[0]!==r||s[1]!==n){let C;s[3]!==r?(C=r==null?void 0:r.toString(),s[3]=r,s[4]=C):C=s[4],d=[...n.map(jg),String(C)],s[0]=r,s[1]=n,s[2]=d}else d=s[2];let m;s[5]!==i||s[6]!==l||s[7]!==r?(m=()=>hc(`${l}${i}`,r),s[5]=i,s[6]=l,s[7]=r,s[8]=m):m=s[8];const c=!!r;let x;return s[9]!==d||s[10]!==m||s[11]!==c?(x={queryKey:d,queryFn:m,enabled:c},s[9]=d,s[10]=m,s[11]=c,s[12]=x):x=s[12],Al(x)}function jg(i){return i.toString()}function vc(i,n){const r=an.c(8),{baseUrl:s}=nr();let l;r[0]!==n?(l=[...n.map(Yg)],r[0]=n,r[1]=l):l=r[1];let d;r[2]!==i||r[3]!==s?(d=()=>fc(`${s}${i}`),r[2]=i,r[3]=s,r[4]=d):d=r[4];let m;return r[5]!==l||r[6]!==d?(m={queryKey:l,queryFn:d},r[5]=l,r[6]=d,r[7]=m):m=r[7],Al(m)}function Yg(i){return i.toString()}function yc(i,n){const r=an.c(10),{baseUrl:s,queryClient:l}=nr();let d;r[0]!==n?(d=[...n.map(Fg)],r[0]=n,r[1]=d):d=r[1];let m;r[2]!==i||r[3]!==s?(m=x=>pc(`${s}${i}`,x),r[2]=i,r[3]=s,r[4]=m):m=r[4];let c;return r[5]!==l||r[6]!==n||r[7]!==d||r[8]!==m?(c={mutationKey:d,mutationFn:m,onSettled(){return l.invalidateQueries({queryKey:[...n.map(Ug)]})}},r[5]=l,r[6]=n,r[7]=d,r[8]=m,r[9]=c):c=r[9],ta(c)}function Ug(i){return i.toString()}function Fg(i){return i.toString()}function ba(i,n){const r=an.c(10),{baseUrl:s,queryClient:l}=nr();let d;r[0]!==n?(d=[...n.map(zg)],r[0]=n,r[1]=d):d=r[1];let m;r[2]!==i||r[3]!==s?(m=x=>gc(`${s}${i}`,x),r[2]=i,r[3]=s,r[4]=m):m=r[4];let c;return r[5]!==l||r[6]!==n||r[7]!==d||r[8]!==m?(c={mutationKey:d,mutationFn:m,onSettled(){return l.invalidateQueries({queryKey:[...n.map(Wg)]})}},r[5]=l,r[6]=n,r[7]=d,r[8]=m,r[9]=c):c=r[9],ta(c)}function Wg(i){return i.toString()}function zg(i){return i.toString()}function _c(i,n){const r=an.c(10),{baseUrl:s,queryClient:l}=nr();let d;r[0]!==n?(d=[...n.map(Hg)],r[0]=n,r[1]=d):d=r[1];let m;r[2]!==i||r[3]!==s?(m=x=>dc(`${s}${i}`,x),r[2]=i,r[3]=s,r[4]=m):m=r[4];let c;return r[5]!==l||r[6]!==n||r[7]!==d||r[8]!==m?(c={mutationKey:d,mutationFn:m,onSettled(){return l.invalidateQueries({queryKey:[...n.map(qg)]})}},r[5]=l,r[6]=n,r[7]=d,r[8]=m,r[9]=c):c=r[9],ta(c)}function qg(i){return i.toString()}function Hg(i){return i.toString()}var No={exports:{}},Gg=No.exports,wc;function Vg(){return wc||(wc=1,function(i,n){(function(r,s){i.exports=s()})(Gg,function(){var r=1e3,s=6e4,l=36e5,d="millisecond",m="second",c="minute",x="hour",C="day",O="week",E="month",N="quarter",M="year",I="date",$="Invalid Date",j=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,J=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,te={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(Y){var R=["th","st","nd","rd"],A=Y%100;return"["+Y+(R[(A-20)%10]||R[A]||R[0])+"]"}},ne=function(Y,R,A){var g=String(Y);return!g||g.length>=R?Y:""+Array(R+1-g.length).join(A)+Y},ue={s:ne,z:function(Y){var R=-Y.utcOffset(),A=Math.abs(R),g=Math.floor(A/60),p=A%60;return(R<=0?"+":"-")+ne(g,2,"0")+":"+ne(p,2,"0")},m:function Y(R,A){if(R.date()<A.date())return-Y(A,R);var g=12*(A.year()-R.year())+(A.month()-R.month()),p=R.clone().add(g,E),w=A-p<0,h=R.clone().add(g+(w?-1:1),E);return+(-(g+(A-p)/(w?p-h:h-p))||0)},a:function(Y){return Y<0?Math.ceil(Y)||0:Math.floor(Y)},p:function(Y){return{M:E,y:M,w:O,d:C,D:I,h:x,m:c,s:m,ms:d,Q:N}[Y]||String(Y||"").toLowerCase().replace(/s$/,"")},u:function(Y){return Y===void 0}},Z="en",le={};le[Z]=te;var oe="$isDayjsObject",X=function(Y){return Y instanceof Oe||!(!Y||!Y[oe])},me=function Y(R,A,g){var p;if(!R)return Z;if(typeof R=="string"){var w=R.toLowerCase();le[w]&&(p=w),A&&(le[w]=A,p=w);var h=R.split("-");if(!p&&h.length>1)return Y(h[0])}else{var v=R.name;le[v]=R,p=v}return!g&&p&&(Z=p),p||!g&&Z},de=function(Y,R){if(X(Y))return Y.clone();var A=typeof R=="object"?R:{};return A.date=Y,A.args=arguments,new Oe(A)},re=ue;re.l=me,re.i=X,re.w=function(Y,R){return de(Y,{locale:R.$L,utc:R.$u,x:R.$x,$offset:R.$offset})};var Oe=function(){function Y(A){this.$L=me(A.locale,null,!0),this.parse(A),this.$x=this.$x||A.x||{},this[oe]=!0}var R=Y.prototype;return R.parse=function(A){this.$d=function(g){var p=g.date,w=g.utc;if(p===null)return new Date(NaN);if(re.u(p))return new Date;if(p instanceof Date)return new Date(p);if(typeof p=="string"&&!/Z$/i.test(p)){var h=p.match(j);if(h){var v=h[2]-1||0,D=(h[7]||"0").substring(0,3);return w?new Date(Date.UTC(h[1],v,h[3]||1,h[4]||0,h[5]||0,h[6]||0,D)):new Date(h[1],v,h[3]||1,h[4]||0,h[5]||0,h[6]||0,D)}}return new Date(p)}(A),this.init()},R.init=function(){var A=this.$d;this.$y=A.getFullYear(),this.$M=A.getMonth(),this.$D=A.getDate(),this.$W=A.getDay(),this.$H=A.getHours(),this.$m=A.getMinutes(),this.$s=A.getSeconds(),this.$ms=A.getMilliseconds()},R.$utils=function(){return re},R.isValid=function(){return this.$d.toString()!==$},R.isSame=function(A,g){var p=de(A);return this.startOf(g)<=p&&p<=this.endOf(g)},R.isAfter=function(A,g){return de(A)<this.startOf(g)},R.isBefore=function(A,g){return this.endOf(g)<de(A)},R.$g=function(A,g,p){return re.u(A)?this[g]:this.set(p,A)},R.unix=function(){return Math.floor(this.valueOf()/1e3)},R.valueOf=function(){return this.$d.getTime()},R.startOf=function(A,g){var p=this,w=!!re.u(g)||g,h=re.p(A),v=function(he,De){var _e=re.w(p.$u?Date.UTC(p.$y,De,he):new Date(p.$y,De,he),p);return w?_e:_e.endOf(C)},D=function(he,De){return re.w(p.toDate()[he].apply(p.toDate("s"),(w?[0,0,0,0]:[23,59,59,999]).slice(De)),p)},W=this.$W,V=this.$M,ae=this.$D,fe="set"+(this.$u?"UTC":"");switch(h){case M:return w?v(1,0):v(31,11);case E:return w?v(1,V):v(0,V+1);case O:var we=this.$locale().weekStart||0,ee=(W<we?W+7:W)-we;return v(w?ae-ee:ae+(6-ee),V);case C:case I:return D(fe+"Hours",0);case x:return D(fe+"Minutes",1);case c:return D(fe+"Seconds",2);case m:return D(fe+"Milliseconds",3);default:return this.clone()}},R.endOf=function(A){return this.startOf(A,!1)},R.$set=function(A,g){var p,w=re.p(A),h="set"+(this.$u?"UTC":""),v=(p={},p[C]=h+"Date",p[I]=h+"Date",p[E]=h+"Month",p[M]=h+"FullYear",p[x]=h+"Hours",p[c]=h+"Minutes",p[m]=h+"Seconds",p[d]=h+"Milliseconds",p)[w],D=w===C?this.$D+(g-this.$W):g;if(w===E||w===M){var W=this.clone().set(I,1);W.$d[v](D),W.init(),this.$d=W.set(I,Math.min(this.$D,W.daysInMonth())).$d}else v&&this.$d[v](D);return this.init(),this},R.set=function(A,g){return this.clone().$set(A,g)},R.get=function(A){return this[re.p(A)]()},R.add=function(A,g){var p,w=this;A=Number(A);var h=re.p(g),v=function(V){var ae=de(w);return re.w(ae.date(ae.date()+Math.round(V*A)),w)};if(h===E)return this.set(E,this.$M+A);if(h===M)return this.set(M,this.$y+A);if(h===C)return v(1);if(h===O)return v(7);var D=(p={},p[c]=s,p[x]=l,p[m]=r,p)[h]||1,W=this.$d.getTime()+A*D;return re.w(W,this)},R.subtract=function(A,g){return this.add(-1*A,g)},R.format=function(A){var g=this,p=this.$locale();if(!this.isValid())return p.invalidDate||$;var w=A||"YYYY-MM-DDTHH:mm:ssZ",h=re.z(this),v=this.$H,D=this.$m,W=this.$M,V=p.weekdays,ae=p.months,fe=p.meridiem,we=function(De,_e,P,z){return De&&(De[_e]||De(g,w))||P[_e].slice(0,z)},ee=function(De){return re.s(v%12||12,De,"0")},he=fe||function(De,_e,P){var z=De<12?"AM":"PM";return P?z.toLowerCase():z};return w.replace(J,function(De,_e){return _e||function(P){switch(P){case"YY":return String(g.$y).slice(-2);case"YYYY":return re.s(g.$y,4,"0");case"M":return W+1;case"MM":return re.s(W+1,2,"0");case"MMM":return we(p.monthsShort,W,ae,3);case"MMMM":return we(ae,W);case"D":return g.$D;case"DD":return re.s(g.$D,2,"0");case"d":return String(g.$W);case"dd":return we(p.weekdaysMin,g.$W,V,2);case"ddd":return we(p.weekdaysShort,g.$W,V,3);case"dddd":return V[g.$W];case"H":return String(v);case"HH":return re.s(v,2,"0");case"h":return ee(1);case"hh":return ee(2);case"a":return he(v,D,!0);case"A":return he(v,D,!1);case"m":return String(D);case"mm":return re.s(D,2,"0");case"s":return String(g.$s);case"ss":return re.s(g.$s,2,"0");case"SSS":return re.s(g.$ms,3,"0");case"Z":return h}return null}(De)||h.replace(":","")})},R.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},R.diff=function(A,g,p){var w,h=this,v=re.p(g),D=de(A),W=(D.utcOffset()-this.utcOffset())*s,V=this-D,ae=function(){return re.m(h,D)};switch(v){case M:w=ae()/12;break;case E:w=ae();break;case N:w=ae()/3;break;case O:w=(V-W)/6048e5;break;case C:w=(V-W)/864e5;break;case x:w=V/l;break;case c:w=V/s;break;case m:w=V/r;break;default:w=V}return p?w:re.a(w)},R.daysInMonth=function(){return this.endOf(E).$D},R.$locale=function(){return le[this.$L]},R.locale=function(A,g){if(!A)return this.$L;var p=this.clone(),w=me(A,g,!0);return w&&(p.$L=w),p},R.clone=function(){return re.w(this.$d,this)},R.toDate=function(){return new Date(this.valueOf())},R.toJSON=function(){return this.isValid()?this.toISOString():null},R.toISOString=function(){return this.$d.toISOString()},R.toString=function(){return this.$d.toUTCString()},Y}(),Ae=Oe.prototype;return de.prototype=Ae,[["$ms",d],["$s",m],["$m",c],["$H",x],["$W",C],["$M",E],["$y",M],["$D",I]].forEach(function(Y){Ae[Y[1]]=function(R){return this.$g(R,Y[0],Y[1])}}),de.extend=function(Y,R){return Y.$i||(Y(R,Oe,de),Y.$i=!0),de},de.locale=me,de.isDayjs=X,de.unix=function(Y){return de(1e3*Y)},de.en=le[Z],de.Ls=le,de.p={},de})}(No)),No.exports}var Zg=Vg();const Ee=il(Zg);function Kg({direction:i,levelIndex:n,rowIndex:r,cellIndex:s,size:l}){switch(i){case"up":return n===0&&r===0?null:r===0?{levelIndex:n-1,rowIndex:s<=l[n-1][l[n-1].length-1]-1?l[n-1].length-1:l[n-1].length-2,cellIndex:s}:{levelIndex:n,rowIndex:r-1,cellIndex:s};case"down":return r===l[n].length-1?{levelIndex:n+1,rowIndex:0,cellIndex:s}:r===l[n].length-2&&s>=l[n][l[n].length-1]?{levelIndex:n+1,rowIndex:0,cellIndex:s}:{levelIndex:n,rowIndex:r+1,cellIndex:s};case"left":return n===0&&r===0&&s===0?null:r===0&&s===0?{levelIndex:n-1,rowIndex:l[n-1].length-1,cellIndex:l[n-1][l[n-1].length-1]-1}:s===0?{levelIndex:n,rowIndex:r-1,cellIndex:l[n][r-1]-1}:{levelIndex:n,rowIndex:r,cellIndex:s-1};case"right":return r===l[n].length-1&&s===l[n][r]-1?{levelIndex:n+1,rowIndex:0,cellIndex:0}:s===l[n][r]-1?{levelIndex:n,rowIndex:r+1,cellIndex:0}:{levelIndex:n,rowIndex:r,cellIndex:s+1};default:return{levelIndex:n,rowIndex:r,cellIndex:s}}}function bc({controlsRef:i,direction:n,levelIndex:r,rowIndex:s,cellIndex:l,size:d}){var x,C,O;const m=Kg({direction:n,size:d,rowIndex:s,cellIndex:l,levelIndex:r});if(!m)return;const c=(O=(C=(x=i.current)==null?void 0:x[m.levelIndex])==null?void 0:C[m.rowIndex])==null?void 0:O[m.cellIndex];c&&(c.disabled||c.getAttribute("data-hidden")||c.getAttribute("data-outside")?bc({controlsRef:i,direction:n,levelIndex:m.levelIndex,cellIndex:m.cellIndex,rowIndex:m.rowIndex,size:d}):c.focus())}function Qg(i){switch(i){case"ArrowDown":return"down";case"ArrowUp":return"up";case"ArrowRight":return"right";case"ArrowLeft":return"left";default:return null}}function Jg(i){var n;return(n=i.current)==null?void 0:n.map(r=>r.map(s=>s.length))}function xa({controlsRef:i,levelIndex:n,rowIndex:r,cellIndex:s,event:l}){const d=Qg(l.key);if(d){l.preventDefault();const m=Jg(i);bc({controlsRef:i,direction:d,levelIndex:n,rowIndex:r,cellIndex:s,size:m})}}function cn(i){return i==null||i===""?i:Ee(i).format("YYYY-MM-DD")}function xc(i){return i==null||i===""?i:Ee(i).format("YYYY-MM-DD HH:mm:ss")}const Xg={locale:"en",firstDayOfWeek:1,weekendDays:[0,6],labelSeparator:"–",consistentWeeks:!1},e1=ye.createContext(Xg);function rr(){const i=ye.useContext(e1),n=ye.useCallback(d=>d||i.locale,[i.locale]),r=ye.useCallback(d=>typeof d=="number"?d:i.firstDayOfWeek,[i.firstDayOfWeek]),s=ye.useCallback(d=>Array.isArray(d)?d:i.weekendDays,[i.weekendDays]),l=ye.useCallback(d=>typeof d=="string"?d:i.labelSeparator,[i.labelSeparator]);return{...i,getLocale:n,getFirstDayOfWeek:r,getWeekendDays:s,getLabelSeparator:l}}function t1({value:i,type:n,withTime:r}){const s=r?xc:cn;if(n==="range"&&Array.isArray(i)){const l=s(i[0]),d=s(i[1]);return l?d?`${l} – ${d}`:`${l} –`:""}return n==="multiple"&&Array.isArray(i)?i.filter(Boolean).join(", "):!Array.isArray(i)&&i?s(i):""}function Sc({value:i,type:n,name:r,form:s,withTime:l=!1}){return T.jsx("input",{type:"hidden",value:t1({value:i,type:n,withTime:l}),name:r,form:s})}Sc.displayName="@mantine/dates/HiddenDatesInput";function Cc(i){var n,r,s="";if(typeof i=="string"||typeof i=="number")s+=i;else if(typeof i=="object")if(Array.isArray(i)){var l=i.length;for(n=0;n<l;n++)i[n]&&(r=Cc(i[n]))&&(s&&(s+=" "),s+=r)}else for(r in i)i[r]&&(s&&(s+=" "),s+=r);return s}function mt(){for(var i,n,r=0,s="",l=arguments.length;r<l;r++)(i=arguments[r])&&(n=Cc(i))&&(s&&(s+=" "),s+=n);return s}var Ac={day:"m_396ce5cb"};const n1={},r1=B.createVarsResolver((i,{size:n})=>({day:{"--day-size":B.getSize(n,"day-size")}})),Sa=B.factory((i,n)=>{const r=B.useProps("Day",n1,i),{classNames:s,className:l,style:d,styles:m,unstyled:c,vars:x,date:C,disabled:O,__staticSelector:E,weekend:N,outside:M,selected:I,renderDay:$,inRange:j,firstInRange:J,lastInRange:te,hidden:ne,static:ue,highlightToday:Z,...le}=r,oe=B.useStyles({name:E||"Day",classes:Ac,props:r,className:l,style:d,classNames:s,styles:m,unstyled:c,vars:x,varsResolver:r1,rootSelector:"day"});return T.jsx(B.UnstyledButton,{...oe("day",{style:ne?{display:"none"}:void 0}),component:ue?"div":"button",ref:n,disabled:O,"data-today":Ee(C).isSame(new Date,"day")||void 0,"data-hidden":ne||void 0,"data-highlight-today":Z||void 0,"data-disabled":O||void 0,"data-weekend":!O&&!M&&N||void 0,"data-outside":!O&&M||void 0,"data-selected":!O&&I||void 0,"data-in-range":j&&!O||void 0,"data-first-in-range":J&&!O||void 0,"data-last-in-range":te&&!O||void 0,"data-static":ue||void 0,unstyled:c,...le,children:($==null?void 0:$(C))||Ee(C).date()})});Sa.classes=Ac,Sa.displayName="@mantine/dates/Day";function i1({locale:i,format:n="dd",firstDayOfWeek:r=1}){const s=Ee().day(r),l=[];for(let d=0;d<7;d+=1)typeof n=="string"?l.push(Ee(s).add(d,"days").locale(i).format(n)):l.push(n(Ee(s).add(d,"days").format("YYYY-MM-DD")));return l}var Dc={weekday:"m_18a3eca"};const o1={},s1=B.createVarsResolver((i,{size:n})=>({weekdaysRow:{"--wr-fz":B.getFontSize(n),"--wr-spacing":B.getSpacing(n)}})),Ca=B.factory((i,n)=>{const r=B.useProps("WeekdaysRow",o1,i),{classNames:s,className:l,style:d,styles:m,unstyled:c,vars:x,locale:C,firstDayOfWeek:O,weekdayFormat:E,cellComponent:N="th",__staticSelector:M,withWeekNumbers:I,...$}=r,j=B.useStyles({name:M||"WeekdaysRow",classes:Dc,props:r,className:l,style:d,classNames:s,styles:m,unstyled:c,vars:x,varsResolver:s1,rootSelector:"weekdaysRow"}),J=rr(),te=i1({locale:J.getLocale(C),format:E,firstDayOfWeek:J.getFirstDayOfWeek(O)}).map((ne,ue)=>T.jsx(N,{...j("weekday"),children:ne},ue));return T.jsxs(B.Box,{component:"tr",ref:n,...j("weekdaysRow"),...$,children:[I&&T.jsx(N,{...j("weekday"),children:"#"}),te]})});Ca.classes=Dc,Ca.displayName="@mantine/dates/WeekdaysRow";function a1(i,n=1){let r=Ee(i);const s=n===0?6:n-1;for(;r.day()!==s;)r=r.add(1,"day");return r.format("YYYY-MM-DD")}function u1(i,n=1){let r=Ee(i);for(;r.day()!==n;)r=r.subtract(1,"day");return r.format("YYYY-MM-DD")}function l1({month:i,firstDayOfWeek:n=1,consistentWeeks:r}){const s=Ee(i).subtract(Ee(i).date()-1,"day"),l=Ee(s.format("YYYY-M-D")),d=l.format("YYYY-MM-DD"),m=l.add(+l.daysInMonth()-1,"day").format("YYYY-MM-DD"),c=a1(m,n),x=[];let C=Ee(u1(d,n));for(;Ee(C).isBefore(c,"day");){const O=[];for(let E=0;E<7;E+=1)O.push(C.format("YYYY-MM-DD")),C=C.add(1,"day");x.push(O)}if(r&&x.length<6){const O=x[x.length-1],E=O[O.length-1];let N=Ee(E).add(1,"day");for(;x.length<6;){const M=[];for(let I=0;I<7;I+=1)M.push(N.format("YYYY-MM-DD")),N=N.add(1,"day");x.push(M)}}return x}function Aa(i,n){return Ee(i).format("YYYY-MM")===Ee(n).format("YYYY-MM")}function Oc(i,n){return n?Ee(i).isAfter(Ee(n).subtract(1,"day"),"day"):!0}function Tc(i,n){return n?Ee(i).isBefore(Ee(n).add(1,"day"),"day"):!0}function c1({dates:i,minDate:n,maxDate:r,getDayProps:s,excludeDate:l,hideOutsideDates:d,month:m}){const c=i.flat().filter(O=>{var E;return Tc(O,r)&&Oc(O,n)&&!(l!=null&&l(O))&&!((E=s==null?void 0:s(O))!=null&&E.disabled)&&(!d||Aa(O,m))}),x=c.find(O=>{var E;return(E=s==null?void 0:s(O))==null?void 0:E.selected});if(x)return x;const C=c.find(O=>Ee().isSame(O,"date"));return C||c[0]}var $o={exports:{}},f1=$o.exports,Mc;function h1(){return Mc||(Mc=1,function(i,n){(function(r,s){i.exports=s()})(f1,function(){var r="day";return function(s,l,d){var m=function(C){return C.add(4-C.isoWeekday(),r)},c=l.prototype;c.isoWeekYear=function(){return m(this).year()},c.isoWeek=function(C){if(!this.$utils().u(C))return this.add(7*(C-this.isoWeek()),r);var O,E,N,M,I=m(this),$=(O=this.isoWeekYear(),E=this.$u,N=(E?d.utc:d)().year(O).startOf("year"),M=4-N.isoWeekday(),N.isoWeekday()>4&&(M+=7),N.add(M,r));return I.diff($,"week")+1},c.isoWeekday=function(C){return this.$utils().u(C)?this.day()||7:this.day(this.day()%7?C:C-7)};var x=c.startOf;c.startOf=function(C,O){var E=this.$utils(),N=!!E.u(O)||O;return E.p(C)==="isoweek"?N?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):x.bind(this)(C,O)}}})}($o)),$o.exports}var d1=h1();const p1=il(d1);Ee.extend(p1);function g1(i){const n=i.find(r=>Ee(r).day()===1);return Ee(n).isoWeek()}var Ec={month:"m_cc9820d3",monthCell:"m_8f457cd5",weekNumber:"m_6cff9dea"};const m1={withCellSpacing:!0},v1=B.createVarsResolver((i,{size:n})=>({weekNumber:{"--wn-fz":B.getFontSize(n),"--wn-size":B.getSize(n,"wn-size")}})),Bo=B.factory((i,n)=>{const r=B.useProps("Month",m1,i),{classNames:s,className:l,style:d,styles:m,unstyled:c,vars:x,__staticSelector:C,locale:O,firstDayOfWeek:E,weekdayFormat:N,month:M,weekendDays:I,getDayProps:$,excludeDate:j,minDate:J,maxDate:te,renderDay:ne,hideOutsideDates:ue,hideWeekdays:Z,getDayAriaLabel:le,static:oe,__getDayRef:X,__onDayKeyDown:me,__onDayClick:de,__onDayMouseEnter:re,__preventFocus:Oe,__stopPropagation:Ae,withCellSpacing:Y,size:R,highlightToday:A,withWeekNumbers:g,...p}=r,w=B.useStyles({name:C||"Month",classes:Ec,props:r,className:l,style:d,classNames:s,styles:m,unstyled:c,vars:x,varsResolver:v1,rootSelector:"month"}),h=rr(),v=l1({month:M,firstDayOfWeek:h.getFirstDayOfWeek(E),consistentWeeks:h.consistentWeeks}),D=c1({dates:v,minDate:cn(J),maxDate:cn(te),getDayProps:$,excludeDate:j,hideOutsideDates:ue,month:M}),{resolvedClassNames:W,resolvedStyles:V}=B.useResolvedStylesApi({classNames:s,styles:m,props:r}),ae=v.map((fe,we)=>{const ee=fe.map((he,De)=>{const _e=!Aa(he,M),P=(le==null?void 0:le(he))||Ee(he).locale(O||h.locale).format("D MMMM YYYY"),z=$==null?void 0:$(he),F=Ee(he).isSame(D,"date");return T.jsx("td",{...w("monthCell"),"data-with-spacing":Y||void 0,children:T.jsx(Sa,{__staticSelector:C||"Month",classNames:W,styles:V,unstyled:c,"data-mantine-stop-propagation":Ae||void 0,highlightToday:A,renderDay:ne,date:he,size:R,weekend:h.getWeekendDays(I).includes(Ee(he).get("day")),outside:_e,hidden:ue?_e:!1,"aria-label":P,static:oe,disabled:(j==null?void 0:j(he))||!Tc(he,cn(te))||!Oc(he,cn(J)),ref:K=>X==null?void 0:X(we,De,K),...z,onKeyDown:K=>{var se;(se=z==null?void 0:z.onKeyDown)==null||se.call(z,K),me==null||me(K,{rowIndex:we,cellIndex:De,date:he})},onMouseEnter:K=>{var se;(se=z==null?void 0:z.onMouseEnter)==null||se.call(z,K),re==null||re(K,he)},onClick:K=>{var se;(se=z==null?void 0:z.onClick)==null||se.call(z,K),de==null||de(K,he)},onMouseDown:K=>{var se;(se=z==null?void 0:z.onMouseDown)==null||se.call(z,K),Oe&&K.preventDefault()},tabIndex:Oe||!F?-1:0})},he.toString())});return T.jsxs("tr",{...w("monthRow"),children:[g&&T.jsx("td",{...w("weekNumber"),children:g1(fe)}),ee]},we)});return T.jsxs(B.Box,{component:"table",...w("month"),size:R,ref:n,...p,children:[!Z&&T.jsx("thead",{...w("monthThead"),children:T.jsx(Ca,{__staticSelector:C||"Month",locale:O,firstDayOfWeek:E,weekdayFormat:N,size:R,classNames:W,styles:V,unstyled:c,withWeekNumbers:g})}),T.jsx("tbody",{...w("monthTbody"),children:ae})]})});Bo.classes=Ec,Bo.displayName="@mantine/dates/Month";var Rc={pickerControl:"m_dc6a3c71"};const y1={},_1=B.createVarsResolver((i,{size:n})=>({pickerControl:{"--dpc-fz":B.getFontSize(n),"--dpc-size":B.getSize(n,"dpc-size")}})),jo=B.factory((i,n)=>{const r=B.useProps("PickerControl",y1,i),{classNames:s,className:l,style:d,styles:m,unstyled:c,vars:x,firstInRange:C,lastInRange:O,inRange:E,__staticSelector:N,selected:M,disabled:I,...$}=r,j=B.useStyles({name:N||"PickerControl",classes:Rc,props:r,className:l,style:d,classNames:s,styles:m,unstyled:c,vars:x,varsResolver:_1,rootSelector:"pickerControl"});return T.jsx(B.UnstyledButton,{...j("pickerControl"),ref:n,unstyled:c,"data-picker-control":!0,"data-selected":M&&!I||void 0,"data-disabled":I||void 0,"data-in-range":E&&!I&&!M||void 0,"data-first-in-range":C&&!I||void 0,"data-last-in-range":O&&!I||void 0,disabled:I,...$})});jo.classes=Rc,jo.displayName="@mantine/dates/PickerControl";function Lc({year:i,minDate:n,maxDate:r}){return!n&&!r?!1:!!(n&&Ee(i).isBefore(n,"year")||r&&Ee(i).isAfter(r,"year"))}function w1({years:i,minDate:n,maxDate:r,getYearControlProps:s}){const l=i.flat().filter(c=>{var x;return!Lc({year:c,minDate:n,maxDate:r})&&!((x=s==null?void 0:s(c))!=null&&x.disabled)}),d=l.find(c=>{var x;return(x=s==null?void 0:s(c))==null?void 0:x.selected});if(d)return d;const m=l.find(c=>Ee().isSame(c,"year"));return m||l[0]}function kc(i){const n=Ee(i).year(),r=n-n%10;let s=0;const l=[[],[],[],[]];for(let d=0;d<4;d+=1){const m=d===3?1:3;for(let c=0;c<m;c+=1)l[d].push(Ee(new Date(r+s,0)).format("YYYY-MM-DD")),s+=1}return l}var Ic={yearsList:"m_9206547b",yearsListCell:"m_c5a19c7d"};const b1={yearsListFormat:"YYYY",withCellSpacing:!0},Yo=B.factory((i,n)=>{const r=B.useProps("YearsList",b1,i),{classNames:s,className:l,style:d,styles:m,unstyled:c,vars:x,decade:C,yearsListFormat:O,locale:E,minDate:N,maxDate:M,getYearControlProps:I,__staticSelector:$,__getControlRef:j,__onControlKeyDown:J,__onControlClick:te,__onControlMouseEnter:ne,__preventFocus:ue,__stopPropagation:Z,withCellSpacing:le,size:oe,...X}=r,me=B.useStyles({name:$||"YearsList",classes:Ic,props:r,className:l,style:d,classNames:s,styles:m,unstyled:c,vars:x,rootSelector:"yearsList"}),de=rr(),re=kc(C),Oe=w1({years:re,minDate:N,maxDate:M,getYearControlProps:I}),Ae=re.map((Y,R)=>{const A=Y.map((g,p)=>{const w=I==null?void 0:I(g),h=Ee(g).isSame(Oe,"year");return T.jsx("td",{...me("yearsListCell"),"data-with-spacing":le||void 0,children:T.jsx(jo,{...me("yearsListControl"),size:oe,unstyled:c,"data-mantine-stop-propagation":Z||void 0,disabled:Lc({year:g,minDate:N,maxDate:M}),ref:v=>j==null?void 0:j(R,p,v),...w,onKeyDown:v=>{var D;(D=w==null?void 0:w.onKeyDown)==null||D.call(w,v),J==null||J(v,{rowIndex:R,cellIndex:p,date:g})},onClick:v=>{var D;(D=w==null?void 0:w.onClick)==null||D.call(w,v),te==null||te(v,g)},onMouseEnter:v=>{var D;(D=w==null?void 0:w.onMouseEnter)==null||D.call(w,v),ne==null||ne(v,g)},onMouseDown:v=>{var D;(D=w==null?void 0:w.onMouseDown)==null||D.call(w,v),ue&&v.preventDefault()},tabIndex:ue||!h?-1:0,children:Ee(g).locale(de.getLocale(E)).format(O)})},p)});return T.jsx("tr",{...me("yearsListRow"),children:A},R)});return T.jsx(B.Box,{component:"table",ref:n,size:oe,...me("yearsList"),...X,children:T.jsx("tbody",{children:Ae})})});Yo.classes=Ic,Yo.displayName="@mantine/dates/YearsList";function Pc({month:i,minDate:n,maxDate:r}){return!n&&!r?!1:!!(n&&Ee(i).isBefore(n,"month")||r&&Ee(i).isAfter(r,"month"))}function x1({months:i,minDate:n,maxDate:r,getMonthControlProps:s}){const l=i.flat().filter(c=>{var x;return!Pc({month:c,minDate:n,maxDate:r})&&!((x=s==null?void 0:s(c))!=null&&x.disabled)}),d=l.find(c=>{var x;return(x=s==null?void 0:s(c))==null?void 0:x.selected});if(d)return d;const m=l.find(c=>Ee().isSame(c,"month"));return m||l[0]}function S1(i){const n=Ee(i).startOf("year").toDate(),r=[[],[],[],[]];let s=0;for(let l=0;l<4;l+=1)for(let d=0;d<3;d+=1)r[l].push(Ee(n).add(s,"months").format("YYYY-MM-DD")),s+=1;return r}var Nc={monthsList:"m_2a6c32d",monthsListCell:"m_fe27622f"};const C1={monthsListFormat:"MMM",withCellSpacing:!0},Uo=B.factory((i,n)=>{const r=B.useProps("MonthsList",C1,i),{classNames:s,className:l,style:d,styles:m,unstyled:c,vars:x,__staticSelector:C,year:O,monthsListFormat:E,locale:N,minDate:M,maxDate:I,getMonthControlProps:$,__getControlRef:j,__onControlKeyDown:J,__onControlClick:te,__onControlMouseEnter:ne,__preventFocus:ue,__stopPropagation:Z,withCellSpacing:le,size:oe,...X}=r,me=B.useStyles({name:C||"MonthsList",classes:Nc,props:r,className:l,style:d,classNames:s,styles:m,unstyled:c,vars:x,rootSelector:"monthsList"}),de=rr(),re=S1(O),Oe=x1({months:re,minDate:cn(M),maxDate:cn(I),getMonthControlProps:$}),Ae=re.map((Y,R)=>{const A=Y.map((g,p)=>{const w=$==null?void 0:$(g),h=Ee(g).isSame(Oe,"month");return T.jsx("td",{...me("monthsListCell"),"data-with-spacing":le||void 0,children:T.jsx(jo,{...me("monthsListControl"),size:oe,unstyled:c,__staticSelector:C||"MonthsList","data-mantine-stop-propagation":Z||void 0,disabled:Pc({month:g,minDate:cn(M),maxDate:cn(I)}),ref:v=>j==null?void 0:j(R,p,v),...w,onKeyDown:v=>{var D;(D=w==null?void 0:w.onKeyDown)==null||D.call(w,v),J==null||J(v,{rowIndex:R,cellIndex:p,date:g})},onClick:v=>{var D;(D=w==null?void 0:w.onClick)==null||D.call(w,v),te==null||te(v,g)},onMouseEnter:v=>{var D;(D=w==null?void 0:w.onMouseEnter)==null||D.call(w,v),ne==null||ne(v,g)},onMouseDown:v=>{var D;(D=w==null?void 0:w.onMouseDown)==null||D.call(w,v),ue&&v.preventDefault()},tabIndex:ue||!h?-1:0,children:Ee(g).locale(de.getLocale(N)).format(E)})},p)});return T.jsx("tr",{...me("monthsListRow"),children:A},R)});return T.jsx(B.Box,{component:"table",ref:n,size:oe,...me("monthsList"),...X,children:T.jsx("tbody",{children:Ae})})});Uo.classes=Nc,Uo.displayName="@mantine/dates/MonthsList";var $c={calendarHeader:"m_730a79ed",calendarHeaderLevel:"m_f6645d97",calendarHeaderControl:"m_2351eeb0",calendarHeaderControlIcon:"m_367dc749"};const A1={nextDisabled:!1,previousDisabled:!1,hasNextLevel:!0,withNext:!0,withPrevious:!0},D1=B.createVarsResolver((i,{size:n})=>({calendarHeader:{"--dch-control-size":B.getSize(n,"dch-control-size"),"--dch-fz":B.getFontSize(n)}})),ir=B.factory((i,n)=>{const r=B.useProps("CalendarHeader",A1,i),{classNames:s,className:l,style:d,styles:m,unstyled:c,vars:x,nextIcon:C,previousIcon:O,nextLabel:E,previousLabel:N,onNext:M,onPrevious:I,onLevelClick:$,label:j,nextDisabled:J,previousDisabled:te,hasNextLevel:ne,levelControlAriaLabel:ue,withNext:Z,withPrevious:le,__staticSelector:oe,__preventFocus:X,__stopPropagation:me,...de}=r,re=B.useStyles({name:oe||"CalendarHeader",classes:$c,props:r,className:l,style:d,classNames:s,styles:m,unstyled:c,vars:x,varsResolver:D1,rootSelector:"calendarHeader"}),Oe=X?Ae=>Ae.preventDefault():void 0;return T.jsxs(B.Box,{...re("calendarHeader"),ref:n,...de,children:[le&&T.jsx(B.UnstyledButton,{...re("calendarHeaderControl"),"data-direction":"previous","aria-label":N,onClick:I,unstyled:c,onMouseDown:Oe,disabled:te,"data-disabled":te||void 0,tabIndex:X||te?-1:0,"data-mantine-stop-propagation":me||void 0,children:O||T.jsx(B.AccordionChevron,{...re("calendarHeaderControlIcon"),"data-direction":"previous",size:"45%"})}),T.jsx(B.UnstyledButton,{component:ne?"button":"div",...re("calendarHeaderLevel"),onClick:ne?$:void 0,unstyled:c,onMouseDown:ne?Oe:void 0,disabled:!ne,"data-static":!ne||void 0,"aria-label":ue,tabIndex:X||!ne?-1:0,"data-mantine-stop-propagation":me||void 0,children:j}),Z&&T.jsx(B.UnstyledButton,{...re("calendarHeaderControl"),"data-direction":"next","aria-label":E,onClick:M,unstyled:c,onMouseDown:Oe,disabled:J,"data-disabled":J||void 0,tabIndex:X||J?-1:0,"data-mantine-stop-propagation":me||void 0,children:C||T.jsx(B.AccordionChevron,{...re("calendarHeaderControlIcon"),"data-direction":"next",size:"45%"})})]})});ir.classes=$c,ir.displayName="@mantine/dates/CalendarHeader";function O1(i){const n=kc(i);return[n[0][0],n[3][0]]}const T1={decadeLabelFormat:"YYYY"},Fo=B.factory((i,n)=>{const r=B.useProps("DecadeLevel",T1,i),{decade:s,locale:l,minDate:d,maxDate:m,yearsListFormat:c,getYearControlProps:x,__getControlRef:C,__onControlKeyDown:O,__onControlClick:E,__onControlMouseEnter:N,withCellSpacing:M,__preventFocus:I,nextIcon:$,previousIcon:j,nextLabel:J,previousLabel:te,onNext:ne,onPrevious:ue,nextDisabled:Z,previousDisabled:le,levelControlAriaLabel:oe,withNext:X,withPrevious:me,decadeLabelFormat:de,classNames:re,styles:Oe,unstyled:Ae,__staticSelector:Y,__stopPropagation:R,size:A,...g}=r,p=rr(),[w,h]=O1(s),v={__staticSelector:Y||"DecadeLevel",classNames:re,styles:Oe,unstyled:Ae,size:A},D=typeof Z=="boolean"?Z:m?!Ee(h).endOf("year").isBefore(m):!1,W=typeof le=="boolean"?le:d?!Ee(w).startOf("year").isAfter(d):!1,V=(ae,fe)=>Ee(ae).locale(l||p.locale).format(fe);return T.jsxs(B.Box,{"data-decade-level":!0,size:A,ref:n,...g,children:[T.jsx(ir,{label:typeof de=="function"?de(w,h):`${V(w,de)} – ${V(h,de)}`,__preventFocus:I,__stopPropagation:R,nextIcon:$,previousIcon:j,nextLabel:J,previousLabel:te,onNext:ne,onPrevious:ue,nextDisabled:D,previousDisabled:W,hasNextLevel:!1,levelControlAriaLabel:oe,withNext:X,withPrevious:me,...v}),T.jsx(Yo,{decade:s,locale:l,minDate:d,maxDate:m,yearsListFormat:c,getYearControlProps:x,__getControlRef:C,__onControlKeyDown:O,__onControlClick:E,__onControlMouseEnter:N,__preventFocus:I,__stopPropagation:R,withCellSpacing:M,...v})]})});Fo.classes={...Yo.classes,...ir.classes},Fo.displayName="@mantine/dates/DecadeLevel";const M1={yearLabelFormat:"YYYY"},Wo=B.factory((i,n)=>{const r=B.useProps("YearLevel",M1,i),{year:s,locale:l,minDate:d,maxDate:m,monthsListFormat:c,getMonthControlProps:x,__getControlRef:C,__onControlKeyDown:O,__onControlClick:E,__onControlMouseEnter:N,withCellSpacing:M,__preventFocus:I,nextIcon:$,previousIcon:j,nextLabel:J,previousLabel:te,onNext:ne,onPrevious:ue,onLevelClick:Z,nextDisabled:le,previousDisabled:oe,hasNextLevel:X,levelControlAriaLabel:me,withNext:de,withPrevious:re,yearLabelFormat:Oe,__staticSelector:Ae,__stopPropagation:Y,size:R,classNames:A,styles:g,unstyled:p,...w}=r,h=rr(),v={__staticSelector:Ae||"YearLevel",classNames:A,styles:g,unstyled:p,size:R},D=typeof le=="boolean"?le:m?!Ee(s).endOf("year").isBefore(m):!1,W=typeof oe=="boolean"?oe:d?!Ee(s).startOf("year").isAfter(d):!1;return T.jsxs(B.Box,{"data-year-level":!0,size:R,ref:n,...w,children:[T.jsx(ir,{label:typeof Oe=="function"?Oe(s):Ee(s).locale(l||h.locale).format(Oe),__preventFocus:I,__stopPropagation:Y,nextIcon:$,previousIcon:j,nextLabel:J,previousLabel:te,onNext:ne,onPrevious:ue,onLevelClick:Z,nextDisabled:D,previousDisabled:W,hasNextLevel:X,levelControlAriaLabel:me,withNext:de,withPrevious:re,...v}),T.jsx(Uo,{year:s,locale:l,minDate:d,maxDate:m,monthsListFormat:c,getMonthControlProps:x,__getControlRef:C,__onControlKeyDown:O,__onControlClick:E,__onControlMouseEnter:N,__preventFocus:I,__stopPropagation:Y,withCellSpacing:M,...v})]})});Wo.classes={...ir.classes,...Uo.classes},Wo.displayName="@mantine/dates/YearLevel";const E1={monthLabelFormat:"MMMM YYYY"},zo=B.factory((i,n)=>{const r=B.useProps("MonthLevel",E1,i),{month:s,locale:l,firstDayOfWeek:d,weekdayFormat:m,weekendDays:c,getDayProps:x,excludeDate:C,minDate:O,maxDate:E,renderDay:N,hideOutsideDates:M,hideWeekdays:I,getDayAriaLabel:$,__getDayRef:j,__onDayKeyDown:J,__onDayClick:te,__onDayMouseEnter:ne,withCellSpacing:ue,highlightToday:Z,withWeekNumbers:le,__preventFocus:oe,__stopPropagation:X,nextIcon:me,previousIcon:de,nextLabel:re,previousLabel:Oe,onNext:Ae,onPrevious:Y,onLevelClick:R,nextDisabled:A,previousDisabled:g,hasNextLevel:p,levelControlAriaLabel:w,withNext:h,withPrevious:v,monthLabelFormat:D,classNames:W,styles:V,unstyled:ae,__staticSelector:fe,size:we,static:ee,...he}=r,De=rr(),_e={__staticSelector:fe||"MonthLevel",classNames:W,styles:V,unstyled:ae,size:we},P=typeof A=="boolean"?A:E?!Ee(s).endOf("month").isBefore(E):!1,z=typeof g=="boolean"?g:O?!Ee(s).startOf("month").isAfter(O):!1;return T.jsxs(B.Box,{"data-month-level":!0,size:we,ref:n,...he,children:[T.jsx(ir,{label:typeof D=="function"?D(s):Ee(s).locale(l||De.locale).format(D),__preventFocus:oe,__stopPropagation:X,nextIcon:me,previousIcon:de,nextLabel:re,previousLabel:Oe,onNext:Ae,onPrevious:Y,onLevelClick:R,nextDisabled:P,previousDisabled:z,hasNextLevel:p,levelControlAriaLabel:w,withNext:h,withPrevious:v,..._e}),T.jsx(Bo,{month:s,locale:l,firstDayOfWeek:d,weekdayFormat:m,weekendDays:c,getDayProps:x,excludeDate:C,minDate:O,maxDate:E,renderDay:N,hideOutsideDates:M,hideWeekdays:I,getDayAriaLabel:$,__getDayRef:j,__onDayKeyDown:J,__onDayClick:te,__onDayMouseEnter:ne,__preventFocus:oe,__stopPropagation:X,static:ee,withCellSpacing:ue,highlightToday:Z,withWeekNumbers:le,..._e})]})});zo.classes={...Bo.classes,...ir.classes},zo.displayName="@mantine/dates/MonthLevel";var Bc={levelsGroup:"m_30b26e33"};const R1={},or=B.factory((i,n)=>{const r=B.useProps("LevelsGroup",R1,i),{classNames:s,className:l,style:d,styles:m,unstyled:c,vars:x,__staticSelector:C,...O}=r,E=B.useStyles({name:C||"LevelsGroup",classes:Bc,props:r,className:l,style:d,classNames:s,styles:m,unstyled:c,vars:x,rootSelector:"levelsGroup"});return T.jsx(B.Box,{ref:n,...E("levelsGroup"),...O})});or.classes=Bc,or.displayName="@mantine/dates/LevelsGroup";const L1={numberOfColumns:1},qo=B.factory((i,n)=>{const r=B.useProps("DecadeLevelGroup",L1,i),{decade:s,locale:l,minDate:d,maxDate:m,yearsListFormat:c,getYearControlProps:x,__onControlClick:C,__onControlMouseEnter:O,withCellSpacing:E,__preventFocus:N,nextIcon:M,previousIcon:I,nextLabel:$,previousLabel:j,onNext:J,onPrevious:te,nextDisabled:ne,previousDisabled:ue,classNames:Z,styles:le,unstyled:oe,__staticSelector:X,__stopPropagation:me,numberOfColumns:de,levelControlAriaLabel:re,decadeLabelFormat:Oe,size:Ae,vars:Y,...R}=r,A=ye.useRef([]),g=Array(de).fill(0).map((p,w)=>{const h=Ee(s).add(w*10,"years").format("YYYY-MM-DD");return T.jsx(Fo,{size:Ae,yearsListFormat:c,decade:h,withNext:w===de-1,withPrevious:w===0,decadeLabelFormat:Oe,__onControlClick:C,__onControlMouseEnter:O,__onControlKeyDown:(v,D)=>xa({levelIndex:w,rowIndex:D.rowIndex,cellIndex:D.cellIndex,event:v,controlsRef:A}),__getControlRef:(v,D,W)=>{Array.isArray(A.current[w])||(A.current[w]=[]),Array.isArray(A.current[w][v])||(A.current[w][v]=[]),A.current[w][v][D]=W},levelControlAriaLabel:typeof re=="function"?re(h):re,locale:l,minDate:d,maxDate:m,__preventFocus:N,__stopPropagation:me,nextIcon:M,previousIcon:I,nextLabel:$,previousLabel:j,onNext:J,onPrevious:te,nextDisabled:ne,previousDisabled:ue,getYearControlProps:x,__staticSelector:X||"DecadeLevelGroup",classNames:Z,styles:le,unstyled:oe,withCellSpacing:E},w)});return T.jsx(or,{classNames:Z,styles:le,__staticSelector:X||"DecadeLevelGroup",ref:n,size:Ae,unstyled:oe,...R,children:g})});qo.classes={...or.classes,...Fo.classes},qo.displayName="@mantine/dates/DecadeLevelGroup";const k1={numberOfColumns:1},Ho=B.factory((i,n)=>{const r=B.useProps("YearLevelGroup",k1,i),{year:s,locale:l,minDate:d,maxDate:m,monthsListFormat:c,getMonthControlProps:x,__onControlClick:C,__onControlMouseEnter:O,withCellSpacing:E,__preventFocus:N,nextIcon:M,previousIcon:I,nextLabel:$,previousLabel:j,onNext:J,onPrevious:te,onLevelClick:ne,nextDisabled:ue,previousDisabled:Z,hasNextLevel:le,classNames:oe,styles:X,unstyled:me,__staticSelector:de,__stopPropagation:re,numberOfColumns:Oe,levelControlAriaLabel:Ae,yearLabelFormat:Y,size:R,vars:A,...g}=r,p=ye.useRef([]),w=Array(Oe).fill(0).map((h,v)=>{const D=Ee(s).add(v,"years").format("YYYY-MM-DD");return T.jsx(Wo,{size:R,monthsListFormat:c,year:D,withNext:v===Oe-1,withPrevious:v===0,yearLabelFormat:Y,__stopPropagation:re,__onControlClick:C,__onControlMouseEnter:O,__onControlKeyDown:(W,V)=>xa({levelIndex:v,rowIndex:V.rowIndex,cellIndex:V.cellIndex,event:W,controlsRef:p}),__getControlRef:(W,V,ae)=>{Array.isArray(p.current[v])||(p.current[v]=[]),Array.isArray(p.current[v][W])||(p.current[v][W]=[]),p.current[v][W][V]=ae},levelControlAriaLabel:typeof Ae=="function"?Ae(D):Ae,locale:l,minDate:d,maxDate:m,__preventFocus:N,nextIcon:M,previousIcon:I,nextLabel:$,previousLabel:j,onNext:J,onPrevious:te,onLevelClick:ne,nextDisabled:ue,previousDisabled:Z,hasNextLevel:le,getMonthControlProps:x,classNames:oe,styles:X,unstyled:me,__staticSelector:de||"YearLevelGroup",withCellSpacing:E},v)});return T.jsx(or,{classNames:oe,styles:X,__staticSelector:de||"YearLevelGroup",ref:n,size:R,unstyled:me,...g,children:w})});Ho.classes={...Wo.classes,...or.classes},Ho.displayName="@mantine/dates/YearLevelGroup";const I1={numberOfColumns:1},Go=B.factory((i,n)=>{const r=B.useProps("MonthLevelGroup",I1,i),{month:s,locale:l,firstDayOfWeek:d,weekdayFormat:m,weekendDays:c,getDayProps:x,excludeDate:C,minDate:O,maxDate:E,renderDay:N,hideOutsideDates:M,hideWeekdays:I,getDayAriaLabel:$,__onDayClick:j,__onDayMouseEnter:J,withCellSpacing:te,highlightToday:ne,withWeekNumbers:ue,__preventFocus:Z,nextIcon:le,previousIcon:oe,nextLabel:X,previousLabel:me,onNext:de,onPrevious:re,onLevelClick:Oe,nextDisabled:Ae,previousDisabled:Y,hasNextLevel:R,classNames:A,styles:g,unstyled:p,numberOfColumns:w,levelControlAriaLabel:h,monthLabelFormat:v,__staticSelector:D,__stopPropagation:W,size:V,static:ae,vars:fe,...we}=r,ee=ye.useRef([]),he=Array(w).fill(0).map((De,_e)=>{const P=Ee(s).add(_e,"months").format("YYYY-MM-DD");return T.jsx(zo,{month:P,withNext:_e===w-1,withPrevious:_e===0,monthLabelFormat:v,__stopPropagation:W,__onDayClick:j,__onDayMouseEnter:J,__onDayKeyDown:(z,F)=>xa({levelIndex:_e,rowIndex:F.rowIndex,cellIndex:F.cellIndex,event:z,controlsRef:ee}),__getDayRef:(z,F,K)=>{Array.isArray(ee.current[_e])||(ee.current[_e]=[]),Array.isArray(ee.current[_e][z])||(ee.current[_e][z]=[]),ee.current[_e][z][F]=K},levelControlAriaLabel:typeof h=="function"?h(P):h,locale:l,firstDayOfWeek:d,weekdayFormat:m,weekendDays:c,getDayProps:x,excludeDate:C,minDate:O,maxDate:E,renderDay:N,hideOutsideDates:M,hideWeekdays:I,getDayAriaLabel:$,__preventFocus:Z,nextIcon:le,previousIcon:oe,nextLabel:X,previousLabel:me,onNext:de,onPrevious:re,onLevelClick:Oe,nextDisabled:Ae,previousDisabled:Y,hasNextLevel:R,classNames:A,styles:g,unstyled:p,__staticSelector:D||"MonthLevelGroup",size:V,static:ae,withCellSpacing:te,highlightToday:ne,withWeekNumbers:ue},_e)});return T.jsx(or,{classNames:A,styles:g,__staticSelector:D||"MonthLevelGroup",ref:n,size:V,...we,children:he})});Go.classes={...or.classes,...zo.classes},Go.displayName="@mantine/dates/MonthLevelGroup";const jc=i=>i==="range"?[null,null]:i==="multiple"?[]:null,Yc=(i,n)=>{const r=n?xc:cn;return Array.isArray(i)?i.map(r):r(i)};function Da({type:i,value:n,defaultValue:r,onChange:s,withTime:l=!1}){const d=ye.useRef(i),[m,c,x]=At.useUncontrolled({value:Yc(n,l),defaultValue:Yc(r,l),finalValue:jc(i),onChange:s});let C=m;return d.current!==i&&(d.current=i,n===void 0&&(C=r!==void 0?r:jc(i),c(C))),[C,c,x]}function Oa(i,n){return i?i==="month"?0:i==="year"?1:2:n||0}function P1(i){return i===0?"month":i===1?"year":"decade"}function zi(i,n,r){return P1(At.clamp(Oa(i,0),Oa(n,0),Oa(r,2)))}const N1={maxLevel:"decade",minLevel:"month",__updateDateOnYearSelect:!0,__updateDateOnMonthSelect:!0},Vo=B.factory((i,n)=>{const r=B.useProps("Calendar",N1,i),{vars:s,maxLevel:l,minLevel:d,defaultLevel:m,level:c,onLevelChange:x,date:C,defaultDate:O,onDateChange:E,numberOfColumns:N,columnsToScroll:M,ariaLabels:I,nextLabel:$,previousLabel:j,onYearSelect:J,onMonthSelect:te,onYearMouseEnter:ne,onMonthMouseEnter:ue,__updateDateOnYearSelect:Z,__updateDateOnMonthSelect:le,firstDayOfWeek:oe,weekdayFormat:X,weekendDays:me,getDayProps:de,excludeDate:re,renderDay:Oe,hideOutsideDates:Ae,hideWeekdays:Y,getDayAriaLabel:R,monthLabelFormat:A,nextIcon:g,previousIcon:p,__onDayClick:w,__onDayMouseEnter:h,withCellSpacing:v,highlightToday:D,withWeekNumbers:W,monthsListFormat:V,getMonthControlProps:ae,yearLabelFormat:fe,yearsListFormat:we,getYearControlProps:ee,decadeLabelFormat:he,classNames:De,styles:_e,unstyled:P,minDate:z,maxDate:F,locale:K,__staticSelector:se,size:Te,__preventFocus:u,__stopPropagation:f,onNextDecade:_,onPreviousDecade:k,onNextYear:q,onPreviousYear:Q,onNextMonth:Ce,onPreviousMonth:be,static:Re,...Se}=r,{resolvedClassNames:Le,resolvedStyles:Ne}=B.useResolvedStylesApi({classNames:De,styles:_e,props:r}),[ke,Ge]=At.useUncontrolled({value:c?zi(c,d,l):void 0,defaultValue:m?zi(m,d,l):void 0,finalValue:zi(void 0,d,l),onChange:x}),[Je,Ve]=Da({type:"default",value:cn(C),defaultValue:cn(O),onChange:E}),xt={__staticSelector:se||"Calendar",styles:Ne,classNames:Le,unstyled:P,size:Te},vt=M||N||1,ut=new Date,qt=z&&Ee(ut).isAfter(z)?z:Ee(ut).format("YYYY-MM-DD"),Dt=Je||qt,$n=()=>{const it=Ee(Dt).add(vt,"month").format("YYYY-MM-DD");Ce==null||Ce(it),Ve(it)},fn=()=>{const it=Ee(Dt).subtract(vt,"month").format("YYYY-MM-DD");be==null||be(it),Ve(it)},Qt=()=>{const it=Ee(Dt).add(vt,"year").format("YYYY-MM-DD");q==null||q(it),Ve(it)},xn=()=>{const it=Ee(Dt).subtract(vt,"year").format("YYYY-MM-DD");Q==null||Q(it),Ve(it)},Bn=()=>{const it=Ee(Dt).add(10*vt,"year").format("YYYY-MM-DD");_==null||_(it),Ve(it)},En=()=>{const it=Ee(Dt).subtract(10*vt,"year").format("YYYY-MM-DD");k==null||k(it),Ve(it)};return T.jsxs(B.Box,{ref:n,size:Te,"data-calendar":!0,...Se,children:[ke==="month"&&T.jsx(Go,{month:Dt,minDate:z,maxDate:F,firstDayOfWeek:oe,weekdayFormat:X,weekendDays:me,getDayProps:de,excludeDate:re,renderDay:Oe,hideOutsideDates:Ae,hideWeekdays:Y,getDayAriaLabel:R,onNext:$n,onPrevious:fn,hasNextLevel:l!=="month",onLevelClick:()=>Ge("year"),numberOfColumns:N,locale:K,levelControlAriaLabel:I==null?void 0:I.monthLevelControl,nextLabel:(I==null?void 0:I.nextMonth)??$,nextIcon:g,previousLabel:(I==null?void 0:I.previousMonth)??j,previousIcon:p,monthLabelFormat:A,__onDayClick:w,__onDayMouseEnter:h,__preventFocus:u,__stopPropagation:f,static:Re,withCellSpacing:v,highlightToday:D,withWeekNumbers:W,...xt}),ke==="year"&&T.jsx(Ho,{year:Dt,numberOfColumns:N,minDate:z,maxDate:F,monthsListFormat:V,getMonthControlProps:ae,locale:K,onNext:Qt,onPrevious:xn,hasNextLevel:l!=="month"&&l!=="year",onLevelClick:()=>Ge("decade"),levelControlAriaLabel:I==null?void 0:I.yearLevelControl,nextLabel:(I==null?void 0:I.nextYear)??$,nextIcon:g,previousLabel:(I==null?void 0:I.previousYear)??j,previousIcon:p,yearLabelFormat:fe,__onControlMouseEnter:ue,__onControlClick:(it,It)=>{le&&Ve(It),Ge(zi("month",d,l)),te==null||te(It)},__preventFocus:u,__stopPropagation:f,withCellSpacing:v,...xt}),ke==="decade"&&T.jsx(qo,{decade:Dt,minDate:z,maxDate:F,yearsListFormat:we,getYearControlProps:ee,locale:K,onNext:Bn,onPrevious:En,numberOfColumns:N,nextLabel:(I==null?void 0:I.nextDecade)??$,nextIcon:g,previousLabel:(I==null?void 0:I.previousDecade)??j,previousIcon:p,decadeLabelFormat:he,__onControlMouseEnter:ne,__onControlClick:(it,It)=>{Z&&Ve(It),Ge(zi("year",d,l)),J==null||J(It)},__preventFocus:u,__stopPropagation:f,withCellSpacing:v,...xt})]})});Vo.classes={...qo.classes,...Ho.classes,...Go.classes},Vo.displayName="@mantine/dates/Calendar";function $1(i){const{maxLevel:n,minLevel:r,defaultLevel:s,level:l,onLevelChange:d,nextIcon:m,previousIcon:c,date:x,defaultDate:C,onDateChange:O,numberOfColumns:E,columnsToScroll:N,ariaLabels:M,nextLabel:I,previousLabel:$,onYearSelect:j,onMonthSelect:J,onYearMouseEnter:te,onMonthMouseEnter:ne,onNextMonth:ue,onPreviousMonth:Z,onNextYear:le,onPreviousYear:oe,onNextDecade:X,onPreviousDecade:me,withCellSpacing:de,highlightToday:re,__updateDateOnYearSelect:Oe,__updateDateOnMonthSelect:Ae,withWeekNumbers:Y,firstDayOfWeek:R,weekdayFormat:A,weekendDays:g,getDayProps:p,excludeDate:w,renderDay:h,hideOutsideDates:v,hideWeekdays:D,getDayAriaLabel:W,monthLabelFormat:V,monthsListFormat:ae,getMonthControlProps:fe,yearLabelFormat:we,yearsListFormat:ee,getYearControlProps:he,decadeLabelFormat:De,allowSingleDateInRange:_e,allowDeselect:P,minDate:z,maxDate:F,locale:K,...se}=i;return{calendarProps:{maxLevel:n,minLevel:r,defaultLevel:s,level:l,onLevelChange:d,nextIcon:m,previousIcon:c,date:x,defaultDate:C,onDateChange:O,numberOfColumns:E,columnsToScroll:N,ariaLabels:M,nextLabel:I,previousLabel:$,onYearSelect:j,onMonthSelect:J,onYearMouseEnter:te,onMonthMouseEnter:ne,onNextMonth:ue,onPreviousMonth:Z,onNextYear:le,onPreviousYear:oe,onNextDecade:X,onPreviousDecade:me,withCellSpacing:de,highlightToday:re,__updateDateOnYearSelect:Oe,__updateDateOnMonthSelect:Ae,withWeekNumbers:Y,firstDayOfWeek:R,weekdayFormat:A,weekendDays:g,getDayProps:p,excludeDate:w,renderDay:h,hideOutsideDates:v,hideWeekdays:D,getDayAriaLabel:W,monthLabelFormat:V,monthsListFormat:ae,getMonthControlProps:fe,yearLabelFormat:we,yearsListFormat:ee,getYearControlProps:he,decadeLabelFormat:De,allowSingleDateInRange:_e,allowDeselect:P,minDate:z,maxDate:F,locale:K},others:se}}function B1(i){if(i===null)return null;const n=new Date(i);return Number.isNaN(n.getTime())||!i?null:Ee(n).format("YYYY-MM-DD")}function j1({date:i,maxDate:n,minDate:r}){return!(i==null||Number.isNaN(new Date(i).getTime())||n&&Ee(i).isAfter(n,"date")||r&&Ee(i).isBefore(r,"date"))}const Y1={valueFormat:"MMMM D, YYYY",fixOnBlur:!0},Zo=B.factory((i,n)=>{const r=B.useInputProps("DateInput",Y1,i),{inputProps:s,wrapperProps:l,value:d,defaultValue:m,onChange:c,clearable:x,clearButtonProps:C,popoverProps:O,getDayProps:E,locale:N,valueFormat:M,dateParser:I,minDate:$,maxDate:j,fixOnBlur:J,onFocus:te,onBlur:ne,onClick:ue,onKeyDown:Z,readOnly:le,name:oe,form:X,rightSection:me,unstyled:de,classNames:re,styles:Oe,allowDeselect:Ae,date:Y,defaultDate:R,onDateChange:A,getMonthControlProps:g,getYearControlProps:p,...w}=r,h=ye.useRef(null),v=ye.useRef(null),[D,W]=ye.useState(!1),{calendarProps:V,others:ae}=$1(w),fe=rr(),ee=I||(be=>{const Re=Ee(be,M,fe.getLocale(N)).toDate();return Number.isNaN(Re.getTime())?B1(be):Ee(Re).format("YYYY-MM-DD")}),he=Ae!==void 0?Ae:x,De=be=>be?Ee(be).locale(fe.getLocale(N)).format(M):"",[_e,P,z]=Da({type:"default",value:d,defaultValue:m,onChange:c}),[F,K]=Da({type:"default",value:Y,defaultValue:m||R,onChange:A});ye.useEffect(()=>{z&&d!==null&&K(d)},[z,d]);const[se,Te]=ye.useState(De(_e));ye.useEffect(()=>{Te(De(_e))},[fe.getLocale(N)]);const u=be=>{const Re=be.currentTarget.value;if(Te(Re),W(!0),Re.trim()===""&&x)P(null);else{const Se=ee(Re);j1({date:Se,minDate:$,maxDate:j})&&(P(Se),K(Se))}},f=be=>{ne==null||ne(be),W(!1),J&&Te(De(_e))},_=be=>{te==null||te(be),W(!0)},k=be=>{ue==null||ue(be),W(!0)},q=be=>{be.key==="Escape"&&W(!1),Z==null||Z(be)},Q=be=>({...E==null?void 0:E(be),selected:Ee(_e).isSame(be,"day"),onClick:Re=>{var Le,Ne;(Ne=E==null?void 0:(Le=E(be)).onClick)==null||Ne.call(Le,Re);const Se=x&&he&&Ee(_e).isSame(be,"day")?null:be;P(Se),!z&&Te(De(Se)),W(!1)}}),Ce=me||(x&&_e&&!le?T.jsx(B.CloseButton,{variant:"transparent",onMouseDown:be=>be.preventDefault(),tabIndex:-1,onClick:()=>{P(null),!z&&Te(""),W(!1)},unstyled:de,size:s.size||"sm",...C}):null);return At.useDidUpdate(()=>{_e!==void 0&&!D&&Te(De(_e))},[_e]),At.useClickOutside(()=>W(!1),void 0,[h.current,v.current]),T.jsxs(T.Fragment,{children:[T.jsx(B.Input.Wrapper,{...l,__staticSelector:"DateInput",ref:h,children:T.jsxs(B.Popover,{opened:D,trapFocus:!1,position:"bottom-start",disabled:le,withRoles:!1,unstyled:de,...O,children:[T.jsx(B.Popover.Target,{children:T.jsx(B.Input,{"data-dates-input":!0,"data-read-only":le||void 0,autoComplete:"off",ref:n,value:se,onChange:u,onBlur:f,onFocus:_,onClick:k,onKeyDown:q,readOnly:le,rightSection:Ce,...s,...ae,__staticSelector:"DateInput"})}),T.jsx(B.Popover.Dropdown,{onMouseDown:be=>be.preventDefault(),"data-dates-dropdown":!0,ref:v,children:T.jsx(Vo,{__staticSelector:"DateInput",...V,classNames:re,styles:Oe,unstyled:de,__preventFocus:!0,minDate:$,maxDate:j,locale:N,getDayProps:Q,size:s.size,date:F,onDateChange:K,getMonthControlProps:be=>({selected:typeof _e=="string"?Aa(be,_e):!1,...g==null?void 0:g(be)}),getYearControlProps:be=>({selected:typeof _e=="string"?Ee(be).isSame(_e,"year"):!1,...p==null?void 0:p(be)})})})]})}),T.jsx(Sc,{name:oe,form:X,value:_e,type:"default"})]})});Zo.classes={...B.Input.classes,...Vo.classes},Zo.displayName="@mantine/dates/DateInput";function U1(i){const n=an.c(47),{fields:r,onClose:s,queryKey:l,apiPath:d,steps:m,onCreated:c}=i,[x,C]=ye.useState(0),[O,E]=ye.useState(!1),[N,M]=ye.useState(),{mutateAsync:I,isError:$,error:j,isPending:J}=yc(d,l),{mutateAsync:te,isPending:ne}=ba(d,l),ue=J||ne;let Z;n[0]!==r?(Z=new Set(r.filter(G1).map(H1)),n[0]=r,n[1]=Z):Z=n[1];let le;n[2]!==Z?(le=[...Z],n[2]=Z,n[3]=le):le=n[3];const oe=le;let X;n[4]!==r?(X=r.reduce(q1,{}),n[4]=r,n[5]=X):X=n[5];let me;n[6]!==r?(me=r.filter(z1).reduce(F1,{}),n[6]=r,n[7]=me):me=n[7];let de;n[8]!==X||n[9]!==me?(de={mode:"uncontrolled",initialValues:X,validate:me},n[8]=X,n[9]=me,n[10]=de):de=n[10];const re=Mi.useForm(de);let Oe;n[11]!==re||n[12]!==N?(Oe=function(v){return T.jsxs(ye.Fragment,{children:[(v.type===void 0||v.type=="text")&&T.jsx(B.TextInput,{label:v.column.title,placeholder:v.placeholder??"",...re.getInputProps(v.id),type:v.id.includes("email")?"email":void 0},re.key(v.id)),v.type==="number"&&T.jsx(B.NumberInput,{decimalSeparator:",",label:v.column.title,placeholder:v.placeholder??"",...re.getInputProps(v.id)},re.key(v.id)),v.type==="date"&&T.jsx(Zo,{label:v.column.title,placeholder:v.placeholder??"",valueFormat:"DD.MM.YYYY",clearable:!0,...re.getInputProps(v.id)},re.key(v.id)),v.type==="boolean"&&T.jsx(B.Checkbox,{mt:"md",label:v.column.title,...re.getInputProps(v.id,{type:"checkbox"})},re.key(v.id)),v.type==="custom"&&v.render&&v.render({...re.getValues(),...N&&{id:N}},re.setValues,E)]},v.id)},n[11]=re,n[12]=N,n[13]=Oe):Oe=n[13];const Ae=Oe;let Y;n[14]!==(j==null?void 0:j.message)||n[15]!==(j==null?void 0:j.name)||n[16]!==$?(Y=$&&T.jsx(B.Alert,{variant:"outline",color:"red",title:(j==null?void 0:j.name)??"Fehler aufgetreten",mb:"lg",children:(j==null?void 0:j.message)??"Fehler aufgetreten"}),n[14]=j==null?void 0:j.message,n[15]=j==null?void 0:j.name,n[16]=$,n[17]=Y):Y=n[17];let R;n[18]!==x||n[19]!==I||n[20]!==re||n[21]!==$||n[22]!==s||n[23]!==c||n[24]!==N||n[25]!==oe.length||n[26]!==te?(R=re.onSubmit(async h=>{if(N)await te({...h,id:N});else{const v=await I(h);M(v.id),c==null||c(v.id)}oe.length&&x<oe.length-1?$||C(x+1):$||(re.setInitialValues(h),re.reset(),s())}),n[18]=x,n[19]=I,n[20]=re,n[21]=$,n[22]=s,n[23]=c,n[24]=N,n[25]=oe.length,n[26]=te,n[27]=R):R=n[27];let A;n[28]!==x||n[29]!==r||n[30]!==Ae||n[31]!==m||n[32]!==oe?(A=oe.length?T.jsx(B.Stepper,{active:x,size:"sm",children:oe.map(h=>T.jsx(B.Stepper.Step,{...m&&m[h-1]?{label:m[h-1].label}:{},children:r.filter(v=>v.step===h).map(v=>Ae(v))},h))}):r.map(h=>Ae(h)),n[28]=x,n[29]=r,n[30]=Ae,n[31]=m,n[32]=oe,n[33]=A):A=n[33];let g;n[34]!==x||n[35]!==O||n[36]!==ue||n[37]!==s||n[38]!==oe.length?(g=!O&&T.jsxs(B.Group,{mt:"md",justify:"end",children:[T.jsx(B.Button,{onClick:()=>oe.length?x===0?s():C(x-1):s(),variant:"outline",children:oe.length?x===0?"Abbrechen":"Zurück":"Abbrechen"}),T.jsx(B.Button,{type:"submit",loading:ue,children:oe.length?x===oe.length-1?"Speichern":"Weiter":"Speichern"})]}),n[34]=x,n[35]=O,n[36]=ue,n[37]=s,n[38]=oe.length,n[39]=g):g=n[39];let p;n[40]!==g||n[41]!==R||n[42]!==A?(p=T.jsxs("form",{onSubmit:R,children:[A,g]}),n[40]=g,n[41]=R,n[42]=A,n[43]=p):p=n[43];let w;return n[44]!==p||n[45]!==Y?(w=T.jsxs(T.Fragment,{children:[Y,p]}),n[44]=p,n[45]=Y,n[46]=w):w=n[46],w}function F1(i,n){return i[n.id]=W1,i}function W1(i){return i?null:"Pflichtfeld"}function z1(i){return i.required}function q1(i,n){return i[n.id]=n.type==="boolean"?!1:n.defaultValue??"",i}function H1(i){return i.step}function G1(i){return typeof i.step=="number"}var[V1,Ta]=B.createSafeContext("useDataTableColumnsContext must be used within DataTableColumnProvider"),Uc=i=>{let{children:n,columnsOrder:r,setColumnsOrder:s,columnsToggle:l,setColumnsToggle:d,resetColumnsOrder:m,resetColumnsToggle:c,setColumnWidth:x,resetColumnsWidth:C}=i,[O,E]=ye.useState(""),[N,M]=ye.useState("");return T.jsx(V1,{value:{sourceColumn:O,setSourceColumn:E,targetColumn:N,setTargetColumn:M,columnsToggle:l,setColumnsToggle:d,swapColumns:()=>{if(!r||!s||!O||!N)return;let I=r.indexOf(O),$=r.indexOf(N);if(I!==-1&&$!==-1){let j=r.splice(I,1)[0];r.splice($,0,j),s([...r])}},resetColumnsOrder:m,resetColumnsToggle:c,setColumnWidth:x,resetColumnsWidth:C},children:n})};function Z1(){return T.jsx("tr",{className:"mantine-datatable-empty-row",children:T.jsx("td",{})})}function K1(){return T.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[T.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),T.jsx("path",{d:"M12.983 8.978c3.955 -.182 7.017 -1.446 7.017 -2.978c0 -1.657 -3.582 -3 -8 -3c-1.661 0 -3.204 .19 -4.483 .515m-2.783 1.228c-.471 .382 -.734 .808 -.734 1.257c0 1.22 1.944 2.271 4.734 2.74"}),T.jsx("path",{d:"M4 6v6c0 1.657 3.582 3 8 3c.986 0 1.93 -.067 2.802 -.19m3.187 -.82c1.251 -.53 2.011 -1.228 2.011 -1.99v-6"}),T.jsx("path",{d:"M4 12v6c0 1.657 3.582 3 8 3c3.217 0 5.991 -.712 7.261 -1.74m.739 -3.26v-4"}),T.jsx("path",{d:"M3 3l18 18"})]})}function Q1({icon:i,text:n,pt:r,pb:s,active:l,children:d}){return T.jsx(B.Center,{pt:r,pb:s,className:"mantine-datatable-empty-state","data-active":l||void 0,children:d||T.jsxs(T.Fragment,{children:[i||T.jsx("div",{className:"mantine-datatable-empty-state-icon",children:T.jsx(K1,{})}),T.jsx(B.Text,{component:"div",size:"sm",c:"dimmed",children:n})]})})}var J1=({key:i,columns:n=[],getInitialValueInEffect:r=!0})=>{function s(Z,le){let oe=[];return Z.forEach(X=>{le.find(me=>me.accessor===X)&&oe.push(X)}),le.forEach(X=>{oe.includes(X.accessor)||oe.push(X.accessor)}),oe}function l(Z,le){let oe=[];return Z.forEach(X=>{le.find(me=>me.accessor===X.accessor)&&oe.push(X)}),le.forEach(X=>{oe.find(me=>me.accessor===X.accessor)||oe.push({accessor:X.accessor,defaultToggle:X.defaultToggle||!0,toggleable:X.toggleable,toggled:X.defaultToggle===void 0?!0:X.defaultToggle})}),oe}function d(Z,le){let oe=[];return Z.forEach(X=>{let me=Object.keys(X)[0];le.find(de=>de.accessor===me)&&oe.push(X)}),le.forEach(X=>{let me=X.accessor;if(!oe.find(de=>Object.keys(de)[0]===me)){let de={};de[me]="",oe.push(de)}}),oe}function m(){let[Z,le]=At.useLocalStorage({key:i?`${i}-columns-order`:"",defaultValue:i?C:void 0,getInitialValueInEffect:r});function oe(de){i&&le(de)}if(!i)return[Z,oe];let X=s(Z,n),me=JSON.stringify(Z);return JSON.stringify(X)!==me&&oe(X),[X,oe]}function c(){let[Z,le]=At.useLocalStorage({key:i?`${i}-columns-toggle`:"",defaultValue:i?E:void 0,getInitialValueInEffect:r});function oe(de){i&&le(de)}if(!i)return[Z,oe];let X=l(Z,n),me=JSON.stringify(Z);return JSON.stringify(X)!==me&&oe(X),[l(Z,n),oe]}function x(){let[Z,le]=At.useLocalStorage({key:i?`${i}-columns-width`:"",defaultValue:i?O:void 0,getInitialValueInEffect:r});function oe(de){i&&le(de)}if(!i)return[Z,oe];let X=d(Z,n),me=JSON.stringify(Z);return JSON.stringify(X)!==me&&oe(X),[d(Z,n),oe]}let C=n&&n.map(Z=>Z.accessor)||[],O=n&&n.map(Z=>({[Z.accessor]:Z.width??"initial"}))||[],E=n&&n.map(Z=>({accessor:Z.accessor,defaultToggle:Z.defaultToggle||!0,toggleable:Z.toggleable,toggled:Z.defaultToggle===void 0?!0:Z.defaultToggle})),[N,M]=m(),[I,$]=c(),[j,J]=x(),te=()=>M(C),ne=()=>{$(E)},ue=()=>J(O);return{effectiveColumns:ye.useMemo(()=>N?N.map(Z=>n.find(le=>le.accessor===Z)).map(Z=>{var le;return{...Z,hidden:(Z==null?void 0:Z.hidden)||!((le=I.find(oe=>oe.accessor===(Z==null?void 0:Z.accessor)))!=null&&le.toggled)}}).map(Z=>{var le;return{...Z,width:(le=j.find(oe=>oe[Z==null?void 0:Z.accessor]))==null?void 0:le[Z==null?void 0:Z.accessor]}}):n,[n,N,I,j]),setColumnsOrder:M,columnsOrder:N,resetColumnsOrder:te,columnsToggle:I,setColumnsToggle:$,resetColumnsToggle:ne,columnsWidth:j,setColumnsWidth:J,setColumnWidth:(Z,le)=>{let oe=j.map(X=>X[Z]?{[Z]:le}:X);J(oe)},resetColumnsWidth:ue}};function ti(){var s;let[i]=At.useResizeObserver(),{width:n,height:r}=((s=i.current)==null?void 0:s.getBoundingClientRect())||{width:0,height:0};return{ref:i,width:n,height:r}}var X1=typeof window<"u"?ye.useLayoutEffect:ye.useEffect;function e0(i){let[n,r]=ye.useState(null),s=(i==null?void 0:i.join(":"))||"";return ye.useEffect(()=>{r(null)},[s]),{lastSelectionChangeIndex:n,setLastSelectionChangeIndex:r}}function t0(i,n){let r=()=>{n(i.map(l=>l.matches))},s=i.map(l=>{try{return l.addEventListener("change",r),()=>l.removeEventListener("change",r)}catch{return l.addListener(r),()=>l.removeListener(r)}});return()=>{s.forEach(l=>l())}}function n0(i,n){return n||(typeof window<"u"&&"matchMedia"in window?i.map(r=>window.matchMedia(r).matches):i.map(()=>!1))}function r0(i,n,{getInitialValueInEffect:r}={getInitialValueInEffect:!0}){let[s,l]=ye.useState(r?n:n0(i,n)),d=ye.useRef(null);return ye.useEffect(()=>{if("matchMedia"in window)return d.current=i.map(m=>window.matchMedia(m)),l(d.current.map(m=>m.matches)),t0(d.current,m=>{l(m)})},[i]),s}function i0(i){let n=B.useMantineTheme(),r=ye.useMemo(()=>i.map(l=>(typeof l=="function"?l(n):l)??""),[i,n]),s=ye.useMemo(()=>i.map(()=>!0),[i]);return r0(r,s)}function Ko(i){let n=B.useMantineTheme(),r=typeof i=="function"?i(n):i;return At.useMediaQuery(r||"",!0)}function Ma(i){let n=i.replace(/([a-z\d])([A-Z]+)/g,"$1 $2").replace(/\W|_/g," ").trim().toLowerCase();return`${n.charAt(0).toUpperCase()}${n.slice(1)}`}function o0(i,n,r){return i.filter(s=>!n.map(r).includes(r(s)))}function Ea(i,n){return i.filter((r,s,l)=>s===l.findIndex(d=>n(r)===n(d)))}function Fc(i,n){return n?n.match(/([^[.\]])+/g).reduce((r,s)=>r&&r[s],i):void 0}function Bt(i,n){return typeof n=="string"?Fc(i,n):n(i)}function s0({rowExpansion:i,records:n,idAccessor:r}){let s=[];if(i&&n){let{trigger:c,allowMultiple:x,initiallyExpanded:C}=i;n&&c==="always"?s=n.map(O=>Bt(O,r)):C&&(s=n.filter((O,E)=>C({record:O,index:E})).map(O=>Bt(O,r)),x||(s=[s[0]]))}let l,d,m=ye.useState(s);if(i){let{expandable:c,trigger:x,allowMultiple:C,collapseProps:O,content:E}=i;i.expanded?{recordIds:l,onRecordIdsChange:d}=i.expanded:[l,d]=m;let N=M=>d==null?void 0:d(l.filter(I=>I!==Bt(M,r)));return{expandOnClick:x!=="always"&&x!=="never",isRowExpanded:M=>x==="always"?!0:l.includes(Bt(M,r)),isExpandable:({record:M,index:I})=>c?c({record:M,index:I}):!0,expandRow:M=>{let I=Bt(M,r);d==null||d(C?[...l,I]:[I])},collapseRow:N,collapseProps:O,content:({record:M,index:I})=>()=>E({record:M,index:I,collapse:()=>N(M)})}}}function a0(i,n){let[r,s]=ye.useState(i),[l,d]=ye.useState(i),m=At.useTimeout(()=>s(!0),0),c=At.useTimeout(()=>d(!1),n||200);return ye.useEffect(()=>{i?(c.clear(),d(!0),m.start()):(m.clear(),s(!1),c.start())},[m,c,i]),{expanded:r,visible:l}}var Ra="mantine-datatable-nowrap",La="mantine-datatable-ellipsis",ni="mantine-datatable-pointer-cursor",Wc="mantine-datatable-context-menu-cursor",u0="mantine-datatable-text-selection-disabled",Qo="mantine-datatable-text-align-left",Jo="mantine-datatable-text-align-center",Xo="mantine-datatable-text-align-right";function l0({className:i,style:n,visibleMediaQuery:r,title:s,noWrap:l,ellipsis:d,textAlign:m,width:c}){return Ko(r)?T.jsx(B.TableTh,{className:mt({[Ra]:l||d,[La]:d,[Qo]:m==="left",[Jo]:m==="center",[Xo]:m==="right"},i),style:[{width:c,minWidth:c,maxWidth:c},n],children:s}):null}function c0({shadowVisible:i}){return T.jsx(B.TableTh,{className:"mantine-datatable-footer-selector-placeholder-cell","data-shadow-visible":i||void 0})}var f0=ye.forwardRef(function({className:i,style:n,columns:r,defaultColumnProps:s,selectionVisible:l,selectorCellShadowVisible:d,scrollDiff:m},c){let x=m<0;return T.jsx(B.TableTfoot,{ref:c,className:mt("mantine-datatable-footer",i),style:[{position:x?"relative":"sticky",bottom:B.rem(x?m:0)},n],children:T.jsxs(B.TableTr,{children:[l&&T.jsx(c0,{shadowVisible:d}),r.map(({hidden:C,...O})=>{if(C)return null;let{accessor:E,visibleMediaQuery:N,textAlign:M,width:I,footer:$,footerClassName:j,footerStyle:J,noWrap:te,ellipsis:ne}={...s,...O};return T.jsx(l0,{className:j,style:J,visibleMediaQuery:N,textAlign:M,width:I,title:$,noWrap:te,ellipsis:ne},E)})]})})});function h0({group:{id:i,columns:n,title:r,textAlign:s,className:l,style:d}}){let m=ye.useMemo(()=>n.map(({visibleMediaQuery:C})=>C),[n]),c=i0(m),x=ye.useMemo(()=>n.filter(({hidden:C},O)=>!C&&(c==null?void 0:c[O])).length,[n,c]);return x>0?T.jsx(B.TableTh,{colSpan:x,className:mt("mantine-datatable-column-group-header-cell",{[Qo]:s==="left",[Jo]:s==="center",[Xo]:s==="right"},l),style:d,children:r??Ma(i)}):null}function d0(){return T.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[T.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),T.jsx("path",{d:"M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z"})]})}function p0(){return T.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[T.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),T.jsx("path",{d:"M20 3h-16a1 1 0 0 0 -1 1v2.227l.008 .223a3 3 0 0 0 .772 1.795l4.22 4.641v8.114a1 1 0 0 0 1.316 .949l6 -2l.108 -.043a1 1 0 0 0 .576 -.906v-6.586l4.121 -4.12a3 3 0 0 0 .879 -2.123v-2.171a1 1 0 0 0 -1 -1z",strokeWidth:"0",fill:"currentColor"})]})}function g0({children:i,isActive:n,filterPopoverProps:r}){let[s,{close:l,toggle:d}]=At.useDisclosure(!1),m=n?p0:d0,c=At.useClickOutside(l);return T.jsxs(B.Popover,{withArrow:!0,shadow:"md",opened:s,onClose:l,trapFocus:!0,...r,children:[T.jsx(B.PopoverTarget,{children:T.jsx(B.ActionIcon,{className:"mantine-datatable-header-cell-filter-action-icon","data-active":n||void 0,size:"sm",variant:"default",onClick:x=>{x.preventDefault(),d()},onKeyDown:x=>x.stopPropagation(),children:T.jsx(m,{})})}),T.jsx(B.PopoverDropdown,{ref:c,onClick:x=>x.stopPropagation(),onKeyDown:x=>x.stopPropagation(),children:typeof i=="function"?i({close:l}):i})]})}var m0=i=>{let{accessor:n,columnRef:r}=i,s=ye.useRef(null),[l,d]=ye.useState(0),{setColumnWidth:m}=Ta(),c=O=>{O.preventDefault(),O.stopPropagation(),document.addEventListener("mousemove",x),document.addEventListener("mouseup",C),document.body.style.cursor="col-resize"},x=O=>{if(!r.current)return;let E=O.clientX-r.current.getBoundingClientRect().right,N=`${r.current.getBoundingClientRect().width+E}px`;r.current.style.width=N,m(n,r.current.style.width),d(-E)},C=()=>{r.current&&(document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",C),document.body.style.cursor="initial",m(n,r.current.style.width),d(0))};return T.jsx("div",{ref:s,onClick:O=>O.stopPropagation(),onMouseDown:c,onDoubleClick:()=>{r.current&&(r.current.style.maxWidth="initial",r.current.style.minWidth="initial",r.current.style.width="initial",m(n,"initial"))},className:"mantine-datatable-header-resizable-handle",style:{right:B.rem(l)}})};function v0(){return T.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[T.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),T.jsx("path",{d:"M12 5l0 14"}),T.jsx("path",{d:"M16 9l-4 -4"}),T.jsx("path",{d:"M8 9l4 -4"})]})}function y0(){return T.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[T.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),T.jsx("path",{d:"M8 7l4 -4l4 4"}),T.jsx("path",{d:"M8 17l4 4l4 -4"}),T.jsx("path",{d:"M12 3l0 18"})]})}function _0(){return T.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[T.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),T.jsx("path",{d:"M9 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),T.jsx("path",{d:"M9 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),T.jsx("path",{d:"M9 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),T.jsx("path",{d:"M15 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),T.jsx("path",{d:"M15 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),T.jsx("path",{d:"M15 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"})]})}function w0(){return T.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[T.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),T.jsx("path",{d:"M18 6l-12 12"}),T.jsx("path",{d:"M6 6l12 12"})]})}function b0({className:i,style:n,accessor:r,visibleMediaQuery:s,title:l,sortable:d,draggable:m,toggleable:c,resizable:x,sortIcons:C,textAlign:O,width:E,sortStatus:N,onSortStatusChange:M,filter:I,filterPopoverProps:$,filtering:j,sortKey:J}){let{setSourceColumn:te,setTargetColumn:ne,swapColumns:ue,setColumnsToggle:Z}=Ta(),[le,oe]=ye.useState(!1),X=ye.useRef(null);if(!Ko(s))return null;let me=l??Ma(r),de=typeof me=="string"?me:void 0,re=d&&M?p=>{p!=null&&p.defaultPrevented||M({sortKey:J,columnAccessor:r,direction:(N==null?void 0:N.columnAccessor)===r?N.direction==="asc"?"desc":"asc":(N==null?void 0:N.direction)??"asc"})}:void 0,Oe=p=>{p.stopPropagation(),te(r),oe(!1)},Ae=p=>{p.preventDefault(),ne(r),oe(!0)},Y=()=>{ne(r),oe(!1),ue()},R=()=>{oe(!0)},A=()=>{oe(!1)},g=p=>{p.stopPropagation(),Z(w=>w.map(h=>h.accessor===r?{...h,toggled:!1}:h))};return T.jsxs(B.TableTh,{className:mt({"mantine-datatable-header-cell-sortable":d,"mantine-datatable-header-cell-toggleable":c,"mantine-datatable-header-cell-resizable":x},i),style:[{width:E,...x?{minWidth:"1px"}:{minWidth:E,maxWidth:E}},n],role:d?"button":void 0,tabIndex:d?0:void 0,onClick:re,onKeyDown:p=>p.key==="Enter"&&(re==null?void 0:re()),ref:X,children:[T.jsxs(B.Group,{className:"mantine-datatable-header-cell-sortable-group",justify:"space-between",wrap:"nowrap",children:[T.jsxs(B.Flex,{align:"center",w:"100%",className:mt({"mantine-datatable-header-cell-draggable":m,"mantine-datatable-header-cell-drag-over":le}),draggable:m,onDragStart:m?Oe:void 0,onDragEnter:m?R:void 0,onDragOver:m?Ae:void 0,onDrop:m?Y:void 0,onDragLeave:m?A:void 0,children:[m?T.jsx(B.Center,{role:"img","aria-label":"Drag column",children:T.jsx(B.ActionIcon,{className:"mantine-datatable-header-cell-draggable-action-icon",variant:"subtle",size:"xs",onClick:p=>{p.stopPropagation()},children:T.jsx(_0,{})})}):null,T.jsx(B.Box,{className:mt("mantine-datatable-header-cell-sortable-text",{[Qo]:O==="left",[Jo]:O==="center",[Xo]:O==="right"},Ra,La),title:de,children:me})]}),c?T.jsx(B.Center,{className:"mantine-datatable-header-cell-toggleable-icon",role:"img","aria-label":"Toggle column",children:T.jsx(B.ActionIcon,{size:"xs",variant:"light",onClick:g,children:T.jsx(w0,{})})}):null,d||(N==null?void 0:N.columnAccessor)===r?T.jsx(T.Fragment,{children:(N==null?void 0:N.columnAccessor)===r?T.jsx(B.Center,{className:mt("mantine-datatable-header-cell-sortable-icon",{"mantine-datatable-header-cell-sortable-icon-reversed":N.direction==="desc"}),role:"img","aria-label":`Sorted ${N.direction==="desc"?"descending":"ascending"}`,children:(C==null?void 0:C.sorted)||T.jsx(v0,{})}):T.jsx(B.Center,{className:"mantine-datatable-header-cell-sortable-unsorted-icon",role:"img","aria-label":"Not sorted",children:(C==null?void 0:C.unsorted)||T.jsx(y0,{})})}):null,I?T.jsx(g0,{filterPopoverProps:$,isActive:!!j,children:I}):null]}),x?T.jsx(m0,{accessor:r,columnRef:X}):null]})}var x0=ye.forwardRef(function({className:i,style:n,trigger:r,shadowVisible:s,checked:l,indeterminate:d,checkboxProps:m,onChange:c,rowSpan:x},C){let O=!m.disabled;return T.jsx(B.TableTh,{ref:C,className:mt("mantine-datatable-header-selector-cell",{[ni]:r==="cell"&&O},i),style:n,rowSpan:x,"data-shadow-visible":s||void 0,onClick:r==="cell"&&O?c:void 0,children:T.jsx(B.Checkbox,{classNames:O?{input:ni}:void 0,checked:l,indeterminate:d,onChange:c,...m,disabled:!(c||m.onChange)||m.disabled})})}),S0=ye.forwardRef(function({selectionColumnHeaderRef:i,className:n,style:r,sortStatus:s,sortIcons:l,onSortStatusChange:d,columns:m,defaultColumnProps:c,groups:x,selectionTrigger:C,selectionVisible:O,selectionChecked:E,selectionIndeterminate:N,onSelectionChange:M,selectionCheckboxProps:I,selectorCellShadowVisible:$,selectionColumnClassName:j,selectionColumnStyle:J},te){let ne=O?T.jsx(x0,{ref:i,className:j,style:J,trigger:C,shadowVisible:$,checked:E,indeterminate:N,checkboxProps:I,onChange:M,rowSpan:x?2:void 0}):null,{columnsToggle:ue,setColumnsToggle:Z}=Ta(),[le,oe]=ye.useState(!1),X=m.some(re=>re.toggleable),me=X?Object.fromEntries(m.map(({accessor:re,title:Oe})=>[re,Oe??Ma(String(re))])):void 0,de=T.jsxs(B.TableThead,{className:mt("mantine-datatable-header",n),style:r,ref:te,onContextMenu:X?re=>{re.preventDefault(),oe(Oe=>!Oe)}:void 0,children:[x&&T.jsxs(B.TableTr,{children:[ne,x.map(re=>T.jsx(h0,{group:re},re.id))]}),T.jsxs(B.TableTr,{children:[!x&&ne,m.map(({hidden:re,...Oe},Ae)=>{if(re)return null;let{accessor:Y,visibleMediaQuery:R,textAlign:A,width:g,title:p,sortable:w,draggable:h,toggleable:v,resizable:D,titleClassName:W,titleStyle:V,filter:ae,filterPopoverProps:fe,filtering:we,sortKey:ee}={...c,...Oe};return T.jsx(b0,{accessor:Y,className:W,style:V,visibleMediaQuery:R,textAlign:A,width:g,title:p,sortable:w,draggable:h,toggleable:v,resizable:D&&Ae<m.length-1,sortStatus:s,sortIcons:l,sortKey:ee,onSortStatusChange:d,filter:ae,filterPopoverProps:fe,filtering:we},Y)})]})]});return X?T.jsxs(B.Popover,{position:"bottom",withArrow:!0,shadow:"md",opened:le,onChange:oe,children:[T.jsx(B.PopoverTarget,{children:de}),T.jsx(B.PopoverDropdown,{children:T.jsx(B.Stack,{children:ue.filter(re=>re.toggleable).map(re=>T.jsx(B.Group,{children:T.jsx(B.Checkbox,{classNames:{label:"mantine-datatable-header-column-toggle-checkbox-label"},size:"xs",label:me[re.accessor],checked:re.toggled,onChange:Oe=>{Z(ue.map(Ae=>Ae.accessor===re.accessor?{...Ae,toggled:Oe.currentTarget.checked}:Ae))}})},re.accessor))})})]}):de});function C0({pt:i,pb:n,fetching:r,customContent:s,backgroundBlur:l,size:d,type:m,color:c}){return T.jsx(B.Center,{pt:i,pb:n,className:mt("mantine-datatable-loader",{"mantine-datatable-loader-fetching":r}),style:[{backdropFilter:l?`blur(${l}px)`:void 0}],children:r&&(s||T.jsx(B.Loader,{size:d,type:m,color:c}))})}function bt(i,n,r){return i?B.parseThemeColor({color:typeof i=="object"?i[r]:i,theme:n}).value:void 0}function A0({theme:i,c:n,backgroundColor:r,borderColor:s,rowBorderColor:l,stripedColor:d,highlightOnHoverColor:m}){return{"--mantine-datatable-color-light":bt(n,i,"light"),"--mantine-datatable-color-dark":bt(n,i,"dark"),"--mantine-datatable-background-color-light":bt(r,i,"light"),"--mantine-datatable-background-color-dark":bt(r,i,"dark"),"--mantine-datatable-border-color-light":bt(s,i,"light"),"--mantine-datatable-border-color-dark":bt(s,i,"dark"),"--mantine-datatable-row-border-color-light":bt(l,i,"light"),"--mantine-datatable-row-border-color-dark":bt(l,i,"dark"),"--mantine-datatable-striped-color-light":bt(d,i,"light"),"--mantine-datatable-striped-color-dark":bt(d,i,"dark"),"--mantine-datatable-highlight-on-hover-color-light":bt(m,i,"light"),"--mantine-datatable-highlight-on-hover-color-dark":bt(m,i,"dark")}}function zc({theme:i,paginationActiveTextColor:n,paginationActiveBackgroundColor:r}){return{"--mantine-datatable-pagination-active-text-color-light":bt(n,i,"light"),"--mantine-datatable-pagination-active-text-color-dark":bt(n,i,"dark"),"--mantine-datatable-pagination-active-background-color-light":bt(r,i,"light"),"--mantine-datatable-pagination-active-background-color-dark":bt(r,i,"dark")}}function D0({theme:i,color:n,backgroundColor:r}){return{"--mantine-datatable-row-color-light":bt(n,i,"light"),"--mantine-datatable-row-color-dark":bt(n,i,"dark"),"--mantine-datatable-row-background-color-light":bt(r,i,"light"),"--mantine-datatable-row-background-color-dark":bt(r,i,"dark")}}function O0(){return T.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[T.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),T.jsx("path",{d:"M8 9l4 -4l4 4"}),T.jsx("path",{d:"M16 15l-4 4l-4 -4"})]})}var qc={xs:B.rem(22),sm:B.rem(26),md:B.rem(32),lg:B.rem(38),xl:B.rem(44)};function T0({size:i,label:n,values:r,value:s,activeTextColor:l,activeBackgroundColor:d,onChange:m}){return T.jsxs(B.Group,{gap:"xs",children:[T.jsx(B.Text,{component:"div",size:i,children:n}),T.jsxs(B.Menu,{withinPortal:!0,withArrow:!0,classNames:{arrow:"mantine-datatable-page-size-selector-menu-arrow"},children:[T.jsx(B.MenuTarget,{children:T.jsx(B.Button,{size:i,variant:"default",classNames:{section:"mantine-datatable-page-size-selector-button-icon"},rightSection:T.jsx(O0,{}),style:[{fontWeight:"normal"},c=>({height:qc[i],paddingLeft:c.spacing[i],paddingRight:c.spacing[i]})],children:s})}),T.jsx(B.MenuDropdown,{children:r.map(c=>{let x=c===s;return T.jsx(B.MenuItem,{className:mt({"mantine-datatable-page-size-selector-active":x}),style:[{height:qc[i]},x&&(l||d)?C=>zc({theme:C,paginationActiveTextColor:l,paginationActiveBackgroundColor:d}):void 0],disabled:x,onClick:()=>m(c),children:T.jsx(B.Text,{component:"div",size:i,children:c})},c)})})]})]})}var M0=ye.forwardRef(function({className:i,style:n,fetching:r,page:s,onPageChange:l,paginationWithEdges:d,paginationWithControls:m,paginationActiveTextColor:c,paginationActiveBackgroundColor:x,paginationSize:C,loadingText:O,noRecordsText:E,paginationText:N,totalRecords:M,recordsPerPage:I,onRecordsPerPageChange:$,recordsPerPageLabel:j,recordsPerPageOptions:J,recordsLength:te,horizontalSpacing:ne,paginationWrapBreakpoint:ue,getPaginationControlProps:Z},le){let oe;if(M){let me=(s-1)*I+1,de=me+(te||0)-1;oe=N({from:me,to:de,totalRecords:M})}else oe=r?O:E;let X=Ko(({breakpoints:me})=>`(min-width: ${typeof ue=="number"?`${B.rem(ue)}rem`:me[ue]||ue})`);return T.jsxs(B.Box,{ref:le,px:ne??"xs",py:"xs",className:mt("mantine-datatable-pagination",i),style:[{flexDirection:X?"row":"column"},n],children:[T.jsx(B.Text,{component:"div",className:"mantine-datatable-pagination-text",size:C,children:oe}),J&&T.jsx(T0,{activeTextColor:c,activeBackgroundColor:x,size:C,label:j,values:J,value:I,onChange:$}),T.jsx(B.Pagination,{classNames:{root:mt("mantine-datatable-pagination-pages",{"mantine-datatable-pagination-pages-fetching":r||!te}),control:"mantine-datatable-pagination-pages-control"},style:c||x?me=>zc({theme:me,paginationActiveTextColor:c,paginationActiveBackgroundColor:x}):void 0,withEdges:d,withControls:m,value:s,onChange:l,size:C,total:Math.ceil(M/I),getControlProps:Z})]})});function E0({className:i,style:n,visibleMediaQuery:r,record:s,index:l,onClick:d,onDoubleClick:m,onContextMenu:c,noWrap:x,ellipsis:C,textAlign:O,width:E,accessor:N,render:M,defaultRender:I,customCellAttributes:$}){return Ko(r)?T.jsx(B.TableTd,{className:mt({[Ra]:x||C,[La]:C,[ni]:d||m,[Wc]:c,[Qo]:O==="left",[Jo]:O==="center",[Xo]:O==="right"},i),style:[{width:E,minWidth:E,maxWidth:E},n],onClick:d,onDoubleClick:m,onContextMenu:c,...$==null?void 0:$(s,l),children:M?M(s,l):I?I(s,l,N):Fc(s,N)}):null}function R0({open:i,colSpan:n,content:r,collapseProps:s}){let{expanded:l,visible:d}=a0(i,s==null?void 0:s.transitionDuration);return d?T.jsxs(T.Fragment,{children:[T.jsx(B.TableTr,{}),T.jsx(B.TableTr,{children:T.jsx(B.TableTd,{className:"mantine-datatable-row-expansion-cell",colSpan:n,children:T.jsx(B.Collapse,{in:l,...s,children:T.jsx("div",{className:"mantine-datatable-row-expansion-cell-content",children:r()})})})})]}):null}function L0({className:i,style:n,record:r,index:s,trigger:l,onChange:d,withRightShadow:m,checkboxProps:c,getCheckboxProps:x,...C}){let O={...c,...x(r,s)},E=!C.disabled&&!O.disabled,N=M=>{M.stopPropagation(),l==="cell"&&E&&(d==null||d(M))};return T.jsx(B.TableTd,{className:mt("mantine-datatable-row-selector-cell",{[ni]:l==="cell"&&E},i),style:n,"data-shadow-visible":m||void 0,onClick:N,children:T.jsx(B.Checkbox,{classNames:E?{input:ni}:void 0,onChange:d,...C,...O})})}function k0({record:i,index:n,columns:r,defaultColumnProps:s,defaultColumnRender:l,selectionTrigger:d,selectionVisible:m,selectionChecked:c,onSelectionChange:x,isRecordSelectable:C,selectionCheckboxProps:O,getSelectionCheckboxProps:E,onClick:N,onDoubleClick:M,onContextMenu:I,onCellClick:$,onCellDoubleClick:j,onCellContextMenu:J,expansion:te,customAttributes:ne,color:ue,backgroundColor:Z,className:le,style:oe,selectorCellShadowVisible:X,selectionColumnClassName:me,selectionColumnStyle:de,rowFactory:re}){let Oe=T.jsxs(T.Fragment,{children:[m&&T.jsx(L0,{className:me,style:de,record:i,index:n,trigger:d,withRightShadow:X,checked:c,disabled:!x||(C?!C(i,n):!1),onChange:x,checkboxProps:O,getCheckboxProps:E}),r.map(({hidden:R,hiddenContent:A,...g},p)=>{if(R||A)return null;let{accessor:w,visibleMediaQuery:h,textAlign:v,noWrap:D,ellipsis:W,width:V,render:ae,cellsClassName:fe,cellsStyle:we,customCellAttributes:ee}={...s,...g};return T.jsx(E0,{className:typeof fe=="function"?fe(i,n):fe,style:we==null?void 0:we(i,n),visibleMediaQuery:h,record:i,index:n,onClick:$?he=>$({event:he,record:i,index:n,column:g,columnIndex:p}):void 0,onDoubleClick:j?he=>j({event:he,record:i,index:n,column:g,columnIndex:p}):void 0,onContextMenu:J?he=>J({event:he,record:i,index:n,column:g,columnIndex:p}):void 0,accessor:w,textAlign:v,noWrap:D,ellipsis:W,width:V,render:ae,defaultRender:l,customCellAttributes:ee},w)})]}),Ae=te&&T.jsx(R0,{colSpan:r.filter(({hidden:R})=>!R).length+(m?1:0),open:te.isRowExpanded(i),content:te.content({record:i,index:n}),collapseProps:te.collapseProps}),Y=I0({record:i,index:n,selectionChecked:c,onClick:N,onDoubleClick:M,onContextMenu:I,expansion:te,customAttributes:ne,color:ue,backgroundColor:Z,className:le,style:oe});return re?re({record:i,index:n,rowProps:Y,children:Oe,expandedElement:Ae}):T.jsxs(T.Fragment,{children:[T.jsx(B.TableTr,{...Y,children:Oe}),Ae]})}function I0({record:i,index:n,selectionChecked:r,onClick:s,onDoubleClick:l,onContextMenu:d,expansion:m,customAttributes:c,color:x,backgroundColor:C,className:O,style:E}){return{className:mt("mantine-datatable-row",{[ni]:s||l||(m==null?void 0:m.isExpandable({record:i,index:n}))&&(m==null?void 0:m.expandOnClick)},{[Wc]:d},typeof O=="function"?O(i,n):O),"data-selected":r||void 0,onClick:N=>{if(m){let{isExpandable:M,isRowExpanded:I,expandOnClick:$,expandRow:j,collapseRow:J}=m;M({record:i,index:n})&&$&&(I(i)?J(i):j(i))}s==null||s({event:N,record:i,index:n})},onDoubleClick:l?N=>l({event:N,record:i,index:n}):void 0,onContextMenu:d?N=>d({event:N,record:i,index:n}):void 0,style:[x||C?N=>{let M=x==null?void 0:x(i,n),I=C==null?void 0:C(i,n);return D0({theme:N,color:M,backgroundColor:I})}:void 0,E==null?void 0:E(i,n)],...(c==null?void 0:c(i,n))??{}}}function P0({topShadowVisible:i,leftShadowVisible:n,leftShadowBehind:r,rightShadowVisible:s,rightShadowBehind:l,bottomShadowVisible:d,headerHeight:m,footerHeight:c,onScrollPositionChange:x,children:C,viewportRef:O,scrollAreaProps:E}){return T.jsxs(B.ScrollArea,{...E,viewportRef:O,classNames:{root:"mantine-datatable-scroll-area",scrollbar:"mantine-datatable-scroll-area-scrollbar",thumb:"mantine-datatable-scroll-area-thumb",corner:"mantine-datatable-scroll-area-corner"},onScrollPositionChange:x,children:[C,T.jsx(B.Box,{className:mt("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-top-shadow",{"mantine-datatable-scroll-area-shadow-visible":i}),style:{top:m?B.rem(m):0}}),T.jsx("div",{className:mt("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-left-shadow",{"mantine-datatable-scroll-area-shadow-visible":n,"mantine-datatable-scroll-area-shadow-behind":r})}),T.jsx("div",{className:mt("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-right-shadow",{"mantine-datatable-scroll-area-shadow-visible":s,"mantine-datatable-scroll-area-shadow-behind":l})}),T.jsx(B.Box,{className:mt("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-bottom-shadow",{"mantine-datatable-scroll-area-shadow-visible":d}),style:{bottom:c?B.rem(c+1):0}})]})}function N0({withTableBorder:i,borderRadius:n,textSelectionDisabled:r,height:s="100%",minHeight:l,maxHeight:d,shadow:m,verticalAlign:c="center",fetching:x,columns:C,storeColumnsKey:O,groups:E,pinFirstColumn:N,pinLastColumn:M,defaultColumnProps:I,defaultColumnRender:$,idAccessor:j="id",records:J,selectionTrigger:te="checkbox",selectedRecords:ne,onSelectedRecordsChange:ue,selectionColumnClassName:Z,selectionColumnStyle:le,isRecordSelectable:oe,selectionCheckboxProps:X,allRecordsSelectionCheckboxProps:me={"aria-label":"Select all records"},getRecordSelectionCheckboxProps:de=(Ht,jn)=>({"aria-label":`Select record ${jn+1}`}),sortStatus:re,sortIcons:Oe,onSortStatusChange:Ae,horizontalSpacing:Y,page:R,onPageChange:A,totalRecords:g,recordsPerPage:p,onRecordsPerPageChange:w,recordsPerPageOptions:h,recordsPerPageLabel:v="Records per page",paginationWithEdges:D,paginationWithControls:W,paginationActiveTextColor:V,paginationActiveBackgroundColor:ae,paginationSize:fe="sm",paginationText:we=({from:Ht,to:jn,totalRecords:Yn})=>`${Ht} - ${jn} / ${Yn}`,paginationWrapBreakpoint:ee="sm",getPaginationControlProps:he=Ht=>Ht==="previous"?{"aria-label":"Previous page"}:Ht==="next"?{"aria-label":"Next page"}:{},loaderBackgroundBlur:De,customLoader:_e,loaderSize:P,loaderType:z,loaderColor:F,loadingText:K="...",emptyState:se,noRecordsText:Te="No records",noRecordsIcon:u,highlightOnHover:f,striped:_,noHeader:k,onRowClick:q,onRowDoubleClick:Q,onRowContextMenu:Ce,onCellClick:be,onCellDoubleClick:Re,onCellContextMenu:Se,onScroll:Le,onScrollToTop:Ne,onScrollToBottom:ke,onScrollToLeft:Ge,onScrollToRight:Je,c:Ve,backgroundColor:xt,borderColor:vt,rowBorderColor:ut,stripedColor:qt,highlightOnHoverColor:Dt,rowColor:$n,rowBackgroundColor:fn,rowExpansion:Qt,rowClassName:xn,rowStyle:Bn,customRowAttributes:En,scrollViewportRef:it,scrollAreaProps:It,tableRef:Sn,bodyRef:dr,m:dt,my:Mt,mx:pr,mt:gr,mb:mr,ml:ci,mr:fi,className:hi,classNames:Et,style:ka,styles:Rt,rowFactory:Ia,tableWrapper:Vi,...Zi}){let{ref:Ht,width:jn,height:Yn}=ti(),Br=ye.useMemo(()=>(E==null?void 0:E.flatMap(Ze=>Ze.columns))??C,[C,E]),es=J1({key:O,columns:Br}),{ref:Pa,height:vr}=ti(),{ref:Na,width:yr,height:jr}=ti(),{ref:$a,height:Ba}=ti(),{ref:ts,height:Ki}=ti(),{ref:ns,width:ja}=ti(),Ya=At.useMergedRef(Na,Sn),Ua=At.useMergedRef(Ht,it),[Qi,Ji]=ye.useState(!0),[di,Xi]=ye.useState(!0),[Un,rs]=ye.useState(!0),[Yr,Ur]=ye.useState(!0),is=s0({rowExpansion:Qt,records:J,idAccessor:j}),eo=ye.useCallback(()=>{var wr,br;let Ze=((wr=Ht.current)==null?void 0:wr.scrollTop)??0,Jt=((br=Ht.current)==null?void 0:br.scrollLeft)??0;if(x||jr<=Yn)Ji(!0),Xi(!0);else{let hn=Ze===0,Xt=jr-Ze-Yn<1;Ji(hn),Xi(Xt),hn&&hn!==Qi&&(Ne==null||Ne()),Xt&&Xt!==di&&(ke==null||ke())}if(x||yr===jn)rs(!0),Ur(!0);else{let hn=Jt===0,Xt=yr-Jt-jn<1;rs(hn),Ur(Xt),hn&&hn!==Un&&(Ge==null||Ge()),Xt&&Xt!==Yr&&(Je==null||Je())}},[x,ke,Ge,Je,Ne,Yn,Ht,jn,di,Un,Yr,Qi,jr,yr]);X1(eo,[eo]);let to=At.useDebouncedCallback(eo,50),os=ye.useCallback(Ze=>{Le==null||Le(Ze),to()},[to,Le]),no=ye.useCallback(Ze=>{var Jt;(Jt=Ht.current)==null||Jt.scrollTo({top:0,left:0}),A(Ze)},[A,Ht]),pi=J==null?void 0:J.length,ro=J==null?void 0:J.map(Ze=>Bt(Ze,j)),Rn=!!ne,Cn=ne==null?void 0:ne.map(Ze=>Bt(Ze,j)),Fn=ro!==void 0&&Cn!==void 0&&Cn.length>0,_r=oe?J==null?void 0:J.filter(oe):J,Fr=_r==null?void 0:_r.map(Ze=>Bt(Ze,j)),gi=Fn&&Fr.every(Ze=>Cn.includes(Ze)),ss=Fn&&Fr.some(Ze=>Cn.includes(Ze)),as=ye.useCallback(()=>{ne&&ue&&ue(gi?ne.filter(Ze=>!Fr.includes(Bt(Ze,j))):Ea([...ne,..._r],Ze=>Bt(Ze,j)))},[gi,j,ue,Fr,_r,ne]),{lastSelectionChangeIndex:Wr,setLastSelectionChangeIndex:us}=e0(ro),io=Rn&&!Un&&!N,Fa={m:dt,my:Mt,mx:pr,mt:gr,mb:mr,ml:ci,mr:fi},Wa=ye.useCallback(({children:Ze})=>Vi?Vi({children:Ze}):Ze,[Vi]);return T.jsx(Uc,{...es,children:T.jsxs(B.Box,{...Fa,className:mt("mantine-datatable",{"mantine-datatable-with-border":i},hi,Et==null?void 0:Et.root),style:[Ze=>({...A0({theme:Ze,c:Ve,backgroundColor:xt,borderColor:vt,rowBorderColor:ut,stripedColor:qt,highlightOnHoverColor:Dt}),borderRadius:Ze.radius[n]||n,boxShadow:Ze.shadows[m]||m,height:s,minHeight:l,maxHeight:d}),ka,Rt==null?void 0:Rt.root,{position:"relative"}],children:[T.jsx(P0,{viewportRef:Ua,topShadowVisible:!Qi,leftShadowVisible:!Un,leftShadowBehind:Rn||!!N,rightShadowVisible:!Yr,rightShadowBehind:M,bottomShadowVisible:!di,headerHeight:vr,footerHeight:Ba,onScrollPositionChange:os,scrollAreaProps:It,children:T.jsx(Wa,{children:T.jsxs(B.Table,{ref:Ya,horizontalSpacing:Y,className:mt("mantine-datatable-table",{[u0]:r,"mantine-datatable-vertical-align-top":c==="top","mantine-datatable-vertical-align-bottom":c==="bottom","mantine-datatable-last-row-border-bottom-visible":Zi.withRowBorders&&jr<Yn,"mantine-datatable-pin-last-column":M,"mantine-datatable-pin-last-column-scrolled":!Yr&&M,"mantine-datatable-selection-column-visible":Rn,"mantine-datatable-pin-first-column":N,"mantine-datatable-pin-first-column-scrolled":!Un&&N},Et==null?void 0:Et.table),style:{...Rt==null?void 0:Rt.table,"--mantine-datatable-selection-column-width":`${ja}px`},"data-striped":pi&&_||void 0,"data-highlight-on-hover":f||void 0,...Zi,children:[k?null:T.jsx(Uc,{...es,children:T.jsx(S0,{ref:Pa,selectionColumnHeaderRef:ns,className:Et==null?void 0:Et.header,style:Rt==null?void 0:Rt.header,columns:Br,defaultColumnProps:I,groups:E,sortStatus:re,sortIcons:Oe,onSortStatusChange:Ae,selectionTrigger:te,selectionVisible:Rn,selectionChecked:gi,selectionIndeterminate:ss&&!gi,onSelectionChange:as,selectionCheckboxProps:{...X,...me},selectorCellShadowVisible:io,selectionColumnClassName:Z,selectionColumnStyle:le})}),T.jsx("tbody",{ref:dr,children:pi?J.map((Ze,Jt)=>{let wr=Bt(Ze,j),br=(Cn==null?void 0:Cn.includes(wr))||!1,hn;return ue&&ne&&(hn=Xt=>{if(Xt.nativeEvent.shiftKey&&Wr!==null){let xr=J.filter(Jt>Wr?(Wn,zn)=>zn>=Wr&&zn<=Jt&&(oe?oe(Wn,zn):!0):(Wn,zn)=>zn>=Jt&&zn<=Wr&&(oe?oe(Wn,zn):!0));ue(br?o0(ne,xr,Wn=>Bt(Wn,j)):Ea([...ne,...xr],Wn=>Bt(Wn,j)))}else ue(br?ne.filter(xr=>Bt(xr,j)!==wr):Ea([...ne,Ze],xr=>Bt(xr,j)));us(Jt)}),T.jsx(k0,{record:Ze,index:Jt,columns:Br,defaultColumnProps:I,defaultColumnRender:$,selectionTrigger:te,selectionVisible:Rn,selectionChecked:br,onSelectionChange:hn,isRecordSelectable:oe,selectionCheckboxProps:X,getSelectionCheckboxProps:de,onClick:q,onDoubleClick:Q,onCellClick:be,onCellDoubleClick:Re,onContextMenu:Ce,onCellContextMenu:Se,expansion:is,color:$n,backgroundColor:fn,className:xn,style:Bn,customAttributes:En,selectorCellShadowVisible:io,selectionColumnClassName:Z,selectionColumnStyle:le,idAccessor:j,rowFactory:Ia},wr)}):T.jsx(Z1,{})}),Br.some(({footer:Ze})=>Ze)&&T.jsx(f0,{ref:$a,className:Et==null?void 0:Et.footer,style:Rt==null?void 0:Rt.footer,columns:Br,defaultColumnProps:I,selectionVisible:Rn,selectorCellShadowVisible:io,scrollDiff:jr-Yn})]})})}),R&&T.jsx(M0,{ref:ts,className:Et==null?void 0:Et.pagination,style:Rt==null?void 0:Rt.pagination,horizontalSpacing:Y,fetching:x,page:R,onPageChange:no,totalRecords:g,recordsPerPage:p,onRecordsPerPageChange:w,recordsPerPageOptions:h,recordsPerPageLabel:v,paginationWithEdges:D,paginationWithControls:W,paginationActiveTextColor:V,paginationActiveBackgroundColor:ae,paginationSize:fe,paginationText:we,paginationWrapBreakpoint:ee,getPaginationControlProps:he,noRecordsText:Te,loadingText:K,recordsLength:pi}),T.jsx(C0,{pt:vr,pb:Ki,fetching:x,backgroundBlur:De,customContent:_e,size:P,type:z,color:F}),T.jsx(Q1,{pt:vr,pb:Ki,icon:u,text:Te,active:!x&&!pi,children:se})]})})}var $0=ye.forwardRef(function({children:i,isDragging:n,...r},s){let l=ye.useRef(null),d=At.useMergedRef(l,s);return ye.useEffect(()=>{if(!l.current||!n)return;let m=l.current.parentElement.parentElement.children[0].children[0];for(let c=0;c<m.children.length;c++){let x=m.children[c].getBoundingClientRect(),C=l.current.children[c];C.style.height=x.height+"px",C.style.width=x.width+"px",C.style.minWidth=x.width+"px",C.style.maxWidth=x.width+"px"}},[n,i]),T.jsx(B.TableTr,{"data-is-dragging":n,ref:d,...r,children:i})});$0.displayName="DataTableDraggableRow";var qi={exports:{}};/**
118
118
  * @license
119
119
  * Lodash <https://lodash.com/>
120
120
  * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
121
121
  * Released under MIT license <https://lodash.com/license>
122
122
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
123
123
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
124
- */var B0=zi.exports,Hc;function j0(){return Hc||(Hc=1,function(i,n){(function(){var r,s="4.17.21",l=200,d="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",m="Expected a function",c="Invalid `variable` option passed into `_.template`",x="__lodash_hash_undefined__",C=500,O="__lodash_placeholder__",R=1,N=2,E=4,I=1,$=2,j=1,X=2,te=4,ne=8,ue=16,V=32,ce=64,oe=128,ee=256,de=512,pe=30,re="...",Ae=800,Se=16,Y=1,L=2,A=3,g=1/0,p=9007199254740991,w=17976931348623157e292,h=NaN,v=4294967295,D=v-1,z=v>>>1,Z=[["ary",oe],["bind",j],["bindKey",X],["curry",ne],["curryRight",ue],["flip",de],["partial",V],["partialRight",ce],["rearg",ee]],ae="[object Arguments]",fe="[object Array]",_e="[object AsyncFunction]",J="[object Boolean]",he="[object Date]",De="[object DOMException]",be="[object Error]",P="[object Function]",q="[object GeneratorFunction]",F="[object Map]",K="[object Number]",se="[object Null]",Oe="[object Object]",u="[object Promise]",f="[object Proxy]",_="[object RegExp]",M="[object Set]",W="[object String]",Q="[object Symbol]",xe="[object Undefined]",Me="[object WeakMap]",Ie="[object WeakSet]",Ce="[object ArrayBuffer]",ke="[object DataView]",Ne="[object Float32Array]",Re="[object Float64Array]",Ge="[object Int8Array]",Je="[object Int16Array]",Ve="[object Int32Array]",xt="[object Uint8Array]",vt="[object Uint8ClampedArray]",ut="[object Uint16Array]",qt="[object Uint32Array]",Dt=/\b__p \+= '';/g,$n=/\b(__p \+=) '' \+/g,fn=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Qt=/&(?:amp|lt|gt|quot|#39);/g,xn=/[&<>"']/g,Bn=RegExp(Qt.source),En=RegExp(xn.source),it=/<%-([\s\S]+?)%>/g,It=/<%([\s\S]+?)%>/g,Sn=/<%=([\s\S]+?)%>/g,dr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,dt=/^\w*$/,Mt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,pr=/[\\^$.*+?()[\]{}|]/g,gr=RegExp(pr.source),mr=/^\s+/,ci=/\s/,fi=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,hi=/\{\n\/\* \[wrapped with (.+)\] \*/,Et=/,? & /,La=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Rt=/[()=,{}\[\]\/\s]/,ka=/\\(\\)?/g,Gi=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Vi=/\w*$/,Ht=/^[-+]0x[0-9a-f]+$/i,jn=/^0b[01]+$/i,Yn=/^\[object .+?Constructor\]$/,Br=/^0o[0-7]+$/i,es=/^(?:0|[1-9]\d*)$/,Ia=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,vr=/($^)/,Pa=/['\n\r\u2028\u2029\\]/g,yr="\\ud800-\\udfff",jr="\\u0300-\\u036f",Na="\\ufe20-\\ufe2f",$a="\\u20d0-\\u20ff",ts=jr+Na+$a,Zi="\\u2700-\\u27bf",ns="a-z\\xdf-\\xf6\\xf8-\\xff",Ba="\\xac\\xb1\\xd7\\xf7",ja="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Ya="\\u2000-\\u206f",Ki=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Qi="A-Z\\xc0-\\xd6\\xd8-\\xde",di="\\ufe0e\\ufe0f",Ji=Ba+ja+Ya+Ki,Un="['’]",rs="["+yr+"]",Yr="["+Ji+"]",Ur="["+ts+"]",is="\\d+",Xi="["+Zi+"]",eo="["+ns+"]",os="[^"+yr+Ji+is+Zi+ns+Qi+"]",to="\\ud83c[\\udffb-\\udfff]",pi="(?:"+Ur+"|"+to+")",no="[^"+yr+"]",Rn="(?:\\ud83c[\\udde6-\\uddff]){2}",Cn="[\\ud800-\\udbff][\\udc00-\\udfff]",Fn="["+Qi+"]",_r="\\u200d",Fr="(?:"+eo+"|"+os+")",gi="(?:"+Fn+"|"+os+")",ss="(?:"+Un+"(?:d|ll|m|re|s|t|ve))?",as="(?:"+Un+"(?:D|LL|M|RE|S|T|VE))?",Wr=pi+"?",us="["+di+"]?",ro="(?:"+_r+"(?:"+[no,Rn,Cn].join("|")+")"+us+Wr+")*",Ua="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Fa="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ze=us+Wr+ro,Jt="(?:"+[Xi,Rn,Cn].join("|")+")"+Ze,wr="(?:"+[no+Ur+"?",Ur,Rn,Cn,rs].join("|")+")",br=RegExp(Un,"g"),hn=RegExp(Ur,"g"),Xt=RegExp(to+"(?="+to+")|"+wr+Ze,"g"),xr=RegExp([Fn+"?"+eo+"+"+ss+"(?="+[Yr,Fn,"$"].join("|")+")",gi+"+"+as+"(?="+[Yr,Fn+Fr,"$"].join("|")+")",Fn+"?"+Fr+"+"+ss,Fn+"+"+as,Fa,Ua,is,Jt].join("|"),"g"),Wn=RegExp("["+_r+yr+ts+di+"]"),zn=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,om=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],sm=-1,ft={};ft[Ne]=ft[Re]=ft[Ge]=ft[Je]=ft[Ve]=ft[xt]=ft[vt]=ft[ut]=ft[qt]=!0,ft[ae]=ft[fe]=ft[Ce]=ft[J]=ft[ke]=ft[he]=ft[be]=ft[P]=ft[F]=ft[K]=ft[Oe]=ft[_]=ft[M]=ft[W]=ft[Me]=!1;var ct={};ct[ae]=ct[fe]=ct[Ce]=ct[ke]=ct[J]=ct[he]=ct[Ne]=ct[Re]=ct[Ge]=ct[Je]=ct[Ve]=ct[F]=ct[K]=ct[Oe]=ct[_]=ct[M]=ct[W]=ct[Q]=ct[xt]=ct[vt]=ct[ut]=ct[qt]=!0,ct[be]=ct[P]=ct[Me]=!1;var am={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},um={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},lm={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},cm={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},fm=parseFloat,hm=parseInt,ef=typeof bo=="object"&&bo&&bo.Object===Object&&bo,dm=typeof self=="object"&&self&&self.Object===Object&&self,Lt=ef||dm||Function("return this")(),Wa=n&&!n.nodeType&&n,zr=Wa&&!0&&i&&!i.nodeType&&i,tf=zr&&zr.exports===Wa,za=tf&&ef.process,dn=function(){try{var H=zr&&zr.require&&zr.require("util").types;return H||za&&za.binding&&za.binding("util")}catch{}}(),nf=dn&&dn.isArrayBuffer,rf=dn&&dn.isDate,of=dn&&dn.isMap,sf=dn&&dn.isRegExp,af=dn&&dn.isSet,uf=dn&&dn.isTypedArray;function en(H,le,ie){switch(ie.length){case 0:return H.call(le);case 1:return H.call(le,ie[0]);case 2:return H.call(le,ie[0],ie[1]);case 3:return H.call(le,ie[0],ie[1],ie[2])}return H.apply(le,ie)}function pm(H,le,ie,Le){for(var Fe=-1,nt=H==null?0:H.length;++Fe<nt;){var St=H[Fe];le(Le,St,ie(St),H)}return Le}function pn(H,le){for(var ie=-1,Le=H==null?0:H.length;++ie<Le&&le(H[ie],ie,H)!==!1;);return H}function gm(H,le){for(var ie=H==null?0:H.length;ie--&&le(H[ie],ie,H)!==!1;);return H}function lf(H,le){for(var ie=-1,Le=H==null?0:H.length;++ie<Le;)if(!le(H[ie],ie,H))return!1;return!0}function Sr(H,le){for(var ie=-1,Le=H==null?0:H.length,Fe=0,nt=[];++ie<Le;){var St=H[ie];le(St,ie,H)&&(nt[Fe++]=St)}return nt}function ls(H,le){var ie=H==null?0:H.length;return!!ie&&mi(H,le,0)>-1}function qa(H,le,ie){for(var Le=-1,Fe=H==null?0:H.length;++Le<Fe;)if(ie(le,H[Le]))return!0;return!1}function pt(H,le){for(var ie=-1,Le=H==null?0:H.length,Fe=Array(Le);++ie<Le;)Fe[ie]=le(H[ie],ie,H);return Fe}function Cr(H,le){for(var ie=-1,Le=le.length,Fe=H.length;++ie<Le;)H[Fe+ie]=le[ie];return H}function Ha(H,le,ie,Le){var Fe=-1,nt=H==null?0:H.length;for(Le&&nt&&(ie=H[++Fe]);++Fe<nt;)ie=le(ie,H[Fe],Fe,H);return ie}function mm(H,le,ie,Le){var Fe=H==null?0:H.length;for(Le&&Fe&&(ie=H[--Fe]);Fe--;)ie=le(ie,H[Fe],Fe,H);return ie}function Ga(H,le){for(var ie=-1,Le=H==null?0:H.length;++ie<Le;)if(le(H[ie],ie,H))return!0;return!1}var vm=Va("length");function ym(H){return H.split("")}function _m(H){return H.match(La)||[]}function cf(H,le,ie){var Le;return ie(H,function(Fe,nt,St){if(le(Fe,nt,St))return Le=nt,!1}),Le}function cs(H,le,ie,Le){for(var Fe=H.length,nt=ie+(Le?1:-1);Le?nt--:++nt<Fe;)if(le(H[nt],nt,H))return nt;return-1}function mi(H,le,ie){return le===le?Rm(H,le,ie):cs(H,ff,ie)}function wm(H,le,ie,Le){for(var Fe=ie-1,nt=H.length;++Fe<nt;)if(Le(H[Fe],le))return Fe;return-1}function ff(H){return H!==H}function hf(H,le){var ie=H==null?0:H.length;return ie?Ka(H,le)/ie:h}function Va(H){return function(le){return le==null?r:le[H]}}function Za(H){return function(le){return H==null?r:H[le]}}function df(H,le,ie,Le,Fe){return Fe(H,function(nt,St,lt){ie=Le?(Le=!1,nt):le(ie,nt,St,lt)}),ie}function bm(H,le){var ie=H.length;for(H.sort(le);ie--;)H[ie]=H[ie].value;return H}function Ka(H,le){for(var ie,Le=-1,Fe=H.length;++Le<Fe;){var nt=le(H[Le]);nt!==r&&(ie=ie===r?nt:ie+nt)}return ie}function Qa(H,le){for(var ie=-1,Le=Array(H);++ie<H;)Le[ie]=le(ie);return Le}function xm(H,le){return pt(le,function(ie){return[ie,H[ie]]})}function pf(H){return H&&H.slice(0,yf(H)+1).replace(mr,"")}function tn(H){return function(le){return H(le)}}function Ja(H,le){return pt(le,function(ie){return H[ie]})}function io(H,le){return H.has(le)}function gf(H,le){for(var ie=-1,Le=H.length;++ie<Le&&mi(le,H[ie],0)>-1;);return ie}function mf(H,le){for(var ie=H.length;ie--&&mi(le,H[ie],0)>-1;);return ie}function Sm(H,le){for(var ie=H.length,Le=0;ie--;)H[ie]===le&&++Le;return Le}var Cm=Za(am),Am=Za(um);function Dm(H){return"\\"+cm[H]}function Om(H,le){return H==null?r:H[le]}function vi(H){return Wn.test(H)}function Tm(H){return zn.test(H)}function Mm(H){for(var le,ie=[];!(le=H.next()).done;)ie.push(le.value);return ie}function Xa(H){var le=-1,ie=Array(H.size);return H.forEach(function(Le,Fe){ie[++le]=[Fe,Le]}),ie}function vf(H,le){return function(ie){return H(le(ie))}}function Ar(H,le){for(var ie=-1,Le=H.length,Fe=0,nt=[];++ie<Le;){var St=H[ie];(St===le||St===O)&&(H[ie]=O,nt[Fe++]=ie)}return nt}function fs(H){var le=-1,ie=Array(H.size);return H.forEach(function(Le){ie[++le]=Le}),ie}function Em(H){var le=-1,ie=Array(H.size);return H.forEach(function(Le){ie[++le]=[Le,Le]}),ie}function Rm(H,le,ie){for(var Le=ie-1,Fe=H.length;++Le<Fe;)if(H[Le]===le)return Le;return-1}function Lm(H,le,ie){for(var Le=ie+1;Le--;)if(H[Le]===le)return Le;return Le}function yi(H){return vi(H)?Im(H):vm(H)}function An(H){return vi(H)?Pm(H):ym(H)}function yf(H){for(var le=H.length;le--&&ci.test(H.charAt(le)););return le}var km=Za(lm);function Im(H){for(var le=Xt.lastIndex=0;Xt.test(H);)++le;return le}function Pm(H){return H.match(Xt)||[]}function Nm(H){return H.match(xr)||[]}var $m=function H(le){le=le==null?Lt:_i.defaults(Lt.Object(),le,_i.pick(Lt,om));var ie=le.Array,Le=le.Date,Fe=le.Error,nt=le.Function,St=le.Math,lt=le.Object,eu=le.RegExp,Bm=le.String,gn=le.TypeError,hs=ie.prototype,jm=nt.prototype,wi=lt.prototype,ds=le["__core-js_shared__"],ps=jm.toString,st=wi.hasOwnProperty,Ym=0,_f=function(){var e=/[^.]+$/.exec(ds&&ds.keys&&ds.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),gs=wi.toString,Um=ps.call(lt),Fm=Lt._,Wm=eu("^"+ps.call(st).replace(pr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ms=tf?le.Buffer:r,Dr=le.Symbol,vs=le.Uint8Array,wf=ms?ms.allocUnsafe:r,ys=vf(lt.getPrototypeOf,lt),bf=lt.create,xf=wi.propertyIsEnumerable,_s=hs.splice,Sf=Dr?Dr.isConcatSpreadable:r,oo=Dr?Dr.iterator:r,qr=Dr?Dr.toStringTag:r,ws=function(){try{var e=Kr(lt,"defineProperty");return e({},"",{}),e}catch{}}(),zm=le.clearTimeout!==Lt.clearTimeout&&le.clearTimeout,qm=Le&&Le.now!==Lt.Date.now&&Le.now,Hm=le.setTimeout!==Lt.setTimeout&&le.setTimeout,bs=St.ceil,xs=St.floor,tu=lt.getOwnPropertySymbols,Gm=ms?ms.isBuffer:r,Cf=le.isFinite,Vm=hs.join,Zm=vf(lt.keys,lt),Ct=St.max,Pt=St.min,Km=Le.now,Qm=le.parseInt,Af=St.random,Jm=hs.reverse,nu=Kr(le,"DataView"),so=Kr(le,"Map"),ru=Kr(le,"Promise"),bi=Kr(le,"Set"),ao=Kr(le,"WeakMap"),uo=Kr(lt,"create"),Ss=ao&&new ao,xi={},Xm=Qr(nu),ev=Qr(so),tv=Qr(ru),nv=Qr(bi),rv=Qr(ao),Cs=Dr?Dr.prototype:r,lo=Cs?Cs.valueOf:r,Df=Cs?Cs.toString:r;function b(e){if(yt(e)&&!We(e)&&!(e instanceof Xe)){if(e instanceof mn)return e;if(st.call(e,"__wrapped__"))return Oh(e)}return new mn(e)}var Si=function(){function e(){}return function(t){if(!gt(t))return{};if(bf)return bf(t);e.prototype=t;var o=new e;return e.prototype=r,o}}();function As(){}function mn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=r}b.templateSettings={escape:it,evaluate:It,interpolate:Sn,variable:"",imports:{_:b}},b.prototype=As.prototype,b.prototype.constructor=b,mn.prototype=Si(As.prototype),mn.prototype.constructor=mn;function Xe(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=v,this.__views__=[]}function iv(){var e=new Xe(this.__wrapped__);return e.__actions__=Gt(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Gt(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Gt(this.__views__),e}function ov(){if(this.__filtered__){var e=new Xe(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function sv(){var e=this.__wrapped__.value(),t=this.__dir__,o=We(e),a=t<0,y=o?e.length:0,S=yy(0,y,this.__views__),k=S.start,U=S.end,G=U-k,ge=a?U:k-1,me=this.__iteratees__,we=me.length,Te=0,Pe=Pt(G,this.__takeCount__);if(!o||!a&&y==G&&Pe==G)return Kf(e,this.__actions__);var Be=[];e:for(;G--&&Te<Pe;){ge+=t;for(var qe=-1,je=e[ge];++qe<we;){var Qe=me[qe],tt=Qe.iteratee,on=Qe.type,Ft=tt(je);if(on==L)je=Ft;else if(!Ft){if(on==Y)continue e;break e}}Be[Te++]=je}return Be}Xe.prototype=Si(As.prototype),Xe.prototype.constructor=Xe;function Hr(e){var t=-1,o=e==null?0:e.length;for(this.clear();++t<o;){var a=e[t];this.set(a[0],a[1])}}function av(){this.__data__=uo?uo(null):{},this.size=0}function uv(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function lv(e){var t=this.__data__;if(uo){var o=t[e];return o===x?r:o}return st.call(t,e)?t[e]:r}function cv(e){var t=this.__data__;return uo?t[e]!==r:st.call(t,e)}function fv(e,t){var o=this.__data__;return this.size+=this.has(e)?0:1,o[e]=uo&&t===r?x:t,this}Hr.prototype.clear=av,Hr.prototype.delete=uv,Hr.prototype.get=lv,Hr.prototype.has=cv,Hr.prototype.set=fv;function qn(e){var t=-1,o=e==null?0:e.length;for(this.clear();++t<o;){var a=e[t];this.set(a[0],a[1])}}function hv(){this.__data__=[],this.size=0}function dv(e){var t=this.__data__,o=Ds(t,e);if(o<0)return!1;var a=t.length-1;return o==a?t.pop():_s.call(t,o,1),--this.size,!0}function pv(e){var t=this.__data__,o=Ds(t,e);return o<0?r:t[o][1]}function gv(e){return Ds(this.__data__,e)>-1}function mv(e,t){var o=this.__data__,a=Ds(o,e);return a<0?(++this.size,o.push([e,t])):o[a][1]=t,this}qn.prototype.clear=hv,qn.prototype.delete=dv,qn.prototype.get=pv,qn.prototype.has=gv,qn.prototype.set=mv;function Hn(e){var t=-1,o=e==null?0:e.length;for(this.clear();++t<o;){var a=e[t];this.set(a[0],a[1])}}function vv(){this.size=0,this.__data__={hash:new Hr,map:new(so||qn),string:new Hr}}function yv(e){var t=Bs(this,e).delete(e);return this.size-=t?1:0,t}function _v(e){return Bs(this,e).get(e)}function wv(e){return Bs(this,e).has(e)}function bv(e,t){var o=Bs(this,e),a=o.size;return o.set(e,t),this.size+=o.size==a?0:1,this}Hn.prototype.clear=vv,Hn.prototype.delete=yv,Hn.prototype.get=_v,Hn.prototype.has=wv,Hn.prototype.set=bv;function Gr(e){var t=-1,o=e==null?0:e.length;for(this.__data__=new Hn;++t<o;)this.add(e[t])}function xv(e){return this.__data__.set(e,x),this}function Sv(e){return this.__data__.has(e)}Gr.prototype.add=Gr.prototype.push=xv,Gr.prototype.has=Sv;function Dn(e){var t=this.__data__=new qn(e);this.size=t.size}function Cv(){this.__data__=new qn,this.size=0}function Av(e){var t=this.__data__,o=t.delete(e);return this.size=t.size,o}function Dv(e){return this.__data__.get(e)}function Ov(e){return this.__data__.has(e)}function Tv(e,t){var o=this.__data__;if(o instanceof qn){var a=o.__data__;if(!so||a.length<l-1)return a.push([e,t]),this.size=++o.size,this;o=this.__data__=new Hn(a)}return o.set(e,t),this.size=o.size,this}Dn.prototype.clear=Cv,Dn.prototype.delete=Av,Dn.prototype.get=Dv,Dn.prototype.has=Ov,Dn.prototype.set=Tv;function Of(e,t){var o=We(e),a=!o&&Jr(e),y=!o&&!a&&Rr(e),S=!o&&!a&&!y&&Oi(e),k=o||a||y||S,U=k?Qa(e.length,Bm):[],G=U.length;for(var ge in e)(t||st.call(e,ge))&&!(k&&(ge=="length"||y&&(ge=="offset"||ge=="parent")||S&&(ge=="buffer"||ge=="byteLength"||ge=="byteOffset")||Kn(ge,G)))&&U.push(ge);return U}function Tf(e){var t=e.length;return t?e[pu(0,t-1)]:r}function Mv(e,t){return js(Gt(e),Vr(t,0,e.length))}function Ev(e){return js(Gt(e))}function iu(e,t,o){(o!==r&&!On(e[t],o)||o===r&&!(t in e))&&Gn(e,t,o)}function co(e,t,o){var a=e[t];(!(st.call(e,t)&&On(a,o))||o===r&&!(t in e))&&Gn(e,t,o)}function Ds(e,t){for(var o=e.length;o--;)if(On(e[o][0],t))return o;return-1}function Rv(e,t,o,a){return Or(e,function(y,S,k){t(a,y,o(y),k)}),a}function Mf(e,t){return e&&kn(t,Ot(t),e)}function Lv(e,t){return e&&kn(t,Zt(t),e)}function Gn(e,t,o){t=="__proto__"&&ws?ws(e,t,{configurable:!0,enumerable:!0,value:o,writable:!0}):e[t]=o}function ou(e,t){for(var o=-1,a=t.length,y=ie(a),S=e==null;++o<a;)y[o]=S?r:ju(e,t[o]);return y}function Vr(e,t,o){return e===e&&(o!==r&&(e=e<=o?e:o),t!==r&&(e=e>=t?e:t)),e}function vn(e,t,o,a,y,S){var k,U=t&R,G=t&N,ge=t&E;if(o&&(k=y?o(e,a,y,S):o(e)),k!==r)return k;if(!gt(e))return e;var me=We(e);if(me){if(k=wy(e),!U)return Gt(e,k)}else{var we=Nt(e),Te=we==P||we==q;if(Rr(e))return Xf(e,U);if(we==Oe||we==ae||Te&&!y){if(k=G||Te?{}:yh(e),!U)return G?ly(e,Lv(k,e)):uy(e,Mf(k,e))}else{if(!ct[we])return y?e:{};k=by(e,we,U)}}S||(S=new Dn);var Pe=S.get(e);if(Pe)return Pe;S.set(e,k),Gh(e)?e.forEach(function(je){k.add(vn(je,t,o,je,e,S))}):qh(e)&&e.forEach(function(je,Qe){k.set(Qe,vn(je,t,o,Qe,e,S))});var Be=ge?G?Au:Cu:G?Zt:Ot,qe=me?r:Be(e);return pn(qe||e,function(je,Qe){qe&&(Qe=je,je=e[Qe]),co(k,Qe,vn(je,t,o,Qe,e,S))}),k}function kv(e){var t=Ot(e);return function(o){return Ef(o,e,t)}}function Ef(e,t,o){var a=o.length;if(e==null)return!a;for(e=lt(e);a--;){var y=o[a],S=t[y],k=e[y];if(k===r&&!(y in e)||!S(k))return!1}return!0}function Rf(e,t,o){if(typeof e!="function")throw new gn(m);return yo(function(){e.apply(r,o)},t)}function fo(e,t,o,a){var y=-1,S=ls,k=!0,U=e.length,G=[],ge=t.length;if(!U)return G;o&&(t=pt(t,tn(o))),a?(S=qa,k=!1):t.length>=l&&(S=io,k=!1,t=new Gr(t));e:for(;++y<U;){var me=e[y],we=o==null?me:o(me);if(me=a||me!==0?me:0,k&&we===we){for(var Te=ge;Te--;)if(t[Te]===we)continue e;G.push(me)}else S(t,we,a)||G.push(me)}return G}var Or=ih(Ln),Lf=ih(au,!0);function Iv(e,t){var o=!0;return Or(e,function(a,y,S){return o=!!t(a,y,S),o}),o}function Os(e,t,o){for(var a=-1,y=e.length;++a<y;){var S=e[a],k=t(S);if(k!=null&&(U===r?k===k&&!rn(k):o(k,U)))var U=k,G=S}return G}function Pv(e,t,o,a){var y=e.length;for(o=ze(o),o<0&&(o=-o>y?0:y+o),a=a===r||a>y?y:ze(a),a<0&&(a+=y),a=o>a?0:Zh(a);o<a;)e[o++]=t;return e}function kf(e,t){var o=[];return Or(e,function(a,y,S){t(a,y,S)&&o.push(a)}),o}function kt(e,t,o,a,y){var S=-1,k=e.length;for(o||(o=Sy),y||(y=[]);++S<k;){var U=e[S];t>0&&o(U)?t>1?kt(U,t-1,o,a,y):Cr(y,U):a||(y[y.length]=U)}return y}var su=oh(),If=oh(!0);function Ln(e,t){return e&&su(e,t,Ot)}function au(e,t){return e&&If(e,t,Ot)}function Ts(e,t){return Sr(t,function(o){return Qn(e[o])})}function Zr(e,t){t=Mr(t,e);for(var o=0,a=t.length;e!=null&&o<a;)e=e[In(t[o++])];return o&&o==a?e:r}function Pf(e,t,o){var a=t(e);return We(e)?a:Cr(a,o(e))}function Yt(e){return e==null?e===r?xe:se:qr&&qr in lt(e)?vy(e):Ey(e)}function uu(e,t){return e>t}function Nv(e,t){return e!=null&&st.call(e,t)}function $v(e,t){return e!=null&&t in lt(e)}function Bv(e,t,o){return e>=Pt(t,o)&&e<Ct(t,o)}function lu(e,t,o){for(var a=o?qa:ls,y=e[0].length,S=e.length,k=S,U=ie(S),G=1/0,ge=[];k--;){var me=e[k];k&&t&&(me=pt(me,tn(t))),G=Pt(me.length,G),U[k]=!o&&(t||y>=120&&me.length>=120)?new Gr(k&&me):r}me=e[0];var we=-1,Te=U[0];e:for(;++we<y&&ge.length<G;){var Pe=me[we],Be=t?t(Pe):Pe;if(Pe=o||Pe!==0?Pe:0,!(Te?io(Te,Be):a(ge,Be,o))){for(k=S;--k;){var qe=U[k];if(!(qe?io(qe,Be):a(e[k],Be,o)))continue e}Te&&Te.push(Be),ge.push(Pe)}}return ge}function jv(e,t,o,a){return Ln(e,function(y,S,k){t(a,o(y),S,k)}),a}function ho(e,t,o){t=Mr(t,e),e=xh(e,t);var a=e==null?e:e[In(_n(t))];return a==null?r:en(a,e,o)}function Nf(e){return yt(e)&&Yt(e)==ae}function Yv(e){return yt(e)&&Yt(e)==Ce}function Uv(e){return yt(e)&&Yt(e)==he}function po(e,t,o,a,y){return e===t?!0:e==null||t==null||!yt(e)&&!yt(t)?e!==e&&t!==t:Fv(e,t,o,a,po,y)}function Fv(e,t,o,a,y,S){var k=We(e),U=We(t),G=k?fe:Nt(e),ge=U?fe:Nt(t);G=G==ae?Oe:G,ge=ge==ae?Oe:ge;var me=G==Oe,we=ge==Oe,Te=G==ge;if(Te&&Rr(e)){if(!Rr(t))return!1;k=!0,me=!1}if(Te&&!me)return S||(S=new Dn),k||Oi(e)?gh(e,t,o,a,y,S):gy(e,t,G,o,a,y,S);if(!(o&I)){var Pe=me&&st.call(e,"__wrapped__"),Be=we&&st.call(t,"__wrapped__");if(Pe||Be){var qe=Pe?e.value():e,je=Be?t.value():t;return S||(S=new Dn),y(qe,je,o,a,S)}}return Te?(S||(S=new Dn),my(e,t,o,a,y,S)):!1}function Wv(e){return yt(e)&&Nt(e)==F}function cu(e,t,o,a){var y=o.length,S=y,k=!a;if(e==null)return!S;for(e=lt(e);y--;){var U=o[y];if(k&&U[2]?U[1]!==e[U[0]]:!(U[0]in e))return!1}for(;++y<S;){U=o[y];var G=U[0],ge=e[G],me=U[1];if(k&&U[2]){if(ge===r&&!(G in e))return!1}else{var we=new Dn;if(a)var Te=a(ge,me,G,e,t,we);if(!(Te===r?po(me,ge,I|$,a,we):Te))return!1}}return!0}function $f(e){if(!gt(e)||Ay(e))return!1;var t=Qn(e)?Wm:Yn;return t.test(Qr(e))}function zv(e){return yt(e)&&Yt(e)==_}function qv(e){return yt(e)&&Nt(e)==M}function Hv(e){return yt(e)&&qs(e.length)&&!!ft[Yt(e)]}function Bf(e){return typeof e=="function"?e:e==null?Kt:typeof e=="object"?We(e)?Uf(e[0],e[1]):Yf(e):sd(e)}function fu(e){if(!vo(e))return Zm(e);var t=[];for(var o in lt(e))st.call(e,o)&&o!="constructor"&&t.push(o);return t}function Gv(e){if(!gt(e))return My(e);var t=vo(e),o=[];for(var a in e)a=="constructor"&&(t||!st.call(e,a))||o.push(a);return o}function hu(e,t){return e<t}function jf(e,t){var o=-1,a=Vt(e)?ie(e.length):[];return Or(e,function(y,S,k){a[++o]=t(y,S,k)}),a}function Yf(e){var t=Ou(e);return t.length==1&&t[0][2]?wh(t[0][0],t[0][1]):function(o){return o===e||cu(o,e,t)}}function Uf(e,t){return Mu(e)&&_h(t)?wh(In(e),t):function(o){var a=ju(o,e);return a===r&&a===t?Yu(o,e):po(t,a,I|$)}}function Ms(e,t,o,a,y){e!==t&&su(t,function(S,k){if(y||(y=new Dn),gt(S))Vv(e,t,k,o,Ms,a,y);else{var U=a?a(Ru(e,k),S,k+"",e,t,y):r;U===r&&(U=S),iu(e,k,U)}},Zt)}function Vv(e,t,o,a,y,S,k){var U=Ru(e,o),G=Ru(t,o),ge=k.get(G);if(ge){iu(e,o,ge);return}var me=S?S(U,G,o+"",e,t,k):r,we=me===r;if(we){var Te=We(G),Pe=!Te&&Rr(G),Be=!Te&&!Pe&&Oi(G);me=G,Te||Pe||Be?We(U)?me=U:_t(U)?me=Gt(U):Pe?(we=!1,me=Xf(G,!0)):Be?(we=!1,me=eh(G,!0)):me=[]:_o(G)||Jr(G)?(me=U,Jr(U)?me=Kh(U):(!gt(U)||Qn(U))&&(me=yh(G))):we=!1}we&&(k.set(G,me),y(me,G,a,S,k),k.delete(G)),iu(e,o,me)}function Ff(e,t){var o=e.length;if(o)return t+=t<0?o:0,Kn(t,o)?e[t]:r}function Wf(e,t,o){t.length?t=pt(t,function(S){return We(S)?function(k){return Zr(k,S.length===1?S[0]:S)}:S}):t=[Kt];var a=-1;t=pt(t,tn($e()));var y=jf(e,function(S,k,U){var G=pt(t,function(ge){return ge(S)});return{criteria:G,index:++a,value:S}});return bm(y,function(S,k){return ay(S,k,o)})}function Zv(e,t){return zf(e,t,function(o,a){return Yu(e,a)})}function zf(e,t,o){for(var a=-1,y=t.length,S={};++a<y;){var k=t[a],U=Zr(e,k);o(U,k)&&go(S,Mr(k,e),U)}return S}function Kv(e){return function(t){return Zr(t,e)}}function du(e,t,o,a){var y=a?wm:mi,S=-1,k=t.length,U=e;for(e===t&&(t=Gt(t)),o&&(U=pt(e,tn(o)));++S<k;)for(var G=0,ge=t[S],me=o?o(ge):ge;(G=y(U,me,G,a))>-1;)U!==e&&_s.call(U,G,1),_s.call(e,G,1);return e}function qf(e,t){for(var o=e?t.length:0,a=o-1;o--;){var y=t[o];if(o==a||y!==S){var S=y;Kn(y)?_s.call(e,y,1):vu(e,y)}}return e}function pu(e,t){return e+xs(Af()*(t-e+1))}function Qv(e,t,o,a){for(var y=-1,S=Ct(bs((t-e)/(o||1)),0),k=ie(S);S--;)k[a?S:++y]=e,e+=o;return k}function gu(e,t){var o="";if(!e||t<1||t>p)return o;do t%2&&(o+=e),t=xs(t/2),t&&(e+=e);while(t);return o}function He(e,t){return Lu(bh(e,t,Kt),e+"")}function Jv(e){return Tf(Ti(e))}function Xv(e,t){var o=Ti(e);return js(o,Vr(t,0,o.length))}function go(e,t,o,a){if(!gt(e))return e;t=Mr(t,e);for(var y=-1,S=t.length,k=S-1,U=e;U!=null&&++y<S;){var G=In(t[y]),ge=o;if(G==="__proto__"||G==="constructor"||G==="prototype")return e;if(y!=k){var me=U[G];ge=a?a(me,G,U):r,ge===r&&(ge=gt(me)?me:Kn(t[y+1])?[]:{})}co(U,G,ge),U=U[G]}return e}var Hf=Ss?function(e,t){return Ss.set(e,t),e}:Kt,ey=ws?function(e,t){return ws(e,"toString",{configurable:!0,enumerable:!1,value:Fu(t),writable:!0})}:Kt;function ty(e){return js(Ti(e))}function yn(e,t,o){var a=-1,y=e.length;t<0&&(t=-t>y?0:y+t),o=o>y?y:o,o<0&&(o+=y),y=t>o?0:o-t>>>0,t>>>=0;for(var S=ie(y);++a<y;)S[a]=e[a+t];return S}function ny(e,t){var o;return Or(e,function(a,y,S){return o=t(a,y,S),!o}),!!o}function Es(e,t,o){var a=0,y=e==null?a:e.length;if(typeof t=="number"&&t===t&&y<=z){for(;a<y;){var S=a+y>>>1,k=e[S];k!==null&&!rn(k)&&(o?k<=t:k<t)?a=S+1:y=S}return y}return mu(e,t,Kt,o)}function mu(e,t,o,a){var y=0,S=e==null?0:e.length;if(S===0)return 0;t=o(t);for(var k=t!==t,U=t===null,G=rn(t),ge=t===r;y<S;){var me=xs((y+S)/2),we=o(e[me]),Te=we!==r,Pe=we===null,Be=we===we,qe=rn(we);if(k)var je=a||Be;else ge?je=Be&&(a||Te):U?je=Be&&Te&&(a||!Pe):G?je=Be&&Te&&!Pe&&(a||!qe):Pe||qe?je=!1:je=a?we<=t:we<t;je?y=me+1:S=me}return Pt(S,D)}function Gf(e,t){for(var o=-1,a=e.length,y=0,S=[];++o<a;){var k=e[o],U=t?t(k):k;if(!o||!On(U,G)){var G=U;S[y++]=k===0?0:k}}return S}function Vf(e){return typeof e=="number"?e:rn(e)?h:+e}function nn(e){if(typeof e=="string")return e;if(We(e))return pt(e,nn)+"";if(rn(e))return Df?Df.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Tr(e,t,o){var a=-1,y=ls,S=e.length,k=!0,U=[],G=U;if(o)k=!1,y=qa;else if(S>=l){var ge=t?null:dy(e);if(ge)return fs(ge);k=!1,y=io,G=new Gr}else G=t?[]:U;e:for(;++a<S;){var me=e[a],we=t?t(me):me;if(me=o||me!==0?me:0,k&&we===we){for(var Te=G.length;Te--;)if(G[Te]===we)continue e;t&&G.push(we),U.push(me)}else y(G,we,o)||(G!==U&&G.push(we),U.push(me))}return U}function vu(e,t){return t=Mr(t,e),e=xh(e,t),e==null||delete e[In(_n(t))]}function Zf(e,t,o,a){return go(e,t,o(Zr(e,t)),a)}function Rs(e,t,o,a){for(var y=e.length,S=a?y:-1;(a?S--:++S<y)&&t(e[S],S,e););return o?yn(e,a?0:S,a?S+1:y):yn(e,a?S+1:0,a?y:S)}function Kf(e,t){var o=e;return o instanceof Xe&&(o=o.value()),Ha(t,function(a,y){return y.func.apply(y.thisArg,Cr([a],y.args))},o)}function yu(e,t,o){var a=e.length;if(a<2)return a?Tr(e[0]):[];for(var y=-1,S=ie(a);++y<a;)for(var k=e[y],U=-1;++U<a;)U!=y&&(S[y]=fo(S[y]||k,e[U],t,o));return Tr(kt(S,1),t,o)}function Qf(e,t,o){for(var a=-1,y=e.length,S=t.length,k={};++a<y;){var U=a<S?t[a]:r;o(k,e[a],U)}return k}function _u(e){return _t(e)?e:[]}function wu(e){return typeof e=="function"?e:Kt}function Mr(e,t){return We(e)?e:Mu(e,t)?[e]:Dh(ot(e))}var ry=He;function Er(e,t,o){var a=e.length;return o=o===r?a:o,!t&&o>=a?e:yn(e,t,o)}var Jf=zm||function(e){return Lt.clearTimeout(e)};function Xf(e,t){if(t)return e.slice();var o=e.length,a=wf?wf(o):new e.constructor(o);return e.copy(a),a}function bu(e){var t=new e.constructor(e.byteLength);return new vs(t).set(new vs(e)),t}function iy(e,t){var o=t?bu(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.byteLength)}function oy(e){var t=new e.constructor(e.source,Vi.exec(e));return t.lastIndex=e.lastIndex,t}function sy(e){return lo?lt(lo.call(e)):{}}function eh(e,t){var o=t?bu(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.length)}function th(e,t){if(e!==t){var o=e!==r,a=e===null,y=e===e,S=rn(e),k=t!==r,U=t===null,G=t===t,ge=rn(t);if(!U&&!ge&&!S&&e>t||S&&k&&G&&!U&&!ge||a&&k&&G||!o&&G||!y)return 1;if(!a&&!S&&!ge&&e<t||ge&&o&&y&&!a&&!S||U&&o&&y||!k&&y||!G)return-1}return 0}function ay(e,t,o){for(var a=-1,y=e.criteria,S=t.criteria,k=y.length,U=o.length;++a<k;){var G=th(y[a],S[a]);if(G){if(a>=U)return G;var ge=o[a];return G*(ge=="desc"?-1:1)}}return e.index-t.index}function nh(e,t,o,a){for(var y=-1,S=e.length,k=o.length,U=-1,G=t.length,ge=Ct(S-k,0),me=ie(G+ge),we=!a;++U<G;)me[U]=t[U];for(;++y<k;)(we||y<S)&&(me[o[y]]=e[y]);for(;ge--;)me[U++]=e[y++];return me}function rh(e,t,o,a){for(var y=-1,S=e.length,k=-1,U=o.length,G=-1,ge=t.length,me=Ct(S-U,0),we=ie(me+ge),Te=!a;++y<me;)we[y]=e[y];for(var Pe=y;++G<ge;)we[Pe+G]=t[G];for(;++k<U;)(Te||y<S)&&(we[Pe+o[k]]=e[y++]);return we}function Gt(e,t){var o=-1,a=e.length;for(t||(t=ie(a));++o<a;)t[o]=e[o];return t}function kn(e,t,o,a){var y=!o;o||(o={});for(var S=-1,k=t.length;++S<k;){var U=t[S],G=a?a(o[U],e[U],U,o,e):r;G===r&&(G=e[U]),y?Gn(o,U,G):co(o,U,G)}return o}function uy(e,t){return kn(e,Tu(e),t)}function ly(e,t){return kn(e,mh(e),t)}function Ls(e,t){return function(o,a){var y=We(o)?pm:Rv,S=t?t():{};return y(o,e,$e(a,2),S)}}function Ci(e){return He(function(t,o){var a=-1,y=o.length,S=y>1?o[y-1]:r,k=y>2?o[2]:r;for(S=e.length>3&&typeof S=="function"?(y--,S):r,k&&Ut(o[0],o[1],k)&&(S=y<3?r:S,y=1),t=lt(t);++a<y;){var U=o[a];U&&e(t,U,a,S)}return t})}function ih(e,t){return function(o,a){if(o==null)return o;if(!Vt(o))return e(o,a);for(var y=o.length,S=t?y:-1,k=lt(o);(t?S--:++S<y)&&a(k[S],S,k)!==!1;);return o}}function oh(e){return function(t,o,a){for(var y=-1,S=lt(t),k=a(t),U=k.length;U--;){var G=k[e?U:++y];if(o(S[G],G,S)===!1)break}return t}}function cy(e,t,o){var a=t&j,y=mo(e);function S(){var k=this&&this!==Lt&&this instanceof S?y:e;return k.apply(a?o:this,arguments)}return S}function sh(e){return function(t){t=ot(t);var o=vi(t)?An(t):r,a=o?o[0]:t.charAt(0),y=o?Er(o,1).join(""):t.slice(1);return a[e]()+y}}function Ai(e){return function(t){return Ha(id(rd(t).replace(br,"")),e,"")}}function mo(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var o=Si(e.prototype),a=e.apply(o,t);return gt(a)?a:o}}function fy(e,t,o){var a=mo(e);function y(){for(var S=arguments.length,k=ie(S),U=S,G=Di(y);U--;)k[U]=arguments[U];var ge=S<3&&k[0]!==G&&k[S-1]!==G?[]:Ar(k,G);if(S-=ge.length,S<o)return fh(e,t,ks,y.placeholder,r,k,ge,r,r,o-S);var me=this&&this!==Lt&&this instanceof y?a:e;return en(me,this,k)}return y}function ah(e){return function(t,o,a){var y=lt(t);if(!Vt(t)){var S=$e(o,3);t=Ot(t),o=function(U){return S(y[U],U,y)}}var k=e(t,o,a);return k>-1?y[S?t[k]:k]:r}}function uh(e){return Zn(function(t){var o=t.length,a=o,y=mn.prototype.thru;for(e&&t.reverse();a--;){var S=t[a];if(typeof S!="function")throw new gn(m);if(y&&!k&&$s(S)=="wrapper")var k=new mn([],!0)}for(a=k?a:o;++a<o;){S=t[a];var U=$s(S),G=U=="wrapper"?Du(S):r;G&&Eu(G[0])&&G[1]==(oe|ne|V|ee)&&!G[4].length&&G[9]==1?k=k[$s(G[0])].apply(k,G[3]):k=S.length==1&&Eu(S)?k[U]():k.thru(S)}return function(){var ge=arguments,me=ge[0];if(k&&ge.length==1&&We(me))return k.plant(me).value();for(var we=0,Te=o?t[we].apply(this,ge):me;++we<o;)Te=t[we].call(this,Te);return Te}})}function ks(e,t,o,a,y,S,k,U,G,ge){var me=t&oe,we=t&j,Te=t&X,Pe=t&(ne|ue),Be=t&de,qe=Te?r:mo(e);function je(){for(var Qe=arguments.length,tt=ie(Qe),on=Qe;on--;)tt[on]=arguments[on];if(Pe)var Ft=Di(je),sn=Sm(tt,Ft);if(a&&(tt=nh(tt,a,y,Pe)),S&&(tt=rh(tt,S,k,Pe)),Qe-=sn,Pe&&Qe<ge){var wt=Ar(tt,Ft);return fh(e,t,ks,je.placeholder,o,tt,wt,U,G,ge-Qe)}var Tn=we?o:this,Xn=Te?Tn[e]:e;return Qe=tt.length,U?tt=Ry(tt,U):Be&&Qe>1&&tt.reverse(),me&&G<Qe&&(tt.length=G),this&&this!==Lt&&this instanceof je&&(Xn=qe||mo(Xn)),Xn.apply(Tn,tt)}return je}function lh(e,t){return function(o,a){return jv(o,e,t(a),{})}}function Is(e,t){return function(o,a){var y;if(o===r&&a===r)return t;if(o!==r&&(y=o),a!==r){if(y===r)return a;typeof o=="string"||typeof a=="string"?(o=nn(o),a=nn(a)):(o=Vf(o),a=Vf(a)),y=e(o,a)}return y}}function xu(e){return Zn(function(t){return t=pt(t,tn($e())),He(function(o){var a=this;return e(t,function(y){return en(y,a,o)})})})}function Ps(e,t){t=t===r?" ":nn(t);var o=t.length;if(o<2)return o?gu(t,e):t;var a=gu(t,bs(e/yi(t)));return vi(t)?Er(An(a),0,e).join(""):a.slice(0,e)}function hy(e,t,o,a){var y=t&j,S=mo(e);function k(){for(var U=-1,G=arguments.length,ge=-1,me=a.length,we=ie(me+G),Te=this&&this!==Lt&&this instanceof k?S:e;++ge<me;)we[ge]=a[ge];for(;G--;)we[ge++]=arguments[++U];return en(Te,y?o:this,we)}return k}function ch(e){return function(t,o,a){return a&&typeof a!="number"&&Ut(t,o,a)&&(o=a=r),t=Jn(t),o===r?(o=t,t=0):o=Jn(o),a=a===r?t<o?1:-1:Jn(a),Qv(t,o,a,e)}}function Ns(e){return function(t,o){return typeof t=="string"&&typeof o=="string"||(t=wn(t),o=wn(o)),e(t,o)}}function fh(e,t,o,a,y,S,k,U,G,ge){var me=t&ne,we=me?k:r,Te=me?r:k,Pe=me?S:r,Be=me?r:S;t|=me?V:ce,t&=~(me?ce:V),t&te||(t&=-4);var qe=[e,t,y,Pe,we,Be,Te,U,G,ge],je=o.apply(r,qe);return Eu(e)&&Sh(je,qe),je.placeholder=a,Ch(je,e,t)}function Su(e){var t=St[e];return function(o,a){if(o=wn(o),a=a==null?0:Pt(ze(a),292),a&&Cf(o)){var y=(ot(o)+"e").split("e"),S=t(y[0]+"e"+(+y[1]+a));return y=(ot(S)+"e").split("e"),+(y[0]+"e"+(+y[1]-a))}return t(o)}}var dy=bi&&1/fs(new bi([,-0]))[1]==g?function(e){return new bi(e)}:qu;function hh(e){return function(t){var o=Nt(t);return o==F?Xa(t):o==M?Em(t):xm(t,e(t))}}function Vn(e,t,o,a,y,S,k,U){var G=t&X;if(!G&&typeof e!="function")throw new gn(m);var ge=a?a.length:0;if(ge||(t&=-97,a=y=r),k=k===r?k:Ct(ze(k),0),U=U===r?U:ze(U),ge-=y?y.length:0,t&ce){var me=a,we=y;a=y=r}var Te=G?r:Du(e),Pe=[e,t,o,a,y,me,we,S,k,U];if(Te&&Ty(Pe,Te),e=Pe[0],t=Pe[1],o=Pe[2],a=Pe[3],y=Pe[4],U=Pe[9]=Pe[9]===r?G?0:e.length:Ct(Pe[9]-ge,0),!U&&t&(ne|ue)&&(t&=-25),!t||t==j)var Be=cy(e,t,o);else t==ne||t==ue?Be=fy(e,t,U):(t==V||t==(j|V))&&!y.length?Be=hy(e,t,o,a):Be=ks.apply(r,Pe);var qe=Te?Hf:Sh;return Ch(qe(Be,Pe),e,t)}function dh(e,t,o,a){return e===r||On(e,wi[o])&&!st.call(a,o)?t:e}function ph(e,t,o,a,y,S){return gt(e)&&gt(t)&&(S.set(t,e),Ms(e,t,r,ph,S),S.delete(t)),e}function py(e){return _o(e)?r:e}function gh(e,t,o,a,y,S){var k=o&I,U=e.length,G=t.length;if(U!=G&&!(k&&G>U))return!1;var ge=S.get(e),me=S.get(t);if(ge&&me)return ge==t&&me==e;var we=-1,Te=!0,Pe=o&$?new Gr:r;for(S.set(e,t),S.set(t,e);++we<U;){var Be=e[we],qe=t[we];if(a)var je=k?a(qe,Be,we,t,e,S):a(Be,qe,we,e,t,S);if(je!==r){if(je)continue;Te=!1;break}if(Pe){if(!Ga(t,function(Qe,tt){if(!io(Pe,tt)&&(Be===Qe||y(Be,Qe,o,a,S)))return Pe.push(tt)})){Te=!1;break}}else if(!(Be===qe||y(Be,qe,o,a,S))){Te=!1;break}}return S.delete(e),S.delete(t),Te}function gy(e,t,o,a,y,S,k){switch(o){case ke:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Ce:return!(e.byteLength!=t.byteLength||!S(new vs(e),new vs(t)));case J:case he:case K:return On(+e,+t);case be:return e.name==t.name&&e.message==t.message;case _:case W:return e==t+"";case F:var U=Xa;case M:var G=a&I;if(U||(U=fs),e.size!=t.size&&!G)return!1;var ge=k.get(e);if(ge)return ge==t;a|=$,k.set(e,t);var me=gh(U(e),U(t),a,y,S,k);return k.delete(e),me;case Q:if(lo)return lo.call(e)==lo.call(t)}return!1}function my(e,t,o,a,y,S){var k=o&I,U=Cu(e),G=U.length,ge=Cu(t),me=ge.length;if(G!=me&&!k)return!1;for(var we=G;we--;){var Te=U[we];if(!(k?Te in t:st.call(t,Te)))return!1}var Pe=S.get(e),Be=S.get(t);if(Pe&&Be)return Pe==t&&Be==e;var qe=!0;S.set(e,t),S.set(t,e);for(var je=k;++we<G;){Te=U[we];var Qe=e[Te],tt=t[Te];if(a)var on=k?a(tt,Qe,Te,t,e,S):a(Qe,tt,Te,e,t,S);if(!(on===r?Qe===tt||y(Qe,tt,o,a,S):on)){qe=!1;break}je||(je=Te=="constructor")}if(qe&&!je){var Ft=e.constructor,sn=t.constructor;Ft!=sn&&"constructor"in e&&"constructor"in t&&!(typeof Ft=="function"&&Ft instanceof Ft&&typeof sn=="function"&&sn instanceof sn)&&(qe=!1)}return S.delete(e),S.delete(t),qe}function Zn(e){return Lu(bh(e,r,Eh),e+"")}function Cu(e){return Pf(e,Ot,Tu)}function Au(e){return Pf(e,Zt,mh)}var Du=Ss?function(e){return Ss.get(e)}:qu;function $s(e){for(var t=e.name+"",o=xi[t],a=st.call(xi,t)?o.length:0;a--;){var y=o[a],S=y.func;if(S==null||S==e)return y.name}return t}function Di(e){var t=st.call(b,"placeholder")?b:e;return t.placeholder}function $e(){var e=b.iteratee||Wu;return e=e===Wu?Bf:e,arguments.length?e(arguments[0],arguments[1]):e}function Bs(e,t){var o=e.__data__;return Cy(t)?o[typeof t=="string"?"string":"hash"]:o.map}function Ou(e){for(var t=Ot(e),o=t.length;o--;){var a=t[o],y=e[a];t[o]=[a,y,_h(y)]}return t}function Kr(e,t){var o=Om(e,t);return $f(o)?o:r}function vy(e){var t=st.call(e,qr),o=e[qr];try{e[qr]=r;var a=!0}catch{}var y=gs.call(e);return a&&(t?e[qr]=o:delete e[qr]),y}var Tu=tu?function(e){return e==null?[]:(e=lt(e),Sr(tu(e),function(t){return xf.call(e,t)}))}:Hu,mh=tu?function(e){for(var t=[];e;)Cr(t,Tu(e)),e=ys(e);return t}:Hu,Nt=Yt;(nu&&Nt(new nu(new ArrayBuffer(1)))!=ke||so&&Nt(new so)!=F||ru&&Nt(ru.resolve())!=u||bi&&Nt(new bi)!=M||ao&&Nt(new ao)!=Me)&&(Nt=function(e){var t=Yt(e),o=t==Oe?e.constructor:r,a=o?Qr(o):"";if(a)switch(a){case Xm:return ke;case ev:return F;case tv:return u;case nv:return M;case rv:return Me}return t});function yy(e,t,o){for(var a=-1,y=o.length;++a<y;){var S=o[a],k=S.size;switch(S.type){case"drop":e+=k;break;case"dropRight":t-=k;break;case"take":t=Pt(t,e+k);break;case"takeRight":e=Ct(e,t-k);break}}return{start:e,end:t}}function _y(e){var t=e.match(hi);return t?t[1].split(Et):[]}function vh(e,t,o){t=Mr(t,e);for(var a=-1,y=t.length,S=!1;++a<y;){var k=In(t[a]);if(!(S=e!=null&&o(e,k)))break;e=e[k]}return S||++a!=y?S:(y=e==null?0:e.length,!!y&&qs(y)&&Kn(k,y)&&(We(e)||Jr(e)))}function wy(e){var t=e.length,o=new e.constructor(t);return t&&typeof e[0]=="string"&&st.call(e,"index")&&(o.index=e.index,o.input=e.input),o}function yh(e){return typeof e.constructor=="function"&&!vo(e)?Si(ys(e)):{}}function by(e,t,o){var a=e.constructor;switch(t){case Ce:return bu(e);case J:case he:return new a(+e);case ke:return iy(e,o);case Ne:case Re:case Ge:case Je:case Ve:case xt:case vt:case ut:case qt:return eh(e,o);case F:return new a;case K:case W:return new a(e);case _:return oy(e);case M:return new a;case Q:return sy(e)}}function xy(e,t){var o=t.length;if(!o)return e;var a=o-1;return t[a]=(o>1?"& ":"")+t[a],t=t.join(o>2?", ":" "),e.replace(fi,`{
124
+ */var B0=qi.exports,Hc;function j0(){return Hc||(Hc=1,function(i,n){(function(){var r,s="4.17.21",l=200,d="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",m="Expected a function",c="Invalid `variable` option passed into `_.template`",x="__lodash_hash_undefined__",C=500,O="__lodash_placeholder__",E=1,N=2,M=4,I=1,$=2,j=1,J=2,te=4,ne=8,ue=16,Z=32,le=64,oe=128,X=256,me=512,de=30,re="...",Oe=800,Ae=16,Y=1,R=2,A=3,g=1/0,p=9007199254740991,w=17976931348623157e292,h=NaN,v=4294967295,D=v-1,W=v>>>1,V=[["ary",oe],["bind",j],["bindKey",J],["curry",ne],["curryRight",ue],["flip",me],["partial",Z],["partialRight",le],["rearg",X]],ae="[object Arguments]",fe="[object Array]",we="[object AsyncFunction]",ee="[object Boolean]",he="[object Date]",De="[object DOMException]",_e="[object Error]",P="[object Function]",z="[object GeneratorFunction]",F="[object Map]",K="[object Number]",se="[object Null]",Te="[object Object]",u="[object Promise]",f="[object Proxy]",_="[object RegExp]",k="[object Set]",q="[object String]",Q="[object Symbol]",Ce="[object Undefined]",be="[object WeakMap]",Re="[object WeakSet]",Se="[object ArrayBuffer]",Le="[object DataView]",Ne="[object Float32Array]",ke="[object Float64Array]",Ge="[object Int8Array]",Je="[object Int16Array]",Ve="[object Int32Array]",xt="[object Uint8Array]",vt="[object Uint8ClampedArray]",ut="[object Uint16Array]",qt="[object Uint32Array]",Dt=/\b__p \+= '';/g,$n=/\b(__p \+=) '' \+/g,fn=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Qt=/&(?:amp|lt|gt|quot|#39);/g,xn=/[&<>"']/g,Bn=RegExp(Qt.source),En=RegExp(xn.source),it=/<%-([\s\S]+?)%>/g,It=/<%([\s\S]+?)%>/g,Sn=/<%=([\s\S]+?)%>/g,dr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,dt=/^\w*$/,Mt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,pr=/[\\^$.*+?()[\]{}|]/g,gr=RegExp(pr.source),mr=/^\s+/,ci=/\s/,fi=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,hi=/\{\n\/\* \[wrapped with (.+)\] \*/,Et=/,? & /,ka=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Rt=/[()=,{}\[\]\/\s]/,Ia=/\\(\\)?/g,Vi=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Zi=/\w*$/,Ht=/^[-+]0x[0-9a-f]+$/i,jn=/^0b[01]+$/i,Yn=/^\[object .+?Constructor\]$/,Br=/^0o[0-7]+$/i,es=/^(?:0|[1-9]\d*)$/,Pa=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,vr=/($^)/,Na=/['\n\r\u2028\u2029\\]/g,yr="\\ud800-\\udfff",jr="\\u0300-\\u036f",$a="\\ufe20-\\ufe2f",Ba="\\u20d0-\\u20ff",ts=jr+$a+Ba,Ki="\\u2700-\\u27bf",ns="a-z\\xdf-\\xf6\\xf8-\\xff",ja="\\xac\\xb1\\xd7\\xf7",Ya="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Ua="\\u2000-\\u206f",Qi=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ji="A-Z\\xc0-\\xd6\\xd8-\\xde",di="\\ufe0e\\ufe0f",Xi=ja+Ya+Ua+Qi,Un="['’]",rs="["+yr+"]",Yr="["+Xi+"]",Ur="["+ts+"]",is="\\d+",eo="["+Ki+"]",to="["+ns+"]",os="[^"+yr+Xi+is+Ki+ns+Ji+"]",no="\\ud83c[\\udffb-\\udfff]",pi="(?:"+Ur+"|"+no+")",ro="[^"+yr+"]",Rn="(?:\\ud83c[\\udde6-\\uddff]){2}",Cn="[\\ud800-\\udbff][\\udc00-\\udfff]",Fn="["+Ji+"]",_r="\\u200d",Fr="(?:"+to+"|"+os+")",gi="(?:"+Fn+"|"+os+")",ss="(?:"+Un+"(?:d|ll|m|re|s|t|ve))?",as="(?:"+Un+"(?:D|LL|M|RE|S|T|VE))?",Wr=pi+"?",us="["+di+"]?",io="(?:"+_r+"(?:"+[ro,Rn,Cn].join("|")+")"+us+Wr+")*",Fa="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Wa="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ze=us+Wr+io,Jt="(?:"+[eo,Rn,Cn].join("|")+")"+Ze,wr="(?:"+[ro+Ur+"?",Ur,Rn,Cn,rs].join("|")+")",br=RegExp(Un,"g"),hn=RegExp(Ur,"g"),Xt=RegExp(no+"(?="+no+")|"+wr+Ze,"g"),xr=RegExp([Fn+"?"+to+"+"+ss+"(?="+[Yr,Fn,"$"].join("|")+")",gi+"+"+as+"(?="+[Yr,Fn+Fr,"$"].join("|")+")",Fn+"?"+Fr+"+"+ss,Fn+"+"+as,Wa,Fa,is,Jt].join("|"),"g"),Wn=RegExp("["+_r+yr+ts+di+"]"),zn=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,om=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],sm=-1,ft={};ft[Ne]=ft[ke]=ft[Ge]=ft[Je]=ft[Ve]=ft[xt]=ft[vt]=ft[ut]=ft[qt]=!0,ft[ae]=ft[fe]=ft[Se]=ft[ee]=ft[Le]=ft[he]=ft[_e]=ft[P]=ft[F]=ft[K]=ft[Te]=ft[_]=ft[k]=ft[q]=ft[be]=!1;var ct={};ct[ae]=ct[fe]=ct[Se]=ct[Le]=ct[ee]=ct[he]=ct[Ne]=ct[ke]=ct[Ge]=ct[Je]=ct[Ve]=ct[F]=ct[K]=ct[Te]=ct[_]=ct[k]=ct[q]=ct[Q]=ct[xt]=ct[vt]=ct[ut]=ct[qt]=!0,ct[_e]=ct[P]=ct[be]=!1;var am={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},um={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},lm={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},cm={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},fm=parseFloat,hm=parseInt,ef=typeof xo=="object"&&xo&&xo.Object===Object&&xo,dm=typeof self=="object"&&self&&self.Object===Object&&self,Lt=ef||dm||Function("return this")(),za=n&&!n.nodeType&&n,zr=za&&!0&&i&&!i.nodeType&&i,tf=zr&&zr.exports===za,qa=tf&&ef.process,dn=function(){try{var H=zr&&zr.require&&zr.require("util").types;return H||qa&&qa.binding&&qa.binding("util")}catch{}}(),nf=dn&&dn.isArrayBuffer,rf=dn&&dn.isDate,of=dn&&dn.isMap,sf=dn&&dn.isRegExp,af=dn&&dn.isSet,uf=dn&&dn.isTypedArray;function en(H,ce,ie){switch(ie.length){case 0:return H.call(ce);case 1:return H.call(ce,ie[0]);case 2:return H.call(ce,ie[0],ie[1]);case 3:return H.call(ce,ie[0],ie[1],ie[2])}return H.apply(ce,ie)}function pm(H,ce,ie,Ie){for(var Fe=-1,nt=H==null?0:H.length;++Fe<nt;){var St=H[Fe];ce(Ie,St,ie(St),H)}return Ie}function pn(H,ce){for(var ie=-1,Ie=H==null?0:H.length;++ie<Ie&&ce(H[ie],ie,H)!==!1;);return H}function gm(H,ce){for(var ie=H==null?0:H.length;ie--&&ce(H[ie],ie,H)!==!1;);return H}function lf(H,ce){for(var ie=-1,Ie=H==null?0:H.length;++ie<Ie;)if(!ce(H[ie],ie,H))return!1;return!0}function Sr(H,ce){for(var ie=-1,Ie=H==null?0:H.length,Fe=0,nt=[];++ie<Ie;){var St=H[ie];ce(St,ie,H)&&(nt[Fe++]=St)}return nt}function ls(H,ce){var ie=H==null?0:H.length;return!!ie&&mi(H,ce,0)>-1}function Ha(H,ce,ie){for(var Ie=-1,Fe=H==null?0:H.length;++Ie<Fe;)if(ie(ce,H[Ie]))return!0;return!1}function pt(H,ce){for(var ie=-1,Ie=H==null?0:H.length,Fe=Array(Ie);++ie<Ie;)Fe[ie]=ce(H[ie],ie,H);return Fe}function Cr(H,ce){for(var ie=-1,Ie=ce.length,Fe=H.length;++ie<Ie;)H[Fe+ie]=ce[ie];return H}function Ga(H,ce,ie,Ie){var Fe=-1,nt=H==null?0:H.length;for(Ie&&nt&&(ie=H[++Fe]);++Fe<nt;)ie=ce(ie,H[Fe],Fe,H);return ie}function mm(H,ce,ie,Ie){var Fe=H==null?0:H.length;for(Ie&&Fe&&(ie=H[--Fe]);Fe--;)ie=ce(ie,H[Fe],Fe,H);return ie}function Va(H,ce){for(var ie=-1,Ie=H==null?0:H.length;++ie<Ie;)if(ce(H[ie],ie,H))return!0;return!1}var vm=Za("length");function ym(H){return H.split("")}function _m(H){return H.match(ka)||[]}function cf(H,ce,ie){var Ie;return ie(H,function(Fe,nt,St){if(ce(Fe,nt,St))return Ie=nt,!1}),Ie}function cs(H,ce,ie,Ie){for(var Fe=H.length,nt=ie+(Ie?1:-1);Ie?nt--:++nt<Fe;)if(ce(H[nt],nt,H))return nt;return-1}function mi(H,ce,ie){return ce===ce?Rm(H,ce,ie):cs(H,ff,ie)}function wm(H,ce,ie,Ie){for(var Fe=ie-1,nt=H.length;++Fe<nt;)if(Ie(H[Fe],ce))return Fe;return-1}function ff(H){return H!==H}function hf(H,ce){var ie=H==null?0:H.length;return ie?Qa(H,ce)/ie:h}function Za(H){return function(ce){return ce==null?r:ce[H]}}function Ka(H){return function(ce){return H==null?r:H[ce]}}function df(H,ce,ie,Ie,Fe){return Fe(H,function(nt,St,lt){ie=Ie?(Ie=!1,nt):ce(ie,nt,St,lt)}),ie}function bm(H,ce){var ie=H.length;for(H.sort(ce);ie--;)H[ie]=H[ie].value;return H}function Qa(H,ce){for(var ie,Ie=-1,Fe=H.length;++Ie<Fe;){var nt=ce(H[Ie]);nt!==r&&(ie=ie===r?nt:ie+nt)}return ie}function Ja(H,ce){for(var ie=-1,Ie=Array(H);++ie<H;)Ie[ie]=ce(ie);return Ie}function xm(H,ce){return pt(ce,function(ie){return[ie,H[ie]]})}function pf(H){return H&&H.slice(0,yf(H)+1).replace(mr,"")}function tn(H){return function(ce){return H(ce)}}function Xa(H,ce){return pt(ce,function(ie){return H[ie]})}function oo(H,ce){return H.has(ce)}function gf(H,ce){for(var ie=-1,Ie=H.length;++ie<Ie&&mi(ce,H[ie],0)>-1;);return ie}function mf(H,ce){for(var ie=H.length;ie--&&mi(ce,H[ie],0)>-1;);return ie}function Sm(H,ce){for(var ie=H.length,Ie=0;ie--;)H[ie]===ce&&++Ie;return Ie}var Cm=Ka(am),Am=Ka(um);function Dm(H){return"\\"+cm[H]}function Om(H,ce){return H==null?r:H[ce]}function vi(H){return Wn.test(H)}function Tm(H){return zn.test(H)}function Mm(H){for(var ce,ie=[];!(ce=H.next()).done;)ie.push(ce.value);return ie}function eu(H){var ce=-1,ie=Array(H.size);return H.forEach(function(Ie,Fe){ie[++ce]=[Fe,Ie]}),ie}function vf(H,ce){return function(ie){return H(ce(ie))}}function Ar(H,ce){for(var ie=-1,Ie=H.length,Fe=0,nt=[];++ie<Ie;){var St=H[ie];(St===ce||St===O)&&(H[ie]=O,nt[Fe++]=ie)}return nt}function fs(H){var ce=-1,ie=Array(H.size);return H.forEach(function(Ie){ie[++ce]=Ie}),ie}function Em(H){var ce=-1,ie=Array(H.size);return H.forEach(function(Ie){ie[++ce]=[Ie,Ie]}),ie}function Rm(H,ce,ie){for(var Ie=ie-1,Fe=H.length;++Ie<Fe;)if(H[Ie]===ce)return Ie;return-1}function Lm(H,ce,ie){for(var Ie=ie+1;Ie--;)if(H[Ie]===ce)return Ie;return Ie}function yi(H){return vi(H)?Im(H):vm(H)}function An(H){return vi(H)?Pm(H):ym(H)}function yf(H){for(var ce=H.length;ce--&&ci.test(H.charAt(ce)););return ce}var km=Ka(lm);function Im(H){for(var ce=Xt.lastIndex=0;Xt.test(H);)++ce;return ce}function Pm(H){return H.match(Xt)||[]}function Nm(H){return H.match(xr)||[]}var $m=function H(ce){ce=ce==null?Lt:_i.defaults(Lt.Object(),ce,_i.pick(Lt,om));var ie=ce.Array,Ie=ce.Date,Fe=ce.Error,nt=ce.Function,St=ce.Math,lt=ce.Object,tu=ce.RegExp,Bm=ce.String,gn=ce.TypeError,hs=ie.prototype,jm=nt.prototype,wi=lt.prototype,ds=ce["__core-js_shared__"],ps=jm.toString,st=wi.hasOwnProperty,Ym=0,_f=function(){var e=/[^.]+$/.exec(ds&&ds.keys&&ds.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),gs=wi.toString,Um=ps.call(lt),Fm=Lt._,Wm=tu("^"+ps.call(st).replace(pr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ms=tf?ce.Buffer:r,Dr=ce.Symbol,vs=ce.Uint8Array,wf=ms?ms.allocUnsafe:r,ys=vf(lt.getPrototypeOf,lt),bf=lt.create,xf=wi.propertyIsEnumerable,_s=hs.splice,Sf=Dr?Dr.isConcatSpreadable:r,so=Dr?Dr.iterator:r,qr=Dr?Dr.toStringTag:r,ws=function(){try{var e=Kr(lt,"defineProperty");return e({},"",{}),e}catch{}}(),zm=ce.clearTimeout!==Lt.clearTimeout&&ce.clearTimeout,qm=Ie&&Ie.now!==Lt.Date.now&&Ie.now,Hm=ce.setTimeout!==Lt.setTimeout&&ce.setTimeout,bs=St.ceil,xs=St.floor,nu=lt.getOwnPropertySymbols,Gm=ms?ms.isBuffer:r,Cf=ce.isFinite,Vm=hs.join,Zm=vf(lt.keys,lt),Ct=St.max,Pt=St.min,Km=Ie.now,Qm=ce.parseInt,Af=St.random,Jm=hs.reverse,ru=Kr(ce,"DataView"),ao=Kr(ce,"Map"),iu=Kr(ce,"Promise"),bi=Kr(ce,"Set"),uo=Kr(ce,"WeakMap"),lo=Kr(lt,"create"),Ss=uo&&new uo,xi={},Xm=Qr(ru),ev=Qr(ao),tv=Qr(iu),nv=Qr(bi),rv=Qr(uo),Cs=Dr?Dr.prototype:r,co=Cs?Cs.valueOf:r,Df=Cs?Cs.toString:r;function b(e){if(yt(e)&&!We(e)&&!(e instanceof Xe)){if(e instanceof mn)return e;if(st.call(e,"__wrapped__"))return Oh(e)}return new mn(e)}var Si=function(){function e(){}return function(t){if(!gt(t))return{};if(bf)return bf(t);e.prototype=t;var o=new e;return e.prototype=r,o}}();function As(){}function mn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=r}b.templateSettings={escape:it,evaluate:It,interpolate:Sn,variable:"",imports:{_:b}},b.prototype=As.prototype,b.prototype.constructor=b,mn.prototype=Si(As.prototype),mn.prototype.constructor=mn;function Xe(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=v,this.__views__=[]}function iv(){var e=new Xe(this.__wrapped__);return e.__actions__=Gt(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Gt(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Gt(this.__views__),e}function ov(){if(this.__filtered__){var e=new Xe(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function sv(){var e=this.__wrapped__.value(),t=this.__dir__,o=We(e),a=t<0,y=o?e.length:0,S=yy(0,y,this.__views__),L=S.start,U=S.end,G=U-L,pe=a?U:L-1,ge=this.__iteratees__,xe=ge.length,Me=0,Pe=Pt(G,this.__takeCount__);if(!o||!a&&y==G&&Pe==G)return Kf(e,this.__actions__);var Be=[];e:for(;G--&&Me<Pe;){pe+=t;for(var qe=-1,je=e[pe];++qe<xe;){var Qe=ge[qe],tt=Qe.iteratee,on=Qe.type,Ft=tt(je);if(on==R)je=Ft;else if(!Ft){if(on==Y)continue e;break e}}Be[Me++]=je}return Be}Xe.prototype=Si(As.prototype),Xe.prototype.constructor=Xe;function Hr(e){var t=-1,o=e==null?0:e.length;for(this.clear();++t<o;){var a=e[t];this.set(a[0],a[1])}}function av(){this.__data__=lo?lo(null):{},this.size=0}function uv(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function lv(e){var t=this.__data__;if(lo){var o=t[e];return o===x?r:o}return st.call(t,e)?t[e]:r}function cv(e){var t=this.__data__;return lo?t[e]!==r:st.call(t,e)}function fv(e,t){var o=this.__data__;return this.size+=this.has(e)?0:1,o[e]=lo&&t===r?x:t,this}Hr.prototype.clear=av,Hr.prototype.delete=uv,Hr.prototype.get=lv,Hr.prototype.has=cv,Hr.prototype.set=fv;function qn(e){var t=-1,o=e==null?0:e.length;for(this.clear();++t<o;){var a=e[t];this.set(a[0],a[1])}}function hv(){this.__data__=[],this.size=0}function dv(e){var t=this.__data__,o=Ds(t,e);if(o<0)return!1;var a=t.length-1;return o==a?t.pop():_s.call(t,o,1),--this.size,!0}function pv(e){var t=this.__data__,o=Ds(t,e);return o<0?r:t[o][1]}function gv(e){return Ds(this.__data__,e)>-1}function mv(e,t){var o=this.__data__,a=Ds(o,e);return a<0?(++this.size,o.push([e,t])):o[a][1]=t,this}qn.prototype.clear=hv,qn.prototype.delete=dv,qn.prototype.get=pv,qn.prototype.has=gv,qn.prototype.set=mv;function Hn(e){var t=-1,o=e==null?0:e.length;for(this.clear();++t<o;){var a=e[t];this.set(a[0],a[1])}}function vv(){this.size=0,this.__data__={hash:new Hr,map:new(ao||qn),string:new Hr}}function yv(e){var t=Bs(this,e).delete(e);return this.size-=t?1:0,t}function _v(e){return Bs(this,e).get(e)}function wv(e){return Bs(this,e).has(e)}function bv(e,t){var o=Bs(this,e),a=o.size;return o.set(e,t),this.size+=o.size==a?0:1,this}Hn.prototype.clear=vv,Hn.prototype.delete=yv,Hn.prototype.get=_v,Hn.prototype.has=wv,Hn.prototype.set=bv;function Gr(e){var t=-1,o=e==null?0:e.length;for(this.__data__=new Hn;++t<o;)this.add(e[t])}function xv(e){return this.__data__.set(e,x),this}function Sv(e){return this.__data__.has(e)}Gr.prototype.add=Gr.prototype.push=xv,Gr.prototype.has=Sv;function Dn(e){var t=this.__data__=new qn(e);this.size=t.size}function Cv(){this.__data__=new qn,this.size=0}function Av(e){var t=this.__data__,o=t.delete(e);return this.size=t.size,o}function Dv(e){return this.__data__.get(e)}function Ov(e){return this.__data__.has(e)}function Tv(e,t){var o=this.__data__;if(o instanceof qn){var a=o.__data__;if(!ao||a.length<l-1)return a.push([e,t]),this.size=++o.size,this;o=this.__data__=new Hn(a)}return o.set(e,t),this.size=o.size,this}Dn.prototype.clear=Cv,Dn.prototype.delete=Av,Dn.prototype.get=Dv,Dn.prototype.has=Ov,Dn.prototype.set=Tv;function Of(e,t){var o=We(e),a=!o&&Jr(e),y=!o&&!a&&Rr(e),S=!o&&!a&&!y&&Oi(e),L=o||a||y||S,U=L?Ja(e.length,Bm):[],G=U.length;for(var pe in e)(t||st.call(e,pe))&&!(L&&(pe=="length"||y&&(pe=="offset"||pe=="parent")||S&&(pe=="buffer"||pe=="byteLength"||pe=="byteOffset")||Kn(pe,G)))&&U.push(pe);return U}function Tf(e){var t=e.length;return t?e[gu(0,t-1)]:r}function Mv(e,t){return js(Gt(e),Vr(t,0,e.length))}function Ev(e){return js(Gt(e))}function ou(e,t,o){(o!==r&&!On(e[t],o)||o===r&&!(t in e))&&Gn(e,t,o)}function fo(e,t,o){var a=e[t];(!(st.call(e,t)&&On(a,o))||o===r&&!(t in e))&&Gn(e,t,o)}function Ds(e,t){for(var o=e.length;o--;)if(On(e[o][0],t))return o;return-1}function Rv(e,t,o,a){return Or(e,function(y,S,L){t(a,y,o(y),L)}),a}function Mf(e,t){return e&&kn(t,Ot(t),e)}function Lv(e,t){return e&&kn(t,Zt(t),e)}function Gn(e,t,o){t=="__proto__"&&ws?ws(e,t,{configurable:!0,enumerable:!0,value:o,writable:!0}):e[t]=o}function su(e,t){for(var o=-1,a=t.length,y=ie(a),S=e==null;++o<a;)y[o]=S?r:Yu(e,t[o]);return y}function Vr(e,t,o){return e===e&&(o!==r&&(e=e<=o?e:o),t!==r&&(e=e>=t?e:t)),e}function vn(e,t,o,a,y,S){var L,U=t&E,G=t&N,pe=t&M;if(o&&(L=y?o(e,a,y,S):o(e)),L!==r)return L;if(!gt(e))return e;var ge=We(e);if(ge){if(L=wy(e),!U)return Gt(e,L)}else{var xe=Nt(e),Me=xe==P||xe==z;if(Rr(e))return Xf(e,U);if(xe==Te||xe==ae||Me&&!y){if(L=G||Me?{}:yh(e),!U)return G?ly(e,Lv(L,e)):uy(e,Mf(L,e))}else{if(!ct[xe])return y?e:{};L=by(e,xe,U)}}S||(S=new Dn);var Pe=S.get(e);if(Pe)return Pe;S.set(e,L),Gh(e)?e.forEach(function(je){L.add(vn(je,t,o,je,e,S))}):qh(e)&&e.forEach(function(je,Qe){L.set(Qe,vn(je,t,o,Qe,e,S))});var Be=pe?G?Du:Au:G?Zt:Ot,qe=ge?r:Be(e);return pn(qe||e,function(je,Qe){qe&&(Qe=je,je=e[Qe]),fo(L,Qe,vn(je,t,o,Qe,e,S))}),L}function kv(e){var t=Ot(e);return function(o){return Ef(o,e,t)}}function Ef(e,t,o){var a=o.length;if(e==null)return!a;for(e=lt(e);a--;){var y=o[a],S=t[y],L=e[y];if(L===r&&!(y in e)||!S(L))return!1}return!0}function Rf(e,t,o){if(typeof e!="function")throw new gn(m);return _o(function(){e.apply(r,o)},t)}function ho(e,t,o,a){var y=-1,S=ls,L=!0,U=e.length,G=[],pe=t.length;if(!U)return G;o&&(t=pt(t,tn(o))),a?(S=Ha,L=!1):t.length>=l&&(S=oo,L=!1,t=new Gr(t));e:for(;++y<U;){var ge=e[y],xe=o==null?ge:o(ge);if(ge=a||ge!==0?ge:0,L&&xe===xe){for(var Me=pe;Me--;)if(t[Me]===xe)continue e;G.push(ge)}else S(t,xe,a)||G.push(ge)}return G}var Or=ih(Ln),Lf=ih(uu,!0);function Iv(e,t){var o=!0;return Or(e,function(a,y,S){return o=!!t(a,y,S),o}),o}function Os(e,t,o){for(var a=-1,y=e.length;++a<y;){var S=e[a],L=t(S);if(L!=null&&(U===r?L===L&&!rn(L):o(L,U)))var U=L,G=S}return G}function Pv(e,t,o,a){var y=e.length;for(o=ze(o),o<0&&(o=-o>y?0:y+o),a=a===r||a>y?y:ze(a),a<0&&(a+=y),a=o>a?0:Zh(a);o<a;)e[o++]=t;return e}function kf(e,t){var o=[];return Or(e,function(a,y,S){t(a,y,S)&&o.push(a)}),o}function kt(e,t,o,a,y){var S=-1,L=e.length;for(o||(o=Sy),y||(y=[]);++S<L;){var U=e[S];t>0&&o(U)?t>1?kt(U,t-1,o,a,y):Cr(y,U):a||(y[y.length]=U)}return y}var au=oh(),If=oh(!0);function Ln(e,t){return e&&au(e,t,Ot)}function uu(e,t){return e&&If(e,t,Ot)}function Ts(e,t){return Sr(t,function(o){return Qn(e[o])})}function Zr(e,t){t=Mr(t,e);for(var o=0,a=t.length;e!=null&&o<a;)e=e[In(t[o++])];return o&&o==a?e:r}function Pf(e,t,o){var a=t(e);return We(e)?a:Cr(a,o(e))}function Yt(e){return e==null?e===r?Ce:se:qr&&qr in lt(e)?vy(e):Ey(e)}function lu(e,t){return e>t}function Nv(e,t){return e!=null&&st.call(e,t)}function $v(e,t){return e!=null&&t in lt(e)}function Bv(e,t,o){return e>=Pt(t,o)&&e<Ct(t,o)}function cu(e,t,o){for(var a=o?Ha:ls,y=e[0].length,S=e.length,L=S,U=ie(S),G=1/0,pe=[];L--;){var ge=e[L];L&&t&&(ge=pt(ge,tn(t))),G=Pt(ge.length,G),U[L]=!o&&(t||y>=120&&ge.length>=120)?new Gr(L&&ge):r}ge=e[0];var xe=-1,Me=U[0];e:for(;++xe<y&&pe.length<G;){var Pe=ge[xe],Be=t?t(Pe):Pe;if(Pe=o||Pe!==0?Pe:0,!(Me?oo(Me,Be):a(pe,Be,o))){for(L=S;--L;){var qe=U[L];if(!(qe?oo(qe,Be):a(e[L],Be,o)))continue e}Me&&Me.push(Be),pe.push(Pe)}}return pe}function jv(e,t,o,a){return Ln(e,function(y,S,L){t(a,o(y),S,L)}),a}function po(e,t,o){t=Mr(t,e),e=xh(e,t);var a=e==null?e:e[In(_n(t))];return a==null?r:en(a,e,o)}function Nf(e){return yt(e)&&Yt(e)==ae}function Yv(e){return yt(e)&&Yt(e)==Se}function Uv(e){return yt(e)&&Yt(e)==he}function go(e,t,o,a,y){return e===t?!0:e==null||t==null||!yt(e)&&!yt(t)?e!==e&&t!==t:Fv(e,t,o,a,go,y)}function Fv(e,t,o,a,y,S){var L=We(e),U=We(t),G=L?fe:Nt(e),pe=U?fe:Nt(t);G=G==ae?Te:G,pe=pe==ae?Te:pe;var ge=G==Te,xe=pe==Te,Me=G==pe;if(Me&&Rr(e)){if(!Rr(t))return!1;L=!0,ge=!1}if(Me&&!ge)return S||(S=new Dn),L||Oi(e)?gh(e,t,o,a,y,S):gy(e,t,G,o,a,y,S);if(!(o&I)){var Pe=ge&&st.call(e,"__wrapped__"),Be=xe&&st.call(t,"__wrapped__");if(Pe||Be){var qe=Pe?e.value():e,je=Be?t.value():t;return S||(S=new Dn),y(qe,je,o,a,S)}}return Me?(S||(S=new Dn),my(e,t,o,a,y,S)):!1}function Wv(e){return yt(e)&&Nt(e)==F}function fu(e,t,o,a){var y=o.length,S=y,L=!a;if(e==null)return!S;for(e=lt(e);y--;){var U=o[y];if(L&&U[2]?U[1]!==e[U[0]]:!(U[0]in e))return!1}for(;++y<S;){U=o[y];var G=U[0],pe=e[G],ge=U[1];if(L&&U[2]){if(pe===r&&!(G in e))return!1}else{var xe=new Dn;if(a)var Me=a(pe,ge,G,e,t,xe);if(!(Me===r?go(ge,pe,I|$,a,xe):Me))return!1}}return!0}function $f(e){if(!gt(e)||Ay(e))return!1;var t=Qn(e)?Wm:Yn;return t.test(Qr(e))}function zv(e){return yt(e)&&Yt(e)==_}function qv(e){return yt(e)&&Nt(e)==k}function Hv(e){return yt(e)&&qs(e.length)&&!!ft[Yt(e)]}function Bf(e){return typeof e=="function"?e:e==null?Kt:typeof e=="object"?We(e)?Uf(e[0],e[1]):Yf(e):sd(e)}function hu(e){if(!yo(e))return Zm(e);var t=[];for(var o in lt(e))st.call(e,o)&&o!="constructor"&&t.push(o);return t}function Gv(e){if(!gt(e))return My(e);var t=yo(e),o=[];for(var a in e)a=="constructor"&&(t||!st.call(e,a))||o.push(a);return o}function du(e,t){return e<t}function jf(e,t){var o=-1,a=Vt(e)?ie(e.length):[];return Or(e,function(y,S,L){a[++o]=t(y,S,L)}),a}function Yf(e){var t=Tu(e);return t.length==1&&t[0][2]?wh(t[0][0],t[0][1]):function(o){return o===e||fu(o,e,t)}}function Uf(e,t){return Eu(e)&&_h(t)?wh(In(e),t):function(o){var a=Yu(o,e);return a===r&&a===t?Uu(o,e):go(t,a,I|$)}}function Ms(e,t,o,a,y){e!==t&&au(t,function(S,L){if(y||(y=new Dn),gt(S))Vv(e,t,L,o,Ms,a,y);else{var U=a?a(Lu(e,L),S,L+"",e,t,y):r;U===r&&(U=S),ou(e,L,U)}},Zt)}function Vv(e,t,o,a,y,S,L){var U=Lu(e,o),G=Lu(t,o),pe=L.get(G);if(pe){ou(e,o,pe);return}var ge=S?S(U,G,o+"",e,t,L):r,xe=ge===r;if(xe){var Me=We(G),Pe=!Me&&Rr(G),Be=!Me&&!Pe&&Oi(G);ge=G,Me||Pe||Be?We(U)?ge=U:_t(U)?ge=Gt(U):Pe?(xe=!1,ge=Xf(G,!0)):Be?(xe=!1,ge=eh(G,!0)):ge=[]:wo(G)||Jr(G)?(ge=U,Jr(U)?ge=Kh(U):(!gt(U)||Qn(U))&&(ge=yh(G))):xe=!1}xe&&(L.set(G,ge),y(ge,G,a,S,L),L.delete(G)),ou(e,o,ge)}function Ff(e,t){var o=e.length;if(o)return t+=t<0?o:0,Kn(t,o)?e[t]:r}function Wf(e,t,o){t.length?t=pt(t,function(S){return We(S)?function(L){return Zr(L,S.length===1?S[0]:S)}:S}):t=[Kt];var a=-1;t=pt(t,tn($e()));var y=jf(e,function(S,L,U){var G=pt(t,function(pe){return pe(S)});return{criteria:G,index:++a,value:S}});return bm(y,function(S,L){return ay(S,L,o)})}function Zv(e,t){return zf(e,t,function(o,a){return Uu(e,a)})}function zf(e,t,o){for(var a=-1,y=t.length,S={};++a<y;){var L=t[a],U=Zr(e,L);o(U,L)&&mo(S,Mr(L,e),U)}return S}function Kv(e){return function(t){return Zr(t,e)}}function pu(e,t,o,a){var y=a?wm:mi,S=-1,L=t.length,U=e;for(e===t&&(t=Gt(t)),o&&(U=pt(e,tn(o)));++S<L;)for(var G=0,pe=t[S],ge=o?o(pe):pe;(G=y(U,ge,G,a))>-1;)U!==e&&_s.call(U,G,1),_s.call(e,G,1);return e}function qf(e,t){for(var o=e?t.length:0,a=o-1;o--;){var y=t[o];if(o==a||y!==S){var S=y;Kn(y)?_s.call(e,y,1):yu(e,y)}}return e}function gu(e,t){return e+xs(Af()*(t-e+1))}function Qv(e,t,o,a){for(var y=-1,S=Ct(bs((t-e)/(o||1)),0),L=ie(S);S--;)L[a?S:++y]=e,e+=o;return L}function mu(e,t){var o="";if(!e||t<1||t>p)return o;do t%2&&(o+=e),t=xs(t/2),t&&(e+=e);while(t);return o}function He(e,t){return ku(bh(e,t,Kt),e+"")}function Jv(e){return Tf(Ti(e))}function Xv(e,t){var o=Ti(e);return js(o,Vr(t,0,o.length))}function mo(e,t,o,a){if(!gt(e))return e;t=Mr(t,e);for(var y=-1,S=t.length,L=S-1,U=e;U!=null&&++y<S;){var G=In(t[y]),pe=o;if(G==="__proto__"||G==="constructor"||G==="prototype")return e;if(y!=L){var ge=U[G];pe=a?a(ge,G,U):r,pe===r&&(pe=gt(ge)?ge:Kn(t[y+1])?[]:{})}fo(U,G,pe),U=U[G]}return e}var Hf=Ss?function(e,t){return Ss.set(e,t),e}:Kt,ey=ws?function(e,t){return ws(e,"toString",{configurable:!0,enumerable:!1,value:Wu(t),writable:!0})}:Kt;function ty(e){return js(Ti(e))}function yn(e,t,o){var a=-1,y=e.length;t<0&&(t=-t>y?0:y+t),o=o>y?y:o,o<0&&(o+=y),y=t>o?0:o-t>>>0,t>>>=0;for(var S=ie(y);++a<y;)S[a]=e[a+t];return S}function ny(e,t){var o;return Or(e,function(a,y,S){return o=t(a,y,S),!o}),!!o}function Es(e,t,o){var a=0,y=e==null?a:e.length;if(typeof t=="number"&&t===t&&y<=W){for(;a<y;){var S=a+y>>>1,L=e[S];L!==null&&!rn(L)&&(o?L<=t:L<t)?a=S+1:y=S}return y}return vu(e,t,Kt,o)}function vu(e,t,o,a){var y=0,S=e==null?0:e.length;if(S===0)return 0;t=o(t);for(var L=t!==t,U=t===null,G=rn(t),pe=t===r;y<S;){var ge=xs((y+S)/2),xe=o(e[ge]),Me=xe!==r,Pe=xe===null,Be=xe===xe,qe=rn(xe);if(L)var je=a||Be;else pe?je=Be&&(a||Me):U?je=Be&&Me&&(a||!Pe):G?je=Be&&Me&&!Pe&&(a||!qe):Pe||qe?je=!1:je=a?xe<=t:xe<t;je?y=ge+1:S=ge}return Pt(S,D)}function Gf(e,t){for(var o=-1,a=e.length,y=0,S=[];++o<a;){var L=e[o],U=t?t(L):L;if(!o||!On(U,G)){var G=U;S[y++]=L===0?0:L}}return S}function Vf(e){return typeof e=="number"?e:rn(e)?h:+e}function nn(e){if(typeof e=="string")return e;if(We(e))return pt(e,nn)+"";if(rn(e))return Df?Df.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Tr(e,t,o){var a=-1,y=ls,S=e.length,L=!0,U=[],G=U;if(o)L=!1,y=Ha;else if(S>=l){var pe=t?null:dy(e);if(pe)return fs(pe);L=!1,y=oo,G=new Gr}else G=t?[]:U;e:for(;++a<S;){var ge=e[a],xe=t?t(ge):ge;if(ge=o||ge!==0?ge:0,L&&xe===xe){for(var Me=G.length;Me--;)if(G[Me]===xe)continue e;t&&G.push(xe),U.push(ge)}else y(G,xe,o)||(G!==U&&G.push(xe),U.push(ge))}return U}function yu(e,t){return t=Mr(t,e),e=xh(e,t),e==null||delete e[In(_n(t))]}function Zf(e,t,o,a){return mo(e,t,o(Zr(e,t)),a)}function Rs(e,t,o,a){for(var y=e.length,S=a?y:-1;(a?S--:++S<y)&&t(e[S],S,e););return o?yn(e,a?0:S,a?S+1:y):yn(e,a?S+1:0,a?y:S)}function Kf(e,t){var o=e;return o instanceof Xe&&(o=o.value()),Ga(t,function(a,y){return y.func.apply(y.thisArg,Cr([a],y.args))},o)}function _u(e,t,o){var a=e.length;if(a<2)return a?Tr(e[0]):[];for(var y=-1,S=ie(a);++y<a;)for(var L=e[y],U=-1;++U<a;)U!=y&&(S[y]=ho(S[y]||L,e[U],t,o));return Tr(kt(S,1),t,o)}function Qf(e,t,o){for(var a=-1,y=e.length,S=t.length,L={};++a<y;){var U=a<S?t[a]:r;o(L,e[a],U)}return L}function wu(e){return _t(e)?e:[]}function bu(e){return typeof e=="function"?e:Kt}function Mr(e,t){return We(e)?e:Eu(e,t)?[e]:Dh(ot(e))}var ry=He;function Er(e,t,o){var a=e.length;return o=o===r?a:o,!t&&o>=a?e:yn(e,t,o)}var Jf=zm||function(e){return Lt.clearTimeout(e)};function Xf(e,t){if(t)return e.slice();var o=e.length,a=wf?wf(o):new e.constructor(o);return e.copy(a),a}function xu(e){var t=new e.constructor(e.byteLength);return new vs(t).set(new vs(e)),t}function iy(e,t){var o=t?xu(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.byteLength)}function oy(e){var t=new e.constructor(e.source,Zi.exec(e));return t.lastIndex=e.lastIndex,t}function sy(e){return co?lt(co.call(e)):{}}function eh(e,t){var o=t?xu(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.length)}function th(e,t){if(e!==t){var o=e!==r,a=e===null,y=e===e,S=rn(e),L=t!==r,U=t===null,G=t===t,pe=rn(t);if(!U&&!pe&&!S&&e>t||S&&L&&G&&!U&&!pe||a&&L&&G||!o&&G||!y)return 1;if(!a&&!S&&!pe&&e<t||pe&&o&&y&&!a&&!S||U&&o&&y||!L&&y||!G)return-1}return 0}function ay(e,t,o){for(var a=-1,y=e.criteria,S=t.criteria,L=y.length,U=o.length;++a<L;){var G=th(y[a],S[a]);if(G){if(a>=U)return G;var pe=o[a];return G*(pe=="desc"?-1:1)}}return e.index-t.index}function nh(e,t,o,a){for(var y=-1,S=e.length,L=o.length,U=-1,G=t.length,pe=Ct(S-L,0),ge=ie(G+pe),xe=!a;++U<G;)ge[U]=t[U];for(;++y<L;)(xe||y<S)&&(ge[o[y]]=e[y]);for(;pe--;)ge[U++]=e[y++];return ge}function rh(e,t,o,a){for(var y=-1,S=e.length,L=-1,U=o.length,G=-1,pe=t.length,ge=Ct(S-U,0),xe=ie(ge+pe),Me=!a;++y<ge;)xe[y]=e[y];for(var Pe=y;++G<pe;)xe[Pe+G]=t[G];for(;++L<U;)(Me||y<S)&&(xe[Pe+o[L]]=e[y++]);return xe}function Gt(e,t){var o=-1,a=e.length;for(t||(t=ie(a));++o<a;)t[o]=e[o];return t}function kn(e,t,o,a){var y=!o;o||(o={});for(var S=-1,L=t.length;++S<L;){var U=t[S],G=a?a(o[U],e[U],U,o,e):r;G===r&&(G=e[U]),y?Gn(o,U,G):fo(o,U,G)}return o}function uy(e,t){return kn(e,Mu(e),t)}function ly(e,t){return kn(e,mh(e),t)}function Ls(e,t){return function(o,a){var y=We(o)?pm:Rv,S=t?t():{};return y(o,e,$e(a,2),S)}}function Ci(e){return He(function(t,o){var a=-1,y=o.length,S=y>1?o[y-1]:r,L=y>2?o[2]:r;for(S=e.length>3&&typeof S=="function"?(y--,S):r,L&&Ut(o[0],o[1],L)&&(S=y<3?r:S,y=1),t=lt(t);++a<y;){var U=o[a];U&&e(t,U,a,S)}return t})}function ih(e,t){return function(o,a){if(o==null)return o;if(!Vt(o))return e(o,a);for(var y=o.length,S=t?y:-1,L=lt(o);(t?S--:++S<y)&&a(L[S],S,L)!==!1;);return o}}function oh(e){return function(t,o,a){for(var y=-1,S=lt(t),L=a(t),U=L.length;U--;){var G=L[e?U:++y];if(o(S[G],G,S)===!1)break}return t}}function cy(e,t,o){var a=t&j,y=vo(e);function S(){var L=this&&this!==Lt&&this instanceof S?y:e;return L.apply(a?o:this,arguments)}return S}function sh(e){return function(t){t=ot(t);var o=vi(t)?An(t):r,a=o?o[0]:t.charAt(0),y=o?Er(o,1).join(""):t.slice(1);return a[e]()+y}}function Ai(e){return function(t){return Ga(id(rd(t).replace(br,"")),e,"")}}function vo(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var o=Si(e.prototype),a=e.apply(o,t);return gt(a)?a:o}}function fy(e,t,o){var a=vo(e);function y(){for(var S=arguments.length,L=ie(S),U=S,G=Di(y);U--;)L[U]=arguments[U];var pe=S<3&&L[0]!==G&&L[S-1]!==G?[]:Ar(L,G);if(S-=pe.length,S<o)return fh(e,t,ks,y.placeholder,r,L,pe,r,r,o-S);var ge=this&&this!==Lt&&this instanceof y?a:e;return en(ge,this,L)}return y}function ah(e){return function(t,o,a){var y=lt(t);if(!Vt(t)){var S=$e(o,3);t=Ot(t),o=function(U){return S(y[U],U,y)}}var L=e(t,o,a);return L>-1?y[S?t[L]:L]:r}}function uh(e){return Zn(function(t){var o=t.length,a=o,y=mn.prototype.thru;for(e&&t.reverse();a--;){var S=t[a];if(typeof S!="function")throw new gn(m);if(y&&!L&&$s(S)=="wrapper")var L=new mn([],!0)}for(a=L?a:o;++a<o;){S=t[a];var U=$s(S),G=U=="wrapper"?Ou(S):r;G&&Ru(G[0])&&G[1]==(oe|ne|Z|X)&&!G[4].length&&G[9]==1?L=L[$s(G[0])].apply(L,G[3]):L=S.length==1&&Ru(S)?L[U]():L.thru(S)}return function(){var pe=arguments,ge=pe[0];if(L&&pe.length==1&&We(ge))return L.plant(ge).value();for(var xe=0,Me=o?t[xe].apply(this,pe):ge;++xe<o;)Me=t[xe].call(this,Me);return Me}})}function ks(e,t,o,a,y,S,L,U,G,pe){var ge=t&oe,xe=t&j,Me=t&J,Pe=t&(ne|ue),Be=t&me,qe=Me?r:vo(e);function je(){for(var Qe=arguments.length,tt=ie(Qe),on=Qe;on--;)tt[on]=arguments[on];if(Pe)var Ft=Di(je),sn=Sm(tt,Ft);if(a&&(tt=nh(tt,a,y,Pe)),S&&(tt=rh(tt,S,L,Pe)),Qe-=sn,Pe&&Qe<pe){var wt=Ar(tt,Ft);return fh(e,t,ks,je.placeholder,o,tt,wt,U,G,pe-Qe)}var Tn=xe?o:this,Xn=Me?Tn[e]:e;return Qe=tt.length,U?tt=Ry(tt,U):Be&&Qe>1&&tt.reverse(),ge&&G<Qe&&(tt.length=G),this&&this!==Lt&&this instanceof je&&(Xn=qe||vo(Xn)),Xn.apply(Tn,tt)}return je}function lh(e,t){return function(o,a){return jv(o,e,t(a),{})}}function Is(e,t){return function(o,a){var y;if(o===r&&a===r)return t;if(o!==r&&(y=o),a!==r){if(y===r)return a;typeof o=="string"||typeof a=="string"?(o=nn(o),a=nn(a)):(o=Vf(o),a=Vf(a)),y=e(o,a)}return y}}function Su(e){return Zn(function(t){return t=pt(t,tn($e())),He(function(o){var a=this;return e(t,function(y){return en(y,a,o)})})})}function Ps(e,t){t=t===r?" ":nn(t);var o=t.length;if(o<2)return o?mu(t,e):t;var a=mu(t,bs(e/yi(t)));return vi(t)?Er(An(a),0,e).join(""):a.slice(0,e)}function hy(e,t,o,a){var y=t&j,S=vo(e);function L(){for(var U=-1,G=arguments.length,pe=-1,ge=a.length,xe=ie(ge+G),Me=this&&this!==Lt&&this instanceof L?S:e;++pe<ge;)xe[pe]=a[pe];for(;G--;)xe[pe++]=arguments[++U];return en(Me,y?o:this,xe)}return L}function ch(e){return function(t,o,a){return a&&typeof a!="number"&&Ut(t,o,a)&&(o=a=r),t=Jn(t),o===r?(o=t,t=0):o=Jn(o),a=a===r?t<o?1:-1:Jn(a),Qv(t,o,a,e)}}function Ns(e){return function(t,o){return typeof t=="string"&&typeof o=="string"||(t=wn(t),o=wn(o)),e(t,o)}}function fh(e,t,o,a,y,S,L,U,G,pe){var ge=t&ne,xe=ge?L:r,Me=ge?r:L,Pe=ge?S:r,Be=ge?r:S;t|=ge?Z:le,t&=~(ge?le:Z),t&te||(t&=-4);var qe=[e,t,y,Pe,xe,Be,Me,U,G,pe],je=o.apply(r,qe);return Ru(e)&&Sh(je,qe),je.placeholder=a,Ch(je,e,t)}function Cu(e){var t=St[e];return function(o,a){if(o=wn(o),a=a==null?0:Pt(ze(a),292),a&&Cf(o)){var y=(ot(o)+"e").split("e"),S=t(y[0]+"e"+(+y[1]+a));return y=(ot(S)+"e").split("e"),+(y[0]+"e"+(+y[1]-a))}return t(o)}}var dy=bi&&1/fs(new bi([,-0]))[1]==g?function(e){return new bi(e)}:Hu;function hh(e){return function(t){var o=Nt(t);return o==F?eu(t):o==k?Em(t):xm(t,e(t))}}function Vn(e,t,o,a,y,S,L,U){var G=t&J;if(!G&&typeof e!="function")throw new gn(m);var pe=a?a.length:0;if(pe||(t&=-97,a=y=r),L=L===r?L:Ct(ze(L),0),U=U===r?U:ze(U),pe-=y?y.length:0,t&le){var ge=a,xe=y;a=y=r}var Me=G?r:Ou(e),Pe=[e,t,o,a,y,ge,xe,S,L,U];if(Me&&Ty(Pe,Me),e=Pe[0],t=Pe[1],o=Pe[2],a=Pe[3],y=Pe[4],U=Pe[9]=Pe[9]===r?G?0:e.length:Ct(Pe[9]-pe,0),!U&&t&(ne|ue)&&(t&=-25),!t||t==j)var Be=cy(e,t,o);else t==ne||t==ue?Be=fy(e,t,U):(t==Z||t==(j|Z))&&!y.length?Be=hy(e,t,o,a):Be=ks.apply(r,Pe);var qe=Me?Hf:Sh;return Ch(qe(Be,Pe),e,t)}function dh(e,t,o,a){return e===r||On(e,wi[o])&&!st.call(a,o)?t:e}function ph(e,t,o,a,y,S){return gt(e)&&gt(t)&&(S.set(t,e),Ms(e,t,r,ph,S),S.delete(t)),e}function py(e){return wo(e)?r:e}function gh(e,t,o,a,y,S){var L=o&I,U=e.length,G=t.length;if(U!=G&&!(L&&G>U))return!1;var pe=S.get(e),ge=S.get(t);if(pe&&ge)return pe==t&&ge==e;var xe=-1,Me=!0,Pe=o&$?new Gr:r;for(S.set(e,t),S.set(t,e);++xe<U;){var Be=e[xe],qe=t[xe];if(a)var je=L?a(qe,Be,xe,t,e,S):a(Be,qe,xe,e,t,S);if(je!==r){if(je)continue;Me=!1;break}if(Pe){if(!Va(t,function(Qe,tt){if(!oo(Pe,tt)&&(Be===Qe||y(Be,Qe,o,a,S)))return Pe.push(tt)})){Me=!1;break}}else if(!(Be===qe||y(Be,qe,o,a,S))){Me=!1;break}}return S.delete(e),S.delete(t),Me}function gy(e,t,o,a,y,S,L){switch(o){case Le:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Se:return!(e.byteLength!=t.byteLength||!S(new vs(e),new vs(t)));case ee:case he:case K:return On(+e,+t);case _e:return e.name==t.name&&e.message==t.message;case _:case q:return e==t+"";case F:var U=eu;case k:var G=a&I;if(U||(U=fs),e.size!=t.size&&!G)return!1;var pe=L.get(e);if(pe)return pe==t;a|=$,L.set(e,t);var ge=gh(U(e),U(t),a,y,S,L);return L.delete(e),ge;case Q:if(co)return co.call(e)==co.call(t)}return!1}function my(e,t,o,a,y,S){var L=o&I,U=Au(e),G=U.length,pe=Au(t),ge=pe.length;if(G!=ge&&!L)return!1;for(var xe=G;xe--;){var Me=U[xe];if(!(L?Me in t:st.call(t,Me)))return!1}var Pe=S.get(e),Be=S.get(t);if(Pe&&Be)return Pe==t&&Be==e;var qe=!0;S.set(e,t),S.set(t,e);for(var je=L;++xe<G;){Me=U[xe];var Qe=e[Me],tt=t[Me];if(a)var on=L?a(tt,Qe,Me,t,e,S):a(Qe,tt,Me,e,t,S);if(!(on===r?Qe===tt||y(Qe,tt,o,a,S):on)){qe=!1;break}je||(je=Me=="constructor")}if(qe&&!je){var Ft=e.constructor,sn=t.constructor;Ft!=sn&&"constructor"in e&&"constructor"in t&&!(typeof Ft=="function"&&Ft instanceof Ft&&typeof sn=="function"&&sn instanceof sn)&&(qe=!1)}return S.delete(e),S.delete(t),qe}function Zn(e){return ku(bh(e,r,Eh),e+"")}function Au(e){return Pf(e,Ot,Mu)}function Du(e){return Pf(e,Zt,mh)}var Ou=Ss?function(e){return Ss.get(e)}:Hu;function $s(e){for(var t=e.name+"",o=xi[t],a=st.call(xi,t)?o.length:0;a--;){var y=o[a],S=y.func;if(S==null||S==e)return y.name}return t}function Di(e){var t=st.call(b,"placeholder")?b:e;return t.placeholder}function $e(){var e=b.iteratee||zu;return e=e===zu?Bf:e,arguments.length?e(arguments[0],arguments[1]):e}function Bs(e,t){var o=e.__data__;return Cy(t)?o[typeof t=="string"?"string":"hash"]:o.map}function Tu(e){for(var t=Ot(e),o=t.length;o--;){var a=t[o],y=e[a];t[o]=[a,y,_h(y)]}return t}function Kr(e,t){var o=Om(e,t);return $f(o)?o:r}function vy(e){var t=st.call(e,qr),o=e[qr];try{e[qr]=r;var a=!0}catch{}var y=gs.call(e);return a&&(t?e[qr]=o:delete e[qr]),y}var Mu=nu?function(e){return e==null?[]:(e=lt(e),Sr(nu(e),function(t){return xf.call(e,t)}))}:Gu,mh=nu?function(e){for(var t=[];e;)Cr(t,Mu(e)),e=ys(e);return t}:Gu,Nt=Yt;(ru&&Nt(new ru(new ArrayBuffer(1)))!=Le||ao&&Nt(new ao)!=F||iu&&Nt(iu.resolve())!=u||bi&&Nt(new bi)!=k||uo&&Nt(new uo)!=be)&&(Nt=function(e){var t=Yt(e),o=t==Te?e.constructor:r,a=o?Qr(o):"";if(a)switch(a){case Xm:return Le;case ev:return F;case tv:return u;case nv:return k;case rv:return be}return t});function yy(e,t,o){for(var a=-1,y=o.length;++a<y;){var S=o[a],L=S.size;switch(S.type){case"drop":e+=L;break;case"dropRight":t-=L;break;case"take":t=Pt(t,e+L);break;case"takeRight":e=Ct(e,t-L);break}}return{start:e,end:t}}function _y(e){var t=e.match(hi);return t?t[1].split(Et):[]}function vh(e,t,o){t=Mr(t,e);for(var a=-1,y=t.length,S=!1;++a<y;){var L=In(t[a]);if(!(S=e!=null&&o(e,L)))break;e=e[L]}return S||++a!=y?S:(y=e==null?0:e.length,!!y&&qs(y)&&Kn(L,y)&&(We(e)||Jr(e)))}function wy(e){var t=e.length,o=new e.constructor(t);return t&&typeof e[0]=="string"&&st.call(e,"index")&&(o.index=e.index,o.input=e.input),o}function yh(e){return typeof e.constructor=="function"&&!yo(e)?Si(ys(e)):{}}function by(e,t,o){var a=e.constructor;switch(t){case Se:return xu(e);case ee:case he:return new a(+e);case Le:return iy(e,o);case Ne:case ke:case Ge:case Je:case Ve:case xt:case vt:case ut:case qt:return eh(e,o);case F:return new a;case K:case q:return new a(e);case _:return oy(e);case k:return new a;case Q:return sy(e)}}function xy(e,t){var o=t.length;if(!o)return e;var a=o-1;return t[a]=(o>1?"& ":"")+t[a],t=t.join(o>2?", ":" "),e.replace(fi,`{
125
125
  /* [wrapped with `+t+`] */
126
- `)}function Sy(e){return We(e)||Jr(e)||!!(Sf&&e&&e[Sf])}function Kn(e,t){var o=typeof e;return t=t??p,!!t&&(o=="number"||o!="symbol"&&es.test(e))&&e>-1&&e%1==0&&e<t}function Ut(e,t,o){if(!gt(o))return!1;var a=typeof t;return(a=="number"?Vt(o)&&Kn(t,o.length):a=="string"&&t in o)?On(o[t],e):!1}function Mu(e,t){if(We(e))return!1;var o=typeof e;return o=="number"||o=="symbol"||o=="boolean"||e==null||rn(e)?!0:dt.test(e)||!dr.test(e)||t!=null&&e in lt(t)}function Cy(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Eu(e){var t=$s(e),o=b[t];if(typeof o!="function"||!(t in Xe.prototype))return!1;if(e===o)return!0;var a=Du(o);return!!a&&e===a[0]}function Ay(e){return!!_f&&_f in e}var Dy=ds?Qn:Gu;function vo(e){var t=e&&e.constructor,o=typeof t=="function"&&t.prototype||wi;return e===o}function _h(e){return e===e&&!gt(e)}function wh(e,t){return function(o){return o==null?!1:o[e]===t&&(t!==r||e in lt(o))}}function Oy(e){var t=Ws(e,function(a){return o.size===C&&o.clear(),a}),o=t.cache;return t}function Ty(e,t){var o=e[1],a=t[1],y=o|a,S=y<(j|X|oe),k=a==oe&&o==ne||a==oe&&o==ee&&e[7].length<=t[8]||a==(oe|ee)&&t[7].length<=t[8]&&o==ne;if(!(S||k))return e;a&j&&(e[2]=t[2],y|=o&j?0:te);var U=t[3];if(U){var G=e[3];e[3]=G?nh(G,U,t[4]):U,e[4]=G?Ar(e[3],O):t[4]}return U=t[5],U&&(G=e[5],e[5]=G?rh(G,U,t[6]):U,e[6]=G?Ar(e[5],O):t[6]),U=t[7],U&&(e[7]=U),a&oe&&(e[8]=e[8]==null?t[8]:Pt(e[8],t[8])),e[9]==null&&(e[9]=t[9]),e[0]=t[0],e[1]=y,e}function My(e){var t=[];if(e!=null)for(var o in lt(e))t.push(o);return t}function Ey(e){return gs.call(e)}function bh(e,t,o){return t=Ct(t===r?e.length-1:t,0),function(){for(var a=arguments,y=-1,S=Ct(a.length-t,0),k=ie(S);++y<S;)k[y]=a[t+y];y=-1;for(var U=ie(t+1);++y<t;)U[y]=a[y];return U[t]=o(k),en(e,this,U)}}function xh(e,t){return t.length<2?e:Zr(e,yn(t,0,-1))}function Ry(e,t){for(var o=e.length,a=Pt(t.length,o),y=Gt(e);a--;){var S=t[a];e[a]=Kn(S,o)?y[S]:r}return e}function Ru(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var Sh=Ah(Hf),yo=Hm||function(e,t){return Lt.setTimeout(e,t)},Lu=Ah(ey);function Ch(e,t,o){var a=t+"";return Lu(e,xy(a,Ly(_y(a),o)))}function Ah(e){var t=0,o=0;return function(){var a=Km(),y=Se-(a-o);if(o=a,y>0){if(++t>=Ae)return arguments[0]}else t=0;return e.apply(r,arguments)}}function js(e,t){var o=-1,a=e.length,y=a-1;for(t=t===r?a:t;++o<t;){var S=pu(o,y),k=e[S];e[S]=e[o],e[o]=k}return e.length=t,e}var Dh=Oy(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Mt,function(o,a,y,S){t.push(y?S.replace(ka,"$1"):a||o)}),t});function In(e){if(typeof e=="string"||rn(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Qr(e){if(e!=null){try{return ps.call(e)}catch{}try{return e+""}catch{}}return""}function Ly(e,t){return pn(Z,function(o){var a="_."+o[0];t&o[1]&&!ls(e,a)&&e.push(a)}),e.sort()}function Oh(e){if(e instanceof Xe)return e.clone();var t=new mn(e.__wrapped__,e.__chain__);return t.__actions__=Gt(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function ky(e,t,o){(o?Ut(e,t,o):t===r)?t=1:t=Ct(ze(t),0);var a=e==null?0:e.length;if(!a||t<1)return[];for(var y=0,S=0,k=ie(bs(a/t));y<a;)k[S++]=yn(e,y,y+=t);return k}function Iy(e){for(var t=-1,o=e==null?0:e.length,a=0,y=[];++t<o;){var S=e[t];S&&(y[a++]=S)}return y}function Py(){var e=arguments.length;if(!e)return[];for(var t=ie(e-1),o=arguments[0],a=e;a--;)t[a-1]=arguments[a];return Cr(We(o)?Gt(o):[o],kt(t,1))}var Ny=He(function(e,t){return _t(e)?fo(e,kt(t,1,_t,!0)):[]}),$y=He(function(e,t){var o=_n(t);return _t(o)&&(o=r),_t(e)?fo(e,kt(t,1,_t,!0),$e(o,2)):[]}),By=He(function(e,t){var o=_n(t);return _t(o)&&(o=r),_t(e)?fo(e,kt(t,1,_t,!0),r,o):[]});function jy(e,t,o){var a=e==null?0:e.length;return a?(t=o||t===r?1:ze(t),yn(e,t<0?0:t,a)):[]}function Yy(e,t,o){var a=e==null?0:e.length;return a?(t=o||t===r?1:ze(t),t=a-t,yn(e,0,t<0?0:t)):[]}function Uy(e,t){return e&&e.length?Rs(e,$e(t,3),!0,!0):[]}function Fy(e,t){return e&&e.length?Rs(e,$e(t,3),!0):[]}function Wy(e,t,o,a){var y=e==null?0:e.length;return y?(o&&typeof o!="number"&&Ut(e,t,o)&&(o=0,a=y),Pv(e,t,o,a)):[]}function Th(e,t,o){var a=e==null?0:e.length;if(!a)return-1;var y=o==null?0:ze(o);return y<0&&(y=Ct(a+y,0)),cs(e,$e(t,3),y)}function Mh(e,t,o){var a=e==null?0:e.length;if(!a)return-1;var y=a-1;return o!==r&&(y=ze(o),y=o<0?Ct(a+y,0):Pt(y,a-1)),cs(e,$e(t,3),y,!0)}function Eh(e){var t=e==null?0:e.length;return t?kt(e,1):[]}function zy(e){var t=e==null?0:e.length;return t?kt(e,g):[]}function qy(e,t){var o=e==null?0:e.length;return o?(t=t===r?1:ze(t),kt(e,t)):[]}function Hy(e){for(var t=-1,o=e==null?0:e.length,a={};++t<o;){var y=e[t];a[y[0]]=y[1]}return a}function Rh(e){return e&&e.length?e[0]:r}function Gy(e,t,o){var a=e==null?0:e.length;if(!a)return-1;var y=o==null?0:ze(o);return y<0&&(y=Ct(a+y,0)),mi(e,t,y)}function Vy(e){var t=e==null?0:e.length;return t?yn(e,0,-1):[]}var Zy=He(function(e){var t=pt(e,_u);return t.length&&t[0]===e[0]?lu(t):[]}),Ky=He(function(e){var t=_n(e),o=pt(e,_u);return t===_n(o)?t=r:o.pop(),o.length&&o[0]===e[0]?lu(o,$e(t,2)):[]}),Qy=He(function(e){var t=_n(e),o=pt(e,_u);return t=typeof t=="function"?t:r,t&&o.pop(),o.length&&o[0]===e[0]?lu(o,r,t):[]});function Jy(e,t){return e==null?"":Vm.call(e,t)}function _n(e){var t=e==null?0:e.length;return t?e[t-1]:r}function Xy(e,t,o){var a=e==null?0:e.length;if(!a)return-1;var y=a;return o!==r&&(y=ze(o),y=y<0?Ct(a+y,0):Pt(y,a-1)),t===t?Lm(e,t,y):cs(e,ff,y,!0)}function e2(e,t){return e&&e.length?Ff(e,ze(t)):r}var t2=He(Lh);function Lh(e,t){return e&&e.length&&t&&t.length?du(e,t):e}function n2(e,t,o){return e&&e.length&&t&&t.length?du(e,t,$e(o,2)):e}function r2(e,t,o){return e&&e.length&&t&&t.length?du(e,t,r,o):e}var i2=Zn(function(e,t){var o=e==null?0:e.length,a=ou(e,t);return qf(e,pt(t,function(y){return Kn(y,o)?+y:y}).sort(th)),a});function o2(e,t){var o=[];if(!(e&&e.length))return o;var a=-1,y=[],S=e.length;for(t=$e(t,3);++a<S;){var k=e[a];t(k,a,e)&&(o.push(k),y.push(a))}return qf(e,y),o}function ku(e){return e==null?e:Jm.call(e)}function s2(e,t,o){var a=e==null?0:e.length;return a?(o&&typeof o!="number"&&Ut(e,t,o)?(t=0,o=a):(t=t==null?0:ze(t),o=o===r?a:ze(o)),yn(e,t,o)):[]}function a2(e,t){return Es(e,t)}function u2(e,t,o){return mu(e,t,$e(o,2))}function l2(e,t){var o=e==null?0:e.length;if(o){var a=Es(e,t);if(a<o&&On(e[a],t))return a}return-1}function c2(e,t){return Es(e,t,!0)}function f2(e,t,o){return mu(e,t,$e(o,2),!0)}function h2(e,t){var o=e==null?0:e.length;if(o){var a=Es(e,t,!0)-1;if(On(e[a],t))return a}return-1}function d2(e){return e&&e.length?Gf(e):[]}function p2(e,t){return e&&e.length?Gf(e,$e(t,2)):[]}function g2(e){var t=e==null?0:e.length;return t?yn(e,1,t):[]}function m2(e,t,o){return e&&e.length?(t=o||t===r?1:ze(t),yn(e,0,t<0?0:t)):[]}function v2(e,t,o){var a=e==null?0:e.length;return a?(t=o||t===r?1:ze(t),t=a-t,yn(e,t<0?0:t,a)):[]}function y2(e,t){return e&&e.length?Rs(e,$e(t,3),!1,!0):[]}function _2(e,t){return e&&e.length?Rs(e,$e(t,3)):[]}var w2=He(function(e){return Tr(kt(e,1,_t,!0))}),b2=He(function(e){var t=_n(e);return _t(t)&&(t=r),Tr(kt(e,1,_t,!0),$e(t,2))}),x2=He(function(e){var t=_n(e);return t=typeof t=="function"?t:r,Tr(kt(e,1,_t,!0),r,t)});function S2(e){return e&&e.length?Tr(e):[]}function C2(e,t){return e&&e.length?Tr(e,$e(t,2)):[]}function A2(e,t){return t=typeof t=="function"?t:r,e&&e.length?Tr(e,r,t):[]}function Iu(e){if(!(e&&e.length))return[];var t=0;return e=Sr(e,function(o){if(_t(o))return t=Ct(o.length,t),!0}),Qa(t,function(o){return pt(e,Va(o))})}function kh(e,t){if(!(e&&e.length))return[];var o=Iu(e);return t==null?o:pt(o,function(a){return en(t,r,a)})}var D2=He(function(e,t){return _t(e)?fo(e,t):[]}),O2=He(function(e){return yu(Sr(e,_t))}),T2=He(function(e){var t=_n(e);return _t(t)&&(t=r),yu(Sr(e,_t),$e(t,2))}),M2=He(function(e){var t=_n(e);return t=typeof t=="function"?t:r,yu(Sr(e,_t),r,t)}),E2=He(Iu);function R2(e,t){return Qf(e||[],t||[],co)}function L2(e,t){return Qf(e||[],t||[],go)}var k2=He(function(e){var t=e.length,o=t>1?e[t-1]:r;return o=typeof o=="function"?(e.pop(),o):r,kh(e,o)});function Ih(e){var t=b(e);return t.__chain__=!0,t}function I2(e,t){return t(e),e}function Ys(e,t){return t(e)}var P2=Zn(function(e){var t=e.length,o=t?e[0]:0,a=this.__wrapped__,y=function(S){return ou(S,e)};return t>1||this.__actions__.length||!(a instanceof Xe)||!Kn(o)?this.thru(y):(a=a.slice(o,+o+(t?1:0)),a.__actions__.push({func:Ys,args:[y],thisArg:r}),new mn(a,this.__chain__).thru(function(S){return t&&!S.length&&S.push(r),S}))});function N2(){return Ih(this)}function $2(){return new mn(this.value(),this.__chain__)}function B2(){this.__values__===r&&(this.__values__=Vh(this.value()));var e=this.__index__>=this.__values__.length,t=e?r:this.__values__[this.__index__++];return{done:e,value:t}}function j2(){return this}function Y2(e){for(var t,o=this;o instanceof As;){var a=Oh(o);a.__index__=0,a.__values__=r,t?y.__wrapped__=a:t=a;var y=a;o=o.__wrapped__}return y.__wrapped__=e,t}function U2(){var e=this.__wrapped__;if(e instanceof Xe){var t=e;return this.__actions__.length&&(t=new Xe(this)),t=t.reverse(),t.__actions__.push({func:Ys,args:[ku],thisArg:r}),new mn(t,this.__chain__)}return this.thru(ku)}function F2(){return Kf(this.__wrapped__,this.__actions__)}var W2=Ls(function(e,t,o){st.call(e,o)?++e[o]:Gn(e,o,1)});function z2(e,t,o){var a=We(e)?lf:Iv;return o&&Ut(e,t,o)&&(t=r),a(e,$e(t,3))}function q2(e,t){var o=We(e)?Sr:kf;return o(e,$e(t,3))}var H2=ah(Th),G2=ah(Mh);function V2(e,t){return kt(Us(e,t),1)}function Z2(e,t){return kt(Us(e,t),g)}function K2(e,t,o){return o=o===r?1:ze(o),kt(Us(e,t),o)}function Ph(e,t){var o=We(e)?pn:Or;return o(e,$e(t,3))}function Nh(e,t){var o=We(e)?gm:Lf;return o(e,$e(t,3))}var Q2=Ls(function(e,t,o){st.call(e,o)?e[o].push(t):Gn(e,o,[t])});function J2(e,t,o,a){e=Vt(e)?e:Ti(e),o=o&&!a?ze(o):0;var y=e.length;return o<0&&(o=Ct(y+o,0)),Hs(e)?o<=y&&e.indexOf(t,o)>-1:!!y&&mi(e,t,o)>-1}var X2=He(function(e,t,o){var a=-1,y=typeof t=="function",S=Vt(e)?ie(e.length):[];return Or(e,function(k){S[++a]=y?en(t,k,o):ho(k,t,o)}),S}),e_=Ls(function(e,t,o){Gn(e,o,t)});function Us(e,t){var o=We(e)?pt:jf;return o(e,$e(t,3))}function t_(e,t,o,a){return e==null?[]:(We(t)||(t=t==null?[]:[t]),o=a?r:o,We(o)||(o=o==null?[]:[o]),Wf(e,t,o))}var n_=Ls(function(e,t,o){e[o?0:1].push(t)},function(){return[[],[]]});function r_(e,t,o){var a=We(e)?Ha:df,y=arguments.length<3;return a(e,$e(t,4),o,y,Or)}function i_(e,t,o){var a=We(e)?mm:df,y=arguments.length<3;return a(e,$e(t,4),o,y,Lf)}function o_(e,t){var o=We(e)?Sr:kf;return o(e,zs($e(t,3)))}function s_(e){var t=We(e)?Tf:Jv;return t(e)}function a_(e,t,o){(o?Ut(e,t,o):t===r)?t=1:t=ze(t);var a=We(e)?Mv:Xv;return a(e,t)}function u_(e){var t=We(e)?Ev:ty;return t(e)}function l_(e){if(e==null)return 0;if(Vt(e))return Hs(e)?yi(e):e.length;var t=Nt(e);return t==F||t==M?e.size:fu(e).length}function c_(e,t,o){var a=We(e)?Ga:ny;return o&&Ut(e,t,o)&&(t=r),a(e,$e(t,3))}var f_=He(function(e,t){if(e==null)return[];var o=t.length;return o>1&&Ut(e,t[0],t[1])?t=[]:o>2&&Ut(t[0],t[1],t[2])&&(t=[t[0]]),Wf(e,kt(t,1),[])}),Fs=qm||function(){return Lt.Date.now()};function h_(e,t){if(typeof t!="function")throw new gn(m);return e=ze(e),function(){if(--e<1)return t.apply(this,arguments)}}function $h(e,t,o){return t=o?r:t,t=e&&t==null?e.length:t,Vn(e,oe,r,r,r,r,t)}function Bh(e,t){var o;if(typeof t!="function")throw new gn(m);return e=ze(e),function(){return--e>0&&(o=t.apply(this,arguments)),e<=1&&(t=r),o}}var Pu=He(function(e,t,o){var a=j;if(o.length){var y=Ar(o,Di(Pu));a|=V}return Vn(e,a,t,o,y)}),jh=He(function(e,t,o){var a=j|X;if(o.length){var y=Ar(o,Di(jh));a|=V}return Vn(t,a,e,o,y)});function Yh(e,t,o){t=o?r:t;var a=Vn(e,ne,r,r,r,r,r,t);return a.placeholder=Yh.placeholder,a}function Uh(e,t,o){t=o?r:t;var a=Vn(e,ue,r,r,r,r,r,t);return a.placeholder=Uh.placeholder,a}function Fh(e,t,o){var a,y,S,k,U,G,ge=0,me=!1,we=!1,Te=!0;if(typeof e!="function")throw new gn(m);t=wn(t)||0,gt(o)&&(me=!!o.leading,we="maxWait"in o,S=we?Ct(wn(o.maxWait)||0,t):S,Te="trailing"in o?!!o.trailing:Te);function Pe(wt){var Tn=a,Xn=y;return a=y=r,ge=wt,k=e.apply(Xn,Tn),k}function Be(wt){return ge=wt,U=yo(Qe,t),me?Pe(wt):k}function qe(wt){var Tn=wt-G,Xn=wt-ge,ad=t-Tn;return we?Pt(ad,S-Xn):ad}function je(wt){var Tn=wt-G,Xn=wt-ge;return G===r||Tn>=t||Tn<0||we&&Xn>=S}function Qe(){var wt=Fs();if(je(wt))return tt(wt);U=yo(Qe,qe(wt))}function tt(wt){return U=r,Te&&a?Pe(wt):(a=y=r,k)}function on(){U!==r&&Jf(U),ge=0,a=G=y=U=r}function Ft(){return U===r?k:tt(Fs())}function sn(){var wt=Fs(),Tn=je(wt);if(a=arguments,y=this,G=wt,Tn){if(U===r)return Be(G);if(we)return Jf(U),U=yo(Qe,t),Pe(G)}return U===r&&(U=yo(Qe,t)),k}return sn.cancel=on,sn.flush=Ft,sn}var d_=He(function(e,t){return Rf(e,1,t)}),p_=He(function(e,t,o){return Rf(e,wn(t)||0,o)});function g_(e){return Vn(e,de)}function Ws(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new gn(m);var o=function(){var a=arguments,y=t?t.apply(this,a):a[0],S=o.cache;if(S.has(y))return S.get(y);var k=e.apply(this,a);return o.cache=S.set(y,k)||S,k};return o.cache=new(Ws.Cache||Hn),o}Ws.Cache=Hn;function zs(e){if(typeof e!="function")throw new gn(m);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function m_(e){return Bh(2,e)}var v_=ry(function(e,t){t=t.length==1&&We(t[0])?pt(t[0],tn($e())):pt(kt(t,1),tn($e()));var o=t.length;return He(function(a){for(var y=-1,S=Pt(a.length,o);++y<S;)a[y]=t[y].call(this,a[y]);return en(e,this,a)})}),Nu=He(function(e,t){var o=Ar(t,Di(Nu));return Vn(e,V,r,t,o)}),Wh=He(function(e,t){var o=Ar(t,Di(Wh));return Vn(e,ce,r,t,o)}),y_=Zn(function(e,t){return Vn(e,ee,r,r,r,t)});function __(e,t){if(typeof e!="function")throw new gn(m);return t=t===r?t:ze(t),He(e,t)}function w_(e,t){if(typeof e!="function")throw new gn(m);return t=t==null?0:Ct(ze(t),0),He(function(o){var a=o[t],y=Er(o,0,t);return a&&Cr(y,a),en(e,this,y)})}function b_(e,t,o){var a=!0,y=!0;if(typeof e!="function")throw new gn(m);return gt(o)&&(a="leading"in o?!!o.leading:a,y="trailing"in o?!!o.trailing:y),Fh(e,t,{leading:a,maxWait:t,trailing:y})}function x_(e){return $h(e,1)}function S_(e,t){return Nu(wu(t),e)}function C_(){if(!arguments.length)return[];var e=arguments[0];return We(e)?e:[e]}function A_(e){return vn(e,E)}function D_(e,t){return t=typeof t=="function"?t:r,vn(e,E,t)}function O_(e){return vn(e,R|E)}function T_(e,t){return t=typeof t=="function"?t:r,vn(e,R|E,t)}function M_(e,t){return t==null||Ef(e,t,Ot(t))}function On(e,t){return e===t||e!==e&&t!==t}var E_=Ns(uu),R_=Ns(function(e,t){return e>=t}),Jr=Nf(function(){return arguments}())?Nf:function(e){return yt(e)&&st.call(e,"callee")&&!xf.call(e,"callee")},We=ie.isArray,L_=nf?tn(nf):Yv;function Vt(e){return e!=null&&qs(e.length)&&!Qn(e)}function _t(e){return yt(e)&&Vt(e)}function k_(e){return e===!0||e===!1||yt(e)&&Yt(e)==J}var Rr=Gm||Gu,I_=rf?tn(rf):Uv;function P_(e){return yt(e)&&e.nodeType===1&&!_o(e)}function N_(e){if(e==null)return!0;if(Vt(e)&&(We(e)||typeof e=="string"||typeof e.splice=="function"||Rr(e)||Oi(e)||Jr(e)))return!e.length;var t=Nt(e);if(t==F||t==M)return!e.size;if(vo(e))return!fu(e).length;for(var o in e)if(st.call(e,o))return!1;return!0}function $_(e,t){return po(e,t)}function B_(e,t,o){o=typeof o=="function"?o:r;var a=o?o(e,t):r;return a===r?po(e,t,r,o):!!a}function $u(e){if(!yt(e))return!1;var t=Yt(e);return t==be||t==De||typeof e.message=="string"&&typeof e.name=="string"&&!_o(e)}function j_(e){return typeof e=="number"&&Cf(e)}function Qn(e){if(!gt(e))return!1;var t=Yt(e);return t==P||t==q||t==_e||t==f}function zh(e){return typeof e=="number"&&e==ze(e)}function qs(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=p}function gt(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function yt(e){return e!=null&&typeof e=="object"}var qh=of?tn(of):Wv;function Y_(e,t){return e===t||cu(e,t,Ou(t))}function U_(e,t,o){return o=typeof o=="function"?o:r,cu(e,t,Ou(t),o)}function F_(e){return Hh(e)&&e!=+e}function W_(e){if(Dy(e))throw new Fe(d);return $f(e)}function z_(e){return e===null}function q_(e){return e==null}function Hh(e){return typeof e=="number"||yt(e)&&Yt(e)==K}function _o(e){if(!yt(e)||Yt(e)!=Oe)return!1;var t=ys(e);if(t===null)return!0;var o=st.call(t,"constructor")&&t.constructor;return typeof o=="function"&&o instanceof o&&ps.call(o)==Um}var Bu=sf?tn(sf):zv;function H_(e){return zh(e)&&e>=-9007199254740991&&e<=p}var Gh=af?tn(af):qv;function Hs(e){return typeof e=="string"||!We(e)&&yt(e)&&Yt(e)==W}function rn(e){return typeof e=="symbol"||yt(e)&&Yt(e)==Q}var Oi=uf?tn(uf):Hv;function G_(e){return e===r}function V_(e){return yt(e)&&Nt(e)==Me}function Z_(e){return yt(e)&&Yt(e)==Ie}var K_=Ns(hu),Q_=Ns(function(e,t){return e<=t});function Vh(e){if(!e)return[];if(Vt(e))return Hs(e)?An(e):Gt(e);if(oo&&e[oo])return Mm(e[oo]());var t=Nt(e),o=t==F?Xa:t==M?fs:Ti;return o(e)}function Jn(e){if(!e)return e===0?e:0;if(e=wn(e),e===g||e===-1/0){var t=e<0?-1:1;return t*w}return e===e?e:0}function ze(e){var t=Jn(e),o=t%1;return t===t?o?t-o:t:0}function Zh(e){return e?Vr(ze(e),0,v):0}function wn(e){if(typeof e=="number")return e;if(rn(e))return h;if(gt(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=gt(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=pf(e);var o=jn.test(e);return o||Br.test(e)?hm(e.slice(2),o?2:8):Ht.test(e)?h:+e}function Kh(e){return kn(e,Zt(e))}function J_(e){return e?Vr(ze(e),-9007199254740991,p):e===0?e:0}function ot(e){return e==null?"":nn(e)}var X_=Ci(function(e,t){if(vo(t)||Vt(t)){kn(t,Ot(t),e);return}for(var o in t)st.call(t,o)&&co(e,o,t[o])}),Qh=Ci(function(e,t){kn(t,Zt(t),e)}),Gs=Ci(function(e,t,o,a){kn(t,Zt(t),e,a)}),ew=Ci(function(e,t,o,a){kn(t,Ot(t),e,a)}),tw=Zn(ou);function nw(e,t){var o=Si(e);return t==null?o:Mf(o,t)}var rw=He(function(e,t){e=lt(e);var o=-1,a=t.length,y=a>2?t[2]:r;for(y&&Ut(t[0],t[1],y)&&(a=1);++o<a;)for(var S=t[o],k=Zt(S),U=-1,G=k.length;++U<G;){var ge=k[U],me=e[ge];(me===r||On(me,wi[ge])&&!st.call(e,ge))&&(e[ge]=S[ge])}return e}),iw=He(function(e){return e.push(r,ph),en(Jh,r,e)});function ow(e,t){return cf(e,$e(t,3),Ln)}function sw(e,t){return cf(e,$e(t,3),au)}function aw(e,t){return e==null?e:su(e,$e(t,3),Zt)}function uw(e,t){return e==null?e:If(e,$e(t,3),Zt)}function lw(e,t){return e&&Ln(e,$e(t,3))}function cw(e,t){return e&&au(e,$e(t,3))}function fw(e){return e==null?[]:Ts(e,Ot(e))}function hw(e){return e==null?[]:Ts(e,Zt(e))}function ju(e,t,o){var a=e==null?r:Zr(e,t);return a===r?o:a}function dw(e,t){return e!=null&&vh(e,t,Nv)}function Yu(e,t){return e!=null&&vh(e,t,$v)}var pw=lh(function(e,t,o){t!=null&&typeof t.toString!="function"&&(t=gs.call(t)),e[t]=o},Fu(Kt)),gw=lh(function(e,t,o){t!=null&&typeof t.toString!="function"&&(t=gs.call(t)),st.call(e,t)?e[t].push(o):e[t]=[o]},$e),mw=He(ho);function Ot(e){return Vt(e)?Of(e):fu(e)}function Zt(e){return Vt(e)?Of(e,!0):Gv(e)}function vw(e,t){var o={};return t=$e(t,3),Ln(e,function(a,y,S){Gn(o,t(a,y,S),a)}),o}function yw(e,t){var o={};return t=$e(t,3),Ln(e,function(a,y,S){Gn(o,y,t(a,y,S))}),o}var _w=Ci(function(e,t,o){Ms(e,t,o)}),Jh=Ci(function(e,t,o,a){Ms(e,t,o,a)}),ww=Zn(function(e,t){var o={};if(e==null)return o;var a=!1;t=pt(t,function(S){return S=Mr(S,e),a||(a=S.length>1),S}),kn(e,Au(e),o),a&&(o=vn(o,R|N|E,py));for(var y=t.length;y--;)vu(o,t[y]);return o});function bw(e,t){return Xh(e,zs($e(t)))}var xw=Zn(function(e,t){return e==null?{}:Zv(e,t)});function Xh(e,t){if(e==null)return{};var o=pt(Au(e),function(a){return[a]});return t=$e(t),zf(e,o,function(a,y){return t(a,y[0])})}function Sw(e,t,o){t=Mr(t,e);var a=-1,y=t.length;for(y||(y=1,e=r);++a<y;){var S=e==null?r:e[In(t[a])];S===r&&(a=y,S=o),e=Qn(S)?S.call(e):S}return e}function Cw(e,t,o){return e==null?e:go(e,t,o)}function Aw(e,t,o,a){return a=typeof a=="function"?a:r,e==null?e:go(e,t,o,a)}var ed=hh(Ot),td=hh(Zt);function Dw(e,t,o){var a=We(e),y=a||Rr(e)||Oi(e);if(t=$e(t,4),o==null){var S=e&&e.constructor;y?o=a?new S:[]:gt(e)?o=Qn(S)?Si(ys(e)):{}:o={}}return(y?pn:Ln)(e,function(k,U,G){return t(o,k,U,G)}),o}function Ow(e,t){return e==null?!0:vu(e,t)}function Tw(e,t,o){return e==null?e:Zf(e,t,wu(o))}function Mw(e,t,o,a){return a=typeof a=="function"?a:r,e==null?e:Zf(e,t,wu(o),a)}function Ti(e){return e==null?[]:Ja(e,Ot(e))}function Ew(e){return e==null?[]:Ja(e,Zt(e))}function Rw(e,t,o){return o===r&&(o=t,t=r),o!==r&&(o=wn(o),o=o===o?o:0),t!==r&&(t=wn(t),t=t===t?t:0),Vr(wn(e),t,o)}function Lw(e,t,o){return t=Jn(t),o===r?(o=t,t=0):o=Jn(o),e=wn(e),Bv(e,t,o)}function kw(e,t,o){if(o&&typeof o!="boolean"&&Ut(e,t,o)&&(t=o=r),o===r&&(typeof t=="boolean"?(o=t,t=r):typeof e=="boolean"&&(o=e,e=r)),e===r&&t===r?(e=0,t=1):(e=Jn(e),t===r?(t=e,e=0):t=Jn(t)),e>t){var a=e;e=t,t=a}if(o||e%1||t%1){var y=Af();return Pt(e+y*(t-e+fm("1e-"+((y+"").length-1))),t)}return pu(e,t)}var Iw=Ai(function(e,t,o){return t=t.toLowerCase(),e+(o?nd(t):t)});function nd(e){return Uu(ot(e).toLowerCase())}function rd(e){return e=ot(e),e&&e.replace(Ia,Cm).replace(hn,"")}function Pw(e,t,o){e=ot(e),t=nn(t);var a=e.length;o=o===r?a:Vr(ze(o),0,a);var y=o;return o-=t.length,o>=0&&e.slice(o,y)==t}function Nw(e){return e=ot(e),e&&En.test(e)?e.replace(xn,Am):e}function $w(e){return e=ot(e),e&&gr.test(e)?e.replace(pr,"\\$&"):e}var Bw=Ai(function(e,t,o){return e+(o?"-":"")+t.toLowerCase()}),jw=Ai(function(e,t,o){return e+(o?" ":"")+t.toLowerCase()}),Yw=sh("toLowerCase");function Uw(e,t,o){e=ot(e),t=ze(t);var a=t?yi(e):0;if(!t||a>=t)return e;var y=(t-a)/2;return Ps(xs(y),o)+e+Ps(bs(y),o)}function Fw(e,t,o){e=ot(e),t=ze(t);var a=t?yi(e):0;return t&&a<t?e+Ps(t-a,o):e}function Ww(e,t,o){e=ot(e),t=ze(t);var a=t?yi(e):0;return t&&a<t?Ps(t-a,o)+e:e}function zw(e,t,o){return o||t==null?t=0:t&&(t=+t),Qm(ot(e).replace(mr,""),t||0)}function qw(e,t,o){return(o?Ut(e,t,o):t===r)?t=1:t=ze(t),gu(ot(e),t)}function Hw(){var e=arguments,t=ot(e[0]);return e.length<3?t:t.replace(e[1],e[2])}var Gw=Ai(function(e,t,o){return e+(o?"_":"")+t.toLowerCase()});function Vw(e,t,o){return o&&typeof o!="number"&&Ut(e,t,o)&&(t=o=r),o=o===r?v:o>>>0,o?(e=ot(e),e&&(typeof t=="string"||t!=null&&!Bu(t))&&(t=nn(t),!t&&vi(e))?Er(An(e),0,o):e.split(t,o)):[]}var Zw=Ai(function(e,t,o){return e+(o?" ":"")+Uu(t)});function Kw(e,t,o){return e=ot(e),o=o==null?0:Vr(ze(o),0,e.length),t=nn(t),e.slice(o,o+t.length)==t}function Qw(e,t,o){var a=b.templateSettings;o&&Ut(e,t,o)&&(t=r),e=ot(e),t=Gs({},t,a,dh);var y=Gs({},t.imports,a.imports,dh),S=Ot(y),k=Ja(y,S),U,G,ge=0,me=t.interpolate||vr,we="__p += '",Te=eu((t.escape||vr).source+"|"+me.source+"|"+(me===Sn?Gi:vr).source+"|"+(t.evaluate||vr).source+"|$","g"),Pe="//# sourceURL="+(st.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++sm+"]")+`
127
- `;e.replace(Te,function(je,Qe,tt,on,Ft,sn){return tt||(tt=on),we+=e.slice(ge,sn).replace(Pa,Dm),Qe&&(U=!0,we+=`' +
126
+ `)}function Sy(e){return We(e)||Jr(e)||!!(Sf&&e&&e[Sf])}function Kn(e,t){var o=typeof e;return t=t??p,!!t&&(o=="number"||o!="symbol"&&es.test(e))&&e>-1&&e%1==0&&e<t}function Ut(e,t,o){if(!gt(o))return!1;var a=typeof t;return(a=="number"?Vt(o)&&Kn(t,o.length):a=="string"&&t in o)?On(o[t],e):!1}function Eu(e,t){if(We(e))return!1;var o=typeof e;return o=="number"||o=="symbol"||o=="boolean"||e==null||rn(e)?!0:dt.test(e)||!dr.test(e)||t!=null&&e in lt(t)}function Cy(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Ru(e){var t=$s(e),o=b[t];if(typeof o!="function"||!(t in Xe.prototype))return!1;if(e===o)return!0;var a=Ou(o);return!!a&&e===a[0]}function Ay(e){return!!_f&&_f in e}var Dy=ds?Qn:Vu;function yo(e){var t=e&&e.constructor,o=typeof t=="function"&&t.prototype||wi;return e===o}function _h(e){return e===e&&!gt(e)}function wh(e,t){return function(o){return o==null?!1:o[e]===t&&(t!==r||e in lt(o))}}function Oy(e){var t=Ws(e,function(a){return o.size===C&&o.clear(),a}),o=t.cache;return t}function Ty(e,t){var o=e[1],a=t[1],y=o|a,S=y<(j|J|oe),L=a==oe&&o==ne||a==oe&&o==X&&e[7].length<=t[8]||a==(oe|X)&&t[7].length<=t[8]&&o==ne;if(!(S||L))return e;a&j&&(e[2]=t[2],y|=o&j?0:te);var U=t[3];if(U){var G=e[3];e[3]=G?nh(G,U,t[4]):U,e[4]=G?Ar(e[3],O):t[4]}return U=t[5],U&&(G=e[5],e[5]=G?rh(G,U,t[6]):U,e[6]=G?Ar(e[5],O):t[6]),U=t[7],U&&(e[7]=U),a&oe&&(e[8]=e[8]==null?t[8]:Pt(e[8],t[8])),e[9]==null&&(e[9]=t[9]),e[0]=t[0],e[1]=y,e}function My(e){var t=[];if(e!=null)for(var o in lt(e))t.push(o);return t}function Ey(e){return gs.call(e)}function bh(e,t,o){return t=Ct(t===r?e.length-1:t,0),function(){for(var a=arguments,y=-1,S=Ct(a.length-t,0),L=ie(S);++y<S;)L[y]=a[t+y];y=-1;for(var U=ie(t+1);++y<t;)U[y]=a[y];return U[t]=o(L),en(e,this,U)}}function xh(e,t){return t.length<2?e:Zr(e,yn(t,0,-1))}function Ry(e,t){for(var o=e.length,a=Pt(t.length,o),y=Gt(e);a--;){var S=t[a];e[a]=Kn(S,o)?y[S]:r}return e}function Lu(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var Sh=Ah(Hf),_o=Hm||function(e,t){return Lt.setTimeout(e,t)},ku=Ah(ey);function Ch(e,t,o){var a=t+"";return ku(e,xy(a,Ly(_y(a),o)))}function Ah(e){var t=0,o=0;return function(){var a=Km(),y=Ae-(a-o);if(o=a,y>0){if(++t>=Oe)return arguments[0]}else t=0;return e.apply(r,arguments)}}function js(e,t){var o=-1,a=e.length,y=a-1;for(t=t===r?a:t;++o<t;){var S=gu(o,y),L=e[S];e[S]=e[o],e[o]=L}return e.length=t,e}var Dh=Oy(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Mt,function(o,a,y,S){t.push(y?S.replace(Ia,"$1"):a||o)}),t});function In(e){if(typeof e=="string"||rn(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Qr(e){if(e!=null){try{return ps.call(e)}catch{}try{return e+""}catch{}}return""}function Ly(e,t){return pn(V,function(o){var a="_."+o[0];t&o[1]&&!ls(e,a)&&e.push(a)}),e.sort()}function Oh(e){if(e instanceof Xe)return e.clone();var t=new mn(e.__wrapped__,e.__chain__);return t.__actions__=Gt(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function ky(e,t,o){(o?Ut(e,t,o):t===r)?t=1:t=Ct(ze(t),0);var a=e==null?0:e.length;if(!a||t<1)return[];for(var y=0,S=0,L=ie(bs(a/t));y<a;)L[S++]=yn(e,y,y+=t);return L}function Iy(e){for(var t=-1,o=e==null?0:e.length,a=0,y=[];++t<o;){var S=e[t];S&&(y[a++]=S)}return y}function Py(){var e=arguments.length;if(!e)return[];for(var t=ie(e-1),o=arguments[0],a=e;a--;)t[a-1]=arguments[a];return Cr(We(o)?Gt(o):[o],kt(t,1))}var Ny=He(function(e,t){return _t(e)?ho(e,kt(t,1,_t,!0)):[]}),$y=He(function(e,t){var o=_n(t);return _t(o)&&(o=r),_t(e)?ho(e,kt(t,1,_t,!0),$e(o,2)):[]}),By=He(function(e,t){var o=_n(t);return _t(o)&&(o=r),_t(e)?ho(e,kt(t,1,_t,!0),r,o):[]});function jy(e,t,o){var a=e==null?0:e.length;return a?(t=o||t===r?1:ze(t),yn(e,t<0?0:t,a)):[]}function Yy(e,t,o){var a=e==null?0:e.length;return a?(t=o||t===r?1:ze(t),t=a-t,yn(e,0,t<0?0:t)):[]}function Uy(e,t){return e&&e.length?Rs(e,$e(t,3),!0,!0):[]}function Fy(e,t){return e&&e.length?Rs(e,$e(t,3),!0):[]}function Wy(e,t,o,a){var y=e==null?0:e.length;return y?(o&&typeof o!="number"&&Ut(e,t,o)&&(o=0,a=y),Pv(e,t,o,a)):[]}function Th(e,t,o){var a=e==null?0:e.length;if(!a)return-1;var y=o==null?0:ze(o);return y<0&&(y=Ct(a+y,0)),cs(e,$e(t,3),y)}function Mh(e,t,o){var a=e==null?0:e.length;if(!a)return-1;var y=a-1;return o!==r&&(y=ze(o),y=o<0?Ct(a+y,0):Pt(y,a-1)),cs(e,$e(t,3),y,!0)}function Eh(e){var t=e==null?0:e.length;return t?kt(e,1):[]}function zy(e){var t=e==null?0:e.length;return t?kt(e,g):[]}function qy(e,t){var o=e==null?0:e.length;return o?(t=t===r?1:ze(t),kt(e,t)):[]}function Hy(e){for(var t=-1,o=e==null?0:e.length,a={};++t<o;){var y=e[t];a[y[0]]=y[1]}return a}function Rh(e){return e&&e.length?e[0]:r}function Gy(e,t,o){var a=e==null?0:e.length;if(!a)return-1;var y=o==null?0:ze(o);return y<0&&(y=Ct(a+y,0)),mi(e,t,y)}function Vy(e){var t=e==null?0:e.length;return t?yn(e,0,-1):[]}var Zy=He(function(e){var t=pt(e,wu);return t.length&&t[0]===e[0]?cu(t):[]}),Ky=He(function(e){var t=_n(e),o=pt(e,wu);return t===_n(o)?t=r:o.pop(),o.length&&o[0]===e[0]?cu(o,$e(t,2)):[]}),Qy=He(function(e){var t=_n(e),o=pt(e,wu);return t=typeof t=="function"?t:r,t&&o.pop(),o.length&&o[0]===e[0]?cu(o,r,t):[]});function Jy(e,t){return e==null?"":Vm.call(e,t)}function _n(e){var t=e==null?0:e.length;return t?e[t-1]:r}function Xy(e,t,o){var a=e==null?0:e.length;if(!a)return-1;var y=a;return o!==r&&(y=ze(o),y=y<0?Ct(a+y,0):Pt(y,a-1)),t===t?Lm(e,t,y):cs(e,ff,y,!0)}function e2(e,t){return e&&e.length?Ff(e,ze(t)):r}var t2=He(Lh);function Lh(e,t){return e&&e.length&&t&&t.length?pu(e,t):e}function n2(e,t,o){return e&&e.length&&t&&t.length?pu(e,t,$e(o,2)):e}function r2(e,t,o){return e&&e.length&&t&&t.length?pu(e,t,r,o):e}var i2=Zn(function(e,t){var o=e==null?0:e.length,a=su(e,t);return qf(e,pt(t,function(y){return Kn(y,o)?+y:y}).sort(th)),a});function o2(e,t){var o=[];if(!(e&&e.length))return o;var a=-1,y=[],S=e.length;for(t=$e(t,3);++a<S;){var L=e[a];t(L,a,e)&&(o.push(L),y.push(a))}return qf(e,y),o}function Iu(e){return e==null?e:Jm.call(e)}function s2(e,t,o){var a=e==null?0:e.length;return a?(o&&typeof o!="number"&&Ut(e,t,o)?(t=0,o=a):(t=t==null?0:ze(t),o=o===r?a:ze(o)),yn(e,t,o)):[]}function a2(e,t){return Es(e,t)}function u2(e,t,o){return vu(e,t,$e(o,2))}function l2(e,t){var o=e==null?0:e.length;if(o){var a=Es(e,t);if(a<o&&On(e[a],t))return a}return-1}function c2(e,t){return Es(e,t,!0)}function f2(e,t,o){return vu(e,t,$e(o,2),!0)}function h2(e,t){var o=e==null?0:e.length;if(o){var a=Es(e,t,!0)-1;if(On(e[a],t))return a}return-1}function d2(e){return e&&e.length?Gf(e):[]}function p2(e,t){return e&&e.length?Gf(e,$e(t,2)):[]}function g2(e){var t=e==null?0:e.length;return t?yn(e,1,t):[]}function m2(e,t,o){return e&&e.length?(t=o||t===r?1:ze(t),yn(e,0,t<0?0:t)):[]}function v2(e,t,o){var a=e==null?0:e.length;return a?(t=o||t===r?1:ze(t),t=a-t,yn(e,t<0?0:t,a)):[]}function y2(e,t){return e&&e.length?Rs(e,$e(t,3),!1,!0):[]}function _2(e,t){return e&&e.length?Rs(e,$e(t,3)):[]}var w2=He(function(e){return Tr(kt(e,1,_t,!0))}),b2=He(function(e){var t=_n(e);return _t(t)&&(t=r),Tr(kt(e,1,_t,!0),$e(t,2))}),x2=He(function(e){var t=_n(e);return t=typeof t=="function"?t:r,Tr(kt(e,1,_t,!0),r,t)});function S2(e){return e&&e.length?Tr(e):[]}function C2(e,t){return e&&e.length?Tr(e,$e(t,2)):[]}function A2(e,t){return t=typeof t=="function"?t:r,e&&e.length?Tr(e,r,t):[]}function Pu(e){if(!(e&&e.length))return[];var t=0;return e=Sr(e,function(o){if(_t(o))return t=Ct(o.length,t),!0}),Ja(t,function(o){return pt(e,Za(o))})}function kh(e,t){if(!(e&&e.length))return[];var o=Pu(e);return t==null?o:pt(o,function(a){return en(t,r,a)})}var D2=He(function(e,t){return _t(e)?ho(e,t):[]}),O2=He(function(e){return _u(Sr(e,_t))}),T2=He(function(e){var t=_n(e);return _t(t)&&(t=r),_u(Sr(e,_t),$e(t,2))}),M2=He(function(e){var t=_n(e);return t=typeof t=="function"?t:r,_u(Sr(e,_t),r,t)}),E2=He(Pu);function R2(e,t){return Qf(e||[],t||[],fo)}function L2(e,t){return Qf(e||[],t||[],mo)}var k2=He(function(e){var t=e.length,o=t>1?e[t-1]:r;return o=typeof o=="function"?(e.pop(),o):r,kh(e,o)});function Ih(e){var t=b(e);return t.__chain__=!0,t}function I2(e,t){return t(e),e}function Ys(e,t){return t(e)}var P2=Zn(function(e){var t=e.length,o=t?e[0]:0,a=this.__wrapped__,y=function(S){return su(S,e)};return t>1||this.__actions__.length||!(a instanceof Xe)||!Kn(o)?this.thru(y):(a=a.slice(o,+o+(t?1:0)),a.__actions__.push({func:Ys,args:[y],thisArg:r}),new mn(a,this.__chain__).thru(function(S){return t&&!S.length&&S.push(r),S}))});function N2(){return Ih(this)}function $2(){return new mn(this.value(),this.__chain__)}function B2(){this.__values__===r&&(this.__values__=Vh(this.value()));var e=this.__index__>=this.__values__.length,t=e?r:this.__values__[this.__index__++];return{done:e,value:t}}function j2(){return this}function Y2(e){for(var t,o=this;o instanceof As;){var a=Oh(o);a.__index__=0,a.__values__=r,t?y.__wrapped__=a:t=a;var y=a;o=o.__wrapped__}return y.__wrapped__=e,t}function U2(){var e=this.__wrapped__;if(e instanceof Xe){var t=e;return this.__actions__.length&&(t=new Xe(this)),t=t.reverse(),t.__actions__.push({func:Ys,args:[Iu],thisArg:r}),new mn(t,this.__chain__)}return this.thru(Iu)}function F2(){return Kf(this.__wrapped__,this.__actions__)}var W2=Ls(function(e,t,o){st.call(e,o)?++e[o]:Gn(e,o,1)});function z2(e,t,o){var a=We(e)?lf:Iv;return o&&Ut(e,t,o)&&(t=r),a(e,$e(t,3))}function q2(e,t){var o=We(e)?Sr:kf;return o(e,$e(t,3))}var H2=ah(Th),G2=ah(Mh);function V2(e,t){return kt(Us(e,t),1)}function Z2(e,t){return kt(Us(e,t),g)}function K2(e,t,o){return o=o===r?1:ze(o),kt(Us(e,t),o)}function Ph(e,t){var o=We(e)?pn:Or;return o(e,$e(t,3))}function Nh(e,t){var o=We(e)?gm:Lf;return o(e,$e(t,3))}var Q2=Ls(function(e,t,o){st.call(e,o)?e[o].push(t):Gn(e,o,[t])});function J2(e,t,o,a){e=Vt(e)?e:Ti(e),o=o&&!a?ze(o):0;var y=e.length;return o<0&&(o=Ct(y+o,0)),Hs(e)?o<=y&&e.indexOf(t,o)>-1:!!y&&mi(e,t,o)>-1}var X2=He(function(e,t,o){var a=-1,y=typeof t=="function",S=Vt(e)?ie(e.length):[];return Or(e,function(L){S[++a]=y?en(t,L,o):po(L,t,o)}),S}),e_=Ls(function(e,t,o){Gn(e,o,t)});function Us(e,t){var o=We(e)?pt:jf;return o(e,$e(t,3))}function t_(e,t,o,a){return e==null?[]:(We(t)||(t=t==null?[]:[t]),o=a?r:o,We(o)||(o=o==null?[]:[o]),Wf(e,t,o))}var n_=Ls(function(e,t,o){e[o?0:1].push(t)},function(){return[[],[]]});function r_(e,t,o){var a=We(e)?Ga:df,y=arguments.length<3;return a(e,$e(t,4),o,y,Or)}function i_(e,t,o){var a=We(e)?mm:df,y=arguments.length<3;return a(e,$e(t,4),o,y,Lf)}function o_(e,t){var o=We(e)?Sr:kf;return o(e,zs($e(t,3)))}function s_(e){var t=We(e)?Tf:Jv;return t(e)}function a_(e,t,o){(o?Ut(e,t,o):t===r)?t=1:t=ze(t);var a=We(e)?Mv:Xv;return a(e,t)}function u_(e){var t=We(e)?Ev:ty;return t(e)}function l_(e){if(e==null)return 0;if(Vt(e))return Hs(e)?yi(e):e.length;var t=Nt(e);return t==F||t==k?e.size:hu(e).length}function c_(e,t,o){var a=We(e)?Va:ny;return o&&Ut(e,t,o)&&(t=r),a(e,$e(t,3))}var f_=He(function(e,t){if(e==null)return[];var o=t.length;return o>1&&Ut(e,t[0],t[1])?t=[]:o>2&&Ut(t[0],t[1],t[2])&&(t=[t[0]]),Wf(e,kt(t,1),[])}),Fs=qm||function(){return Lt.Date.now()};function h_(e,t){if(typeof t!="function")throw new gn(m);return e=ze(e),function(){if(--e<1)return t.apply(this,arguments)}}function $h(e,t,o){return t=o?r:t,t=e&&t==null?e.length:t,Vn(e,oe,r,r,r,r,t)}function Bh(e,t){var o;if(typeof t!="function")throw new gn(m);return e=ze(e),function(){return--e>0&&(o=t.apply(this,arguments)),e<=1&&(t=r),o}}var Nu=He(function(e,t,o){var a=j;if(o.length){var y=Ar(o,Di(Nu));a|=Z}return Vn(e,a,t,o,y)}),jh=He(function(e,t,o){var a=j|J;if(o.length){var y=Ar(o,Di(jh));a|=Z}return Vn(t,a,e,o,y)});function Yh(e,t,o){t=o?r:t;var a=Vn(e,ne,r,r,r,r,r,t);return a.placeholder=Yh.placeholder,a}function Uh(e,t,o){t=o?r:t;var a=Vn(e,ue,r,r,r,r,r,t);return a.placeholder=Uh.placeholder,a}function Fh(e,t,o){var a,y,S,L,U,G,pe=0,ge=!1,xe=!1,Me=!0;if(typeof e!="function")throw new gn(m);t=wn(t)||0,gt(o)&&(ge=!!o.leading,xe="maxWait"in o,S=xe?Ct(wn(o.maxWait)||0,t):S,Me="trailing"in o?!!o.trailing:Me);function Pe(wt){var Tn=a,Xn=y;return a=y=r,pe=wt,L=e.apply(Xn,Tn),L}function Be(wt){return pe=wt,U=_o(Qe,t),ge?Pe(wt):L}function qe(wt){var Tn=wt-G,Xn=wt-pe,ad=t-Tn;return xe?Pt(ad,S-Xn):ad}function je(wt){var Tn=wt-G,Xn=wt-pe;return G===r||Tn>=t||Tn<0||xe&&Xn>=S}function Qe(){var wt=Fs();if(je(wt))return tt(wt);U=_o(Qe,qe(wt))}function tt(wt){return U=r,Me&&a?Pe(wt):(a=y=r,L)}function on(){U!==r&&Jf(U),pe=0,a=G=y=U=r}function Ft(){return U===r?L:tt(Fs())}function sn(){var wt=Fs(),Tn=je(wt);if(a=arguments,y=this,G=wt,Tn){if(U===r)return Be(G);if(xe)return Jf(U),U=_o(Qe,t),Pe(G)}return U===r&&(U=_o(Qe,t)),L}return sn.cancel=on,sn.flush=Ft,sn}var d_=He(function(e,t){return Rf(e,1,t)}),p_=He(function(e,t,o){return Rf(e,wn(t)||0,o)});function g_(e){return Vn(e,me)}function Ws(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new gn(m);var o=function(){var a=arguments,y=t?t.apply(this,a):a[0],S=o.cache;if(S.has(y))return S.get(y);var L=e.apply(this,a);return o.cache=S.set(y,L)||S,L};return o.cache=new(Ws.Cache||Hn),o}Ws.Cache=Hn;function zs(e){if(typeof e!="function")throw new gn(m);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function m_(e){return Bh(2,e)}var v_=ry(function(e,t){t=t.length==1&&We(t[0])?pt(t[0],tn($e())):pt(kt(t,1),tn($e()));var o=t.length;return He(function(a){for(var y=-1,S=Pt(a.length,o);++y<S;)a[y]=t[y].call(this,a[y]);return en(e,this,a)})}),$u=He(function(e,t){var o=Ar(t,Di($u));return Vn(e,Z,r,t,o)}),Wh=He(function(e,t){var o=Ar(t,Di(Wh));return Vn(e,le,r,t,o)}),y_=Zn(function(e,t){return Vn(e,X,r,r,r,t)});function __(e,t){if(typeof e!="function")throw new gn(m);return t=t===r?t:ze(t),He(e,t)}function w_(e,t){if(typeof e!="function")throw new gn(m);return t=t==null?0:Ct(ze(t),0),He(function(o){var a=o[t],y=Er(o,0,t);return a&&Cr(y,a),en(e,this,y)})}function b_(e,t,o){var a=!0,y=!0;if(typeof e!="function")throw new gn(m);return gt(o)&&(a="leading"in o?!!o.leading:a,y="trailing"in o?!!o.trailing:y),Fh(e,t,{leading:a,maxWait:t,trailing:y})}function x_(e){return $h(e,1)}function S_(e,t){return $u(bu(t),e)}function C_(){if(!arguments.length)return[];var e=arguments[0];return We(e)?e:[e]}function A_(e){return vn(e,M)}function D_(e,t){return t=typeof t=="function"?t:r,vn(e,M,t)}function O_(e){return vn(e,E|M)}function T_(e,t){return t=typeof t=="function"?t:r,vn(e,E|M,t)}function M_(e,t){return t==null||Ef(e,t,Ot(t))}function On(e,t){return e===t||e!==e&&t!==t}var E_=Ns(lu),R_=Ns(function(e,t){return e>=t}),Jr=Nf(function(){return arguments}())?Nf:function(e){return yt(e)&&st.call(e,"callee")&&!xf.call(e,"callee")},We=ie.isArray,L_=nf?tn(nf):Yv;function Vt(e){return e!=null&&qs(e.length)&&!Qn(e)}function _t(e){return yt(e)&&Vt(e)}function k_(e){return e===!0||e===!1||yt(e)&&Yt(e)==ee}var Rr=Gm||Vu,I_=rf?tn(rf):Uv;function P_(e){return yt(e)&&e.nodeType===1&&!wo(e)}function N_(e){if(e==null)return!0;if(Vt(e)&&(We(e)||typeof e=="string"||typeof e.splice=="function"||Rr(e)||Oi(e)||Jr(e)))return!e.length;var t=Nt(e);if(t==F||t==k)return!e.size;if(yo(e))return!hu(e).length;for(var o in e)if(st.call(e,o))return!1;return!0}function $_(e,t){return go(e,t)}function B_(e,t,o){o=typeof o=="function"?o:r;var a=o?o(e,t):r;return a===r?go(e,t,r,o):!!a}function Bu(e){if(!yt(e))return!1;var t=Yt(e);return t==_e||t==De||typeof e.message=="string"&&typeof e.name=="string"&&!wo(e)}function j_(e){return typeof e=="number"&&Cf(e)}function Qn(e){if(!gt(e))return!1;var t=Yt(e);return t==P||t==z||t==we||t==f}function zh(e){return typeof e=="number"&&e==ze(e)}function qs(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=p}function gt(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function yt(e){return e!=null&&typeof e=="object"}var qh=of?tn(of):Wv;function Y_(e,t){return e===t||fu(e,t,Tu(t))}function U_(e,t,o){return o=typeof o=="function"?o:r,fu(e,t,Tu(t),o)}function F_(e){return Hh(e)&&e!=+e}function W_(e){if(Dy(e))throw new Fe(d);return $f(e)}function z_(e){return e===null}function q_(e){return e==null}function Hh(e){return typeof e=="number"||yt(e)&&Yt(e)==K}function wo(e){if(!yt(e)||Yt(e)!=Te)return!1;var t=ys(e);if(t===null)return!0;var o=st.call(t,"constructor")&&t.constructor;return typeof o=="function"&&o instanceof o&&ps.call(o)==Um}var ju=sf?tn(sf):zv;function H_(e){return zh(e)&&e>=-9007199254740991&&e<=p}var Gh=af?tn(af):qv;function Hs(e){return typeof e=="string"||!We(e)&&yt(e)&&Yt(e)==q}function rn(e){return typeof e=="symbol"||yt(e)&&Yt(e)==Q}var Oi=uf?tn(uf):Hv;function G_(e){return e===r}function V_(e){return yt(e)&&Nt(e)==be}function Z_(e){return yt(e)&&Yt(e)==Re}var K_=Ns(du),Q_=Ns(function(e,t){return e<=t});function Vh(e){if(!e)return[];if(Vt(e))return Hs(e)?An(e):Gt(e);if(so&&e[so])return Mm(e[so]());var t=Nt(e),o=t==F?eu:t==k?fs:Ti;return o(e)}function Jn(e){if(!e)return e===0?e:0;if(e=wn(e),e===g||e===-1/0){var t=e<0?-1:1;return t*w}return e===e?e:0}function ze(e){var t=Jn(e),o=t%1;return t===t?o?t-o:t:0}function Zh(e){return e?Vr(ze(e),0,v):0}function wn(e){if(typeof e=="number")return e;if(rn(e))return h;if(gt(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=gt(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=pf(e);var o=jn.test(e);return o||Br.test(e)?hm(e.slice(2),o?2:8):Ht.test(e)?h:+e}function Kh(e){return kn(e,Zt(e))}function J_(e){return e?Vr(ze(e),-9007199254740991,p):e===0?e:0}function ot(e){return e==null?"":nn(e)}var X_=Ci(function(e,t){if(yo(t)||Vt(t)){kn(t,Ot(t),e);return}for(var o in t)st.call(t,o)&&fo(e,o,t[o])}),Qh=Ci(function(e,t){kn(t,Zt(t),e)}),Gs=Ci(function(e,t,o,a){kn(t,Zt(t),e,a)}),ew=Ci(function(e,t,o,a){kn(t,Ot(t),e,a)}),tw=Zn(su);function nw(e,t){var o=Si(e);return t==null?o:Mf(o,t)}var rw=He(function(e,t){e=lt(e);var o=-1,a=t.length,y=a>2?t[2]:r;for(y&&Ut(t[0],t[1],y)&&(a=1);++o<a;)for(var S=t[o],L=Zt(S),U=-1,G=L.length;++U<G;){var pe=L[U],ge=e[pe];(ge===r||On(ge,wi[pe])&&!st.call(e,pe))&&(e[pe]=S[pe])}return e}),iw=He(function(e){return e.push(r,ph),en(Jh,r,e)});function ow(e,t){return cf(e,$e(t,3),Ln)}function sw(e,t){return cf(e,$e(t,3),uu)}function aw(e,t){return e==null?e:au(e,$e(t,3),Zt)}function uw(e,t){return e==null?e:If(e,$e(t,3),Zt)}function lw(e,t){return e&&Ln(e,$e(t,3))}function cw(e,t){return e&&uu(e,$e(t,3))}function fw(e){return e==null?[]:Ts(e,Ot(e))}function hw(e){return e==null?[]:Ts(e,Zt(e))}function Yu(e,t,o){var a=e==null?r:Zr(e,t);return a===r?o:a}function dw(e,t){return e!=null&&vh(e,t,Nv)}function Uu(e,t){return e!=null&&vh(e,t,$v)}var pw=lh(function(e,t,o){t!=null&&typeof t.toString!="function"&&(t=gs.call(t)),e[t]=o},Wu(Kt)),gw=lh(function(e,t,o){t!=null&&typeof t.toString!="function"&&(t=gs.call(t)),st.call(e,t)?e[t].push(o):e[t]=[o]},$e),mw=He(po);function Ot(e){return Vt(e)?Of(e):hu(e)}function Zt(e){return Vt(e)?Of(e,!0):Gv(e)}function vw(e,t){var o={};return t=$e(t,3),Ln(e,function(a,y,S){Gn(o,t(a,y,S),a)}),o}function yw(e,t){var o={};return t=$e(t,3),Ln(e,function(a,y,S){Gn(o,y,t(a,y,S))}),o}var _w=Ci(function(e,t,o){Ms(e,t,o)}),Jh=Ci(function(e,t,o,a){Ms(e,t,o,a)}),ww=Zn(function(e,t){var o={};if(e==null)return o;var a=!1;t=pt(t,function(S){return S=Mr(S,e),a||(a=S.length>1),S}),kn(e,Du(e),o),a&&(o=vn(o,E|N|M,py));for(var y=t.length;y--;)yu(o,t[y]);return o});function bw(e,t){return Xh(e,zs($e(t)))}var xw=Zn(function(e,t){return e==null?{}:Zv(e,t)});function Xh(e,t){if(e==null)return{};var o=pt(Du(e),function(a){return[a]});return t=$e(t),zf(e,o,function(a,y){return t(a,y[0])})}function Sw(e,t,o){t=Mr(t,e);var a=-1,y=t.length;for(y||(y=1,e=r);++a<y;){var S=e==null?r:e[In(t[a])];S===r&&(a=y,S=o),e=Qn(S)?S.call(e):S}return e}function Cw(e,t,o){return e==null?e:mo(e,t,o)}function Aw(e,t,o,a){return a=typeof a=="function"?a:r,e==null?e:mo(e,t,o,a)}var ed=hh(Ot),td=hh(Zt);function Dw(e,t,o){var a=We(e),y=a||Rr(e)||Oi(e);if(t=$e(t,4),o==null){var S=e&&e.constructor;y?o=a?new S:[]:gt(e)?o=Qn(S)?Si(ys(e)):{}:o={}}return(y?pn:Ln)(e,function(L,U,G){return t(o,L,U,G)}),o}function Ow(e,t){return e==null?!0:yu(e,t)}function Tw(e,t,o){return e==null?e:Zf(e,t,bu(o))}function Mw(e,t,o,a){return a=typeof a=="function"?a:r,e==null?e:Zf(e,t,bu(o),a)}function Ti(e){return e==null?[]:Xa(e,Ot(e))}function Ew(e){return e==null?[]:Xa(e,Zt(e))}function Rw(e,t,o){return o===r&&(o=t,t=r),o!==r&&(o=wn(o),o=o===o?o:0),t!==r&&(t=wn(t),t=t===t?t:0),Vr(wn(e),t,o)}function Lw(e,t,o){return t=Jn(t),o===r?(o=t,t=0):o=Jn(o),e=wn(e),Bv(e,t,o)}function kw(e,t,o){if(o&&typeof o!="boolean"&&Ut(e,t,o)&&(t=o=r),o===r&&(typeof t=="boolean"?(o=t,t=r):typeof e=="boolean"&&(o=e,e=r)),e===r&&t===r?(e=0,t=1):(e=Jn(e),t===r?(t=e,e=0):t=Jn(t)),e>t){var a=e;e=t,t=a}if(o||e%1||t%1){var y=Af();return Pt(e+y*(t-e+fm("1e-"+((y+"").length-1))),t)}return gu(e,t)}var Iw=Ai(function(e,t,o){return t=t.toLowerCase(),e+(o?nd(t):t)});function nd(e){return Fu(ot(e).toLowerCase())}function rd(e){return e=ot(e),e&&e.replace(Pa,Cm).replace(hn,"")}function Pw(e,t,o){e=ot(e),t=nn(t);var a=e.length;o=o===r?a:Vr(ze(o),0,a);var y=o;return o-=t.length,o>=0&&e.slice(o,y)==t}function Nw(e){return e=ot(e),e&&En.test(e)?e.replace(xn,Am):e}function $w(e){return e=ot(e),e&&gr.test(e)?e.replace(pr,"\\$&"):e}var Bw=Ai(function(e,t,o){return e+(o?"-":"")+t.toLowerCase()}),jw=Ai(function(e,t,o){return e+(o?" ":"")+t.toLowerCase()}),Yw=sh("toLowerCase");function Uw(e,t,o){e=ot(e),t=ze(t);var a=t?yi(e):0;if(!t||a>=t)return e;var y=(t-a)/2;return Ps(xs(y),o)+e+Ps(bs(y),o)}function Fw(e,t,o){e=ot(e),t=ze(t);var a=t?yi(e):0;return t&&a<t?e+Ps(t-a,o):e}function Ww(e,t,o){e=ot(e),t=ze(t);var a=t?yi(e):0;return t&&a<t?Ps(t-a,o)+e:e}function zw(e,t,o){return o||t==null?t=0:t&&(t=+t),Qm(ot(e).replace(mr,""),t||0)}function qw(e,t,o){return(o?Ut(e,t,o):t===r)?t=1:t=ze(t),mu(ot(e),t)}function Hw(){var e=arguments,t=ot(e[0]);return e.length<3?t:t.replace(e[1],e[2])}var Gw=Ai(function(e,t,o){return e+(o?"_":"")+t.toLowerCase()});function Vw(e,t,o){return o&&typeof o!="number"&&Ut(e,t,o)&&(t=o=r),o=o===r?v:o>>>0,o?(e=ot(e),e&&(typeof t=="string"||t!=null&&!ju(t))&&(t=nn(t),!t&&vi(e))?Er(An(e),0,o):e.split(t,o)):[]}var Zw=Ai(function(e,t,o){return e+(o?" ":"")+Fu(t)});function Kw(e,t,o){return e=ot(e),o=o==null?0:Vr(ze(o),0,e.length),t=nn(t),e.slice(o,o+t.length)==t}function Qw(e,t,o){var a=b.templateSettings;o&&Ut(e,t,o)&&(t=r),e=ot(e),t=Gs({},t,a,dh);var y=Gs({},t.imports,a.imports,dh),S=Ot(y),L=Xa(y,S),U,G,pe=0,ge=t.interpolate||vr,xe="__p += '",Me=tu((t.escape||vr).source+"|"+ge.source+"|"+(ge===Sn?Vi:vr).source+"|"+(t.evaluate||vr).source+"|$","g"),Pe="//# sourceURL="+(st.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++sm+"]")+`
127
+ `;e.replace(Me,function(je,Qe,tt,on,Ft,sn){return tt||(tt=on),xe+=e.slice(pe,sn).replace(Na,Dm),Qe&&(U=!0,xe+=`' +
128
128
  __e(`+Qe+`) +
129
- '`),Ft&&(G=!0,we+=`';
129
+ '`),Ft&&(G=!0,xe+=`';
130
130
  `+Ft+`;
131
- __p += '`),tt&&(we+=`' +
131
+ __p += '`),tt&&(xe+=`' +
132
132
  ((__t = (`+tt+`)) == null ? '' : __t) +
133
- '`),ge=sn+je.length,je}),we+=`';
134
- `;var Be=st.call(t,"variable")&&t.variable;if(!Be)we=`with (obj) {
135
- `+we+`
133
+ '`),pe=sn+je.length,je}),xe+=`';
134
+ `;var Be=st.call(t,"variable")&&t.variable;if(!Be)xe=`with (obj) {
135
+ `+xe+`
136
136
  }
137
- `;else if(Rt.test(Be))throw new Fe(c);we=(G?we.replace(Dt,""):we).replace($n,"$1").replace(fn,"$1;"),we="function("+(Be||"obj")+`) {
137
+ `;else if(Rt.test(Be))throw new Fe(c);xe=(G?xe.replace(Dt,""):xe).replace($n,"$1").replace(fn,"$1;"),xe="function("+(Be||"obj")+`) {
138
138
  `+(Be?"":`obj || (obj = {});
139
139
  `)+"var __t, __p = ''"+(U?", __e = _.escape":"")+(G?`, __j = Array.prototype.join;
140
140
  function print() { __p += __j.call(arguments, '') }
141
141
  `:`;
142
- `)+we+`return __p
143
- }`;var qe=od(function(){return nt(S,Pe+"return "+we).apply(r,k)});if(qe.source=we,$u(qe))throw qe;return qe}function Jw(e){return ot(e).toLowerCase()}function Xw(e){return ot(e).toUpperCase()}function eb(e,t,o){if(e=ot(e),e&&(o||t===r))return pf(e);if(!e||!(t=nn(t)))return e;var a=An(e),y=An(t),S=gf(a,y),k=mf(a,y)+1;return Er(a,S,k).join("")}function tb(e,t,o){if(e=ot(e),e&&(o||t===r))return e.slice(0,yf(e)+1);if(!e||!(t=nn(t)))return e;var a=An(e),y=mf(a,An(t))+1;return Er(a,0,y).join("")}function nb(e,t,o){if(e=ot(e),e&&(o||t===r))return e.replace(mr,"");if(!e||!(t=nn(t)))return e;var a=An(e),y=gf(a,An(t));return Er(a,y).join("")}function rb(e,t){var o=pe,a=re;if(gt(t)){var y="separator"in t?t.separator:y;o="length"in t?ze(t.length):o,a="omission"in t?nn(t.omission):a}e=ot(e);var S=e.length;if(vi(e)){var k=An(e);S=k.length}if(o>=S)return e;var U=o-yi(a);if(U<1)return a;var G=k?Er(k,0,U).join(""):e.slice(0,U);if(y===r)return G+a;if(k&&(U+=G.length-U),Bu(y)){if(e.slice(U).search(y)){var ge,me=G;for(y.global||(y=eu(y.source,ot(Vi.exec(y))+"g")),y.lastIndex=0;ge=y.exec(me);)var we=ge.index;G=G.slice(0,we===r?U:we)}}else if(e.indexOf(nn(y),U)!=U){var Te=G.lastIndexOf(y);Te>-1&&(G=G.slice(0,Te))}return G+a}function ib(e){return e=ot(e),e&&Bn.test(e)?e.replace(Qt,km):e}var ob=Ai(function(e,t,o){return e+(o?" ":"")+t.toUpperCase()}),Uu=sh("toUpperCase");function id(e,t,o){return e=ot(e),t=o?r:t,t===r?Tm(e)?Nm(e):_m(e):e.match(t)||[]}var od=He(function(e,t){try{return en(e,r,t)}catch(o){return $u(o)?o:new Fe(o)}}),sb=Zn(function(e,t){return pn(t,function(o){o=In(o),Gn(e,o,Pu(e[o],e))}),e});function ab(e){var t=e==null?0:e.length,o=$e();return e=t?pt(e,function(a){if(typeof a[1]!="function")throw new gn(m);return[o(a[0]),a[1]]}):[],He(function(a){for(var y=-1;++y<t;){var S=e[y];if(en(S[0],this,a))return en(S[1],this,a)}})}function ub(e){return kv(vn(e,R))}function Fu(e){return function(){return e}}function lb(e,t){return e==null||e!==e?t:e}var cb=uh(),fb=uh(!0);function Kt(e){return e}function Wu(e){return Bf(typeof e=="function"?e:vn(e,R))}function hb(e){return Yf(vn(e,R))}function db(e,t){return Uf(e,vn(t,R))}var pb=He(function(e,t){return function(o){return ho(o,e,t)}}),gb=He(function(e,t){return function(o){return ho(e,o,t)}});function zu(e,t,o){var a=Ot(t),y=Ts(t,a);o==null&&!(gt(t)&&(y.length||!a.length))&&(o=t,t=e,e=this,y=Ts(t,Ot(t)));var S=!(gt(o)&&"chain"in o)||!!o.chain,k=Qn(e);return pn(y,function(U){var G=t[U];e[U]=G,k&&(e.prototype[U]=function(){var ge=this.__chain__;if(S||ge){var me=e(this.__wrapped__),we=me.__actions__=Gt(this.__actions__);return we.push({func:G,args:arguments,thisArg:e}),me.__chain__=ge,me}return G.apply(e,Cr([this.value()],arguments))})}),e}function mb(){return Lt._===this&&(Lt._=Fm),this}function qu(){}function vb(e){return e=ze(e),He(function(t){return Ff(t,e)})}var yb=xu(pt),_b=xu(lf),wb=xu(Ga);function sd(e){return Mu(e)?Va(In(e)):Kv(e)}function bb(e){return function(t){return e==null?r:Zr(e,t)}}var xb=ch(),Sb=ch(!0);function Hu(){return[]}function Gu(){return!1}function Cb(){return{}}function Ab(){return""}function Db(){return!0}function Ob(e,t){if(e=ze(e),e<1||e>p)return[];var o=v,a=Pt(e,v);t=$e(t),e-=v;for(var y=Qa(a,t);++o<e;)t(o);return y}function Tb(e){return We(e)?pt(e,In):rn(e)?[e]:Gt(Dh(ot(e)))}function Mb(e){var t=++Ym;return ot(e)+t}var Eb=Is(function(e,t){return e+t},0),Rb=Su("ceil"),Lb=Is(function(e,t){return e/t},1),kb=Su("floor");function Ib(e){return e&&e.length?Os(e,Kt,uu):r}function Pb(e,t){return e&&e.length?Os(e,$e(t,2),uu):r}function Nb(e){return hf(e,Kt)}function $b(e,t){return hf(e,$e(t,2))}function Bb(e){return e&&e.length?Os(e,Kt,hu):r}function jb(e,t){return e&&e.length?Os(e,$e(t,2),hu):r}var Yb=Is(function(e,t){return e*t},1),Ub=Su("round"),Fb=Is(function(e,t){return e-t},0);function Wb(e){return e&&e.length?Ka(e,Kt):0}function zb(e,t){return e&&e.length?Ka(e,$e(t,2)):0}return b.after=h_,b.ary=$h,b.assign=X_,b.assignIn=Qh,b.assignInWith=Gs,b.assignWith=ew,b.at=tw,b.before=Bh,b.bind=Pu,b.bindAll=sb,b.bindKey=jh,b.castArray=C_,b.chain=Ih,b.chunk=ky,b.compact=Iy,b.concat=Py,b.cond=ab,b.conforms=ub,b.constant=Fu,b.countBy=W2,b.create=nw,b.curry=Yh,b.curryRight=Uh,b.debounce=Fh,b.defaults=rw,b.defaultsDeep=iw,b.defer=d_,b.delay=p_,b.difference=Ny,b.differenceBy=$y,b.differenceWith=By,b.drop=jy,b.dropRight=Yy,b.dropRightWhile=Uy,b.dropWhile=Fy,b.fill=Wy,b.filter=q2,b.flatMap=V2,b.flatMapDeep=Z2,b.flatMapDepth=K2,b.flatten=Eh,b.flattenDeep=zy,b.flattenDepth=qy,b.flip=g_,b.flow=cb,b.flowRight=fb,b.fromPairs=Hy,b.functions=fw,b.functionsIn=hw,b.groupBy=Q2,b.initial=Vy,b.intersection=Zy,b.intersectionBy=Ky,b.intersectionWith=Qy,b.invert=pw,b.invertBy=gw,b.invokeMap=X2,b.iteratee=Wu,b.keyBy=e_,b.keys=Ot,b.keysIn=Zt,b.map=Us,b.mapKeys=vw,b.mapValues=yw,b.matches=hb,b.matchesProperty=db,b.memoize=Ws,b.merge=_w,b.mergeWith=Jh,b.method=pb,b.methodOf=gb,b.mixin=zu,b.negate=zs,b.nthArg=vb,b.omit=ww,b.omitBy=bw,b.once=m_,b.orderBy=t_,b.over=yb,b.overArgs=v_,b.overEvery=_b,b.overSome=wb,b.partial=Nu,b.partialRight=Wh,b.partition=n_,b.pick=xw,b.pickBy=Xh,b.property=sd,b.propertyOf=bb,b.pull=t2,b.pullAll=Lh,b.pullAllBy=n2,b.pullAllWith=r2,b.pullAt=i2,b.range=xb,b.rangeRight=Sb,b.rearg=y_,b.reject=o_,b.remove=o2,b.rest=__,b.reverse=ku,b.sampleSize=a_,b.set=Cw,b.setWith=Aw,b.shuffle=u_,b.slice=s2,b.sortBy=f_,b.sortedUniq=d2,b.sortedUniqBy=p2,b.split=Vw,b.spread=w_,b.tail=g2,b.take=m2,b.takeRight=v2,b.takeRightWhile=y2,b.takeWhile=_2,b.tap=I2,b.throttle=b_,b.thru=Ys,b.toArray=Vh,b.toPairs=ed,b.toPairsIn=td,b.toPath=Tb,b.toPlainObject=Kh,b.transform=Dw,b.unary=x_,b.union=w2,b.unionBy=b2,b.unionWith=x2,b.uniq=S2,b.uniqBy=C2,b.uniqWith=A2,b.unset=Ow,b.unzip=Iu,b.unzipWith=kh,b.update=Tw,b.updateWith=Mw,b.values=Ti,b.valuesIn=Ew,b.without=D2,b.words=id,b.wrap=S_,b.xor=O2,b.xorBy=T2,b.xorWith=M2,b.zip=E2,b.zipObject=R2,b.zipObjectDeep=L2,b.zipWith=k2,b.entries=ed,b.entriesIn=td,b.extend=Qh,b.extendWith=Gs,zu(b,b),b.add=Eb,b.attempt=od,b.camelCase=Iw,b.capitalize=nd,b.ceil=Rb,b.clamp=Rw,b.clone=A_,b.cloneDeep=O_,b.cloneDeepWith=T_,b.cloneWith=D_,b.conformsTo=M_,b.deburr=rd,b.defaultTo=lb,b.divide=Lb,b.endsWith=Pw,b.eq=On,b.escape=Nw,b.escapeRegExp=$w,b.every=z2,b.find=H2,b.findIndex=Th,b.findKey=ow,b.findLast=G2,b.findLastIndex=Mh,b.findLastKey=sw,b.floor=kb,b.forEach=Ph,b.forEachRight=Nh,b.forIn=aw,b.forInRight=uw,b.forOwn=lw,b.forOwnRight=cw,b.get=ju,b.gt=E_,b.gte=R_,b.has=dw,b.hasIn=Yu,b.head=Rh,b.identity=Kt,b.includes=J2,b.indexOf=Gy,b.inRange=Lw,b.invoke=mw,b.isArguments=Jr,b.isArray=We,b.isArrayBuffer=L_,b.isArrayLike=Vt,b.isArrayLikeObject=_t,b.isBoolean=k_,b.isBuffer=Rr,b.isDate=I_,b.isElement=P_,b.isEmpty=N_,b.isEqual=$_,b.isEqualWith=B_,b.isError=$u,b.isFinite=j_,b.isFunction=Qn,b.isInteger=zh,b.isLength=qs,b.isMap=qh,b.isMatch=Y_,b.isMatchWith=U_,b.isNaN=F_,b.isNative=W_,b.isNil=q_,b.isNull=z_,b.isNumber=Hh,b.isObject=gt,b.isObjectLike=yt,b.isPlainObject=_o,b.isRegExp=Bu,b.isSafeInteger=H_,b.isSet=Gh,b.isString=Hs,b.isSymbol=rn,b.isTypedArray=Oi,b.isUndefined=G_,b.isWeakMap=V_,b.isWeakSet=Z_,b.join=Jy,b.kebabCase=Bw,b.last=_n,b.lastIndexOf=Xy,b.lowerCase=jw,b.lowerFirst=Yw,b.lt=K_,b.lte=Q_,b.max=Ib,b.maxBy=Pb,b.mean=Nb,b.meanBy=$b,b.min=Bb,b.minBy=jb,b.stubArray=Hu,b.stubFalse=Gu,b.stubObject=Cb,b.stubString=Ab,b.stubTrue=Db,b.multiply=Yb,b.nth=e2,b.noConflict=mb,b.noop=qu,b.now=Fs,b.pad=Uw,b.padEnd=Fw,b.padStart=Ww,b.parseInt=zw,b.random=kw,b.reduce=r_,b.reduceRight=i_,b.repeat=qw,b.replace=Hw,b.result=Sw,b.round=Ub,b.runInContext=H,b.sample=s_,b.size=l_,b.snakeCase=Gw,b.some=c_,b.sortedIndex=a2,b.sortedIndexBy=u2,b.sortedIndexOf=l2,b.sortedLastIndex=c2,b.sortedLastIndexBy=f2,b.sortedLastIndexOf=h2,b.startCase=Zw,b.startsWith=Kw,b.subtract=Fb,b.sum=Wb,b.sumBy=zb,b.template=Qw,b.times=Ob,b.toFinite=Jn,b.toInteger=ze,b.toLength=Zh,b.toLower=Jw,b.toNumber=wn,b.toSafeInteger=J_,b.toString=ot,b.toUpper=Xw,b.trim=eb,b.trimEnd=tb,b.trimStart=nb,b.truncate=rb,b.unescape=ib,b.uniqueId=Mb,b.upperCase=ob,b.upperFirst=Uu,b.each=Ph,b.eachRight=Nh,b.first=Rh,zu(b,function(){var e={};return Ln(b,function(t,o){st.call(b.prototype,o)||(e[o]=t)}),e}(),{chain:!1}),b.VERSION=s,pn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){b[e].placeholder=b}),pn(["drop","take"],function(e,t){Xe.prototype[e]=function(o){o=o===r?1:Ct(ze(o),0);var a=this.__filtered__&&!t?new Xe(this):this.clone();return a.__filtered__?a.__takeCount__=Pt(o,a.__takeCount__):a.__views__.push({size:Pt(o,v),type:e+(a.__dir__<0?"Right":"")}),a},Xe.prototype[e+"Right"]=function(o){return this.reverse()[e](o).reverse()}}),pn(["filter","map","takeWhile"],function(e,t){var o=t+1,a=o==Y||o==A;Xe.prototype[e]=function(y){var S=this.clone();return S.__iteratees__.push({iteratee:$e(y,3),type:o}),S.__filtered__=S.__filtered__||a,S}}),pn(["head","last"],function(e,t){var o="take"+(t?"Right":"");Xe.prototype[e]=function(){return this[o](1).value()[0]}}),pn(["initial","tail"],function(e,t){var o="drop"+(t?"":"Right");Xe.prototype[e]=function(){return this.__filtered__?new Xe(this):this[o](1)}}),Xe.prototype.compact=function(){return this.filter(Kt)},Xe.prototype.find=function(e){return this.filter(e).head()},Xe.prototype.findLast=function(e){return this.reverse().find(e)},Xe.prototype.invokeMap=He(function(e,t){return typeof e=="function"?new Xe(this):this.map(function(o){return ho(o,e,t)})}),Xe.prototype.reject=function(e){return this.filter(zs($e(e)))},Xe.prototype.slice=function(e,t){e=ze(e);var o=this;return o.__filtered__&&(e>0||t<0)?new Xe(o):(e<0?o=o.takeRight(-e):e&&(o=o.drop(e)),t!==r&&(t=ze(t),o=t<0?o.dropRight(-t):o.take(t-e)),o)},Xe.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Xe.prototype.toArray=function(){return this.take(v)},Ln(Xe.prototype,function(e,t){var o=/^(?:filter|find|map|reject)|While$/.test(t),a=/^(?:head|last)$/.test(t),y=b[a?"take"+(t=="last"?"Right":""):t],S=a||/^find/.test(t);y&&(b.prototype[t]=function(){var k=this.__wrapped__,U=a?[1]:arguments,G=k instanceof Xe,ge=U[0],me=G||We(k),we=function(Qe){var tt=y.apply(b,Cr([Qe],U));return a&&Te?tt[0]:tt};me&&o&&typeof ge=="function"&&ge.length!=1&&(G=me=!1);var Te=this.__chain__,Pe=!!this.__actions__.length,Be=S&&!Te,qe=G&&!Pe;if(!S&&me){k=qe?k:new Xe(this);var je=e.apply(k,U);return je.__actions__.push({func:Ys,args:[we],thisArg:r}),new mn(je,Te)}return Be&&qe?e.apply(this,U):(je=this.thru(we),Be?a?je.value()[0]:je.value():je)})}),pn(["pop","push","shift","sort","splice","unshift"],function(e){var t=hs[e],o=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",a=/^(?:pop|shift)$/.test(e);b.prototype[e]=function(){var y=arguments;if(a&&!this.__chain__){var S=this.value();return t.apply(We(S)?S:[],y)}return this[o](function(k){return t.apply(We(k)?k:[],y)})}}),Ln(Xe.prototype,function(e,t){var o=b[t];if(o){var a=o.name+"";st.call(xi,a)||(xi[a]=[]),xi[a].push({name:t,func:o})}}),xi[ks(r,X).name]=[{name:"wrapper",func:r}],Xe.prototype.clone=iv,Xe.prototype.reverse=ov,Xe.prototype.value=sv,b.prototype.at=P2,b.prototype.chain=N2,b.prototype.commit=$2,b.prototype.next=B2,b.prototype.plant=Y2,b.prototype.reverse=U2,b.prototype.toJSON=b.prototype.valueOf=b.prototype.value=F2,b.prototype.first=b.prototype.head,oo&&(b.prototype[oo]=j2),b},_i=$m();zr?((zr.exports=_i)._=_i,Wa._=_i):Lt._=_i}).call(B0)}(zi,zi.exports)),zi.exports}var Gc=j0();function Y0(i){const n=an.c(41),{fields:r,onClose:s,queryKey:l,apiPath:d,id:m,steps:c}=i,[x,C]=ye.useState(0),[O,R]=ye.useState(!1),{data:N,isLoading:E}=gc(d,l,m),{mutateAsync:I,isError:$,error:j,isPending:X}=ba(d,l);let te;n[0]!==r?(te=new Set(r.filter(G0).map(H0)),n[0]=r,n[1]=te):te=n[1];let ne;n[2]!==te?(ne=[...te],n[2]=te,n[3]=ne):ne=n[3];const ue=ne;let V;n[4]!==r?(V=r.reduce(q0,{}),n[4]=r,n[5]=V):V=n[5];let ce;n[6]!==r?(ce=r.filter(z0).reduce(F0,{}),n[6]=r,n[7]=ce):ce=n[7];let oe;n[8]!==V||n[9]!==ce?(oe={mode:"uncontrolled",initialValues:V,validate:ce},n[8]=V,n[9]=ce,n[10]=oe):oe=n[10];const ee=Mi.useForm(oe);let de;n[11]!==N||n[12]!==r||n[13]!==ee?(de=()=>{if(N){const A=r.reduce((g,p)=>{const w=p.id;return g[w]=Array.isArray(N[w])?N[w]:p.type==="boolean"?N[w]??!1:p.type==="date"?N[w]?new Date(N[w]):"":N[w]??"",g},{});ee.initialize(A),ee.setValues(A)}},n[11]=N,n[12]=r,n[13]=ee,n[14]=de):de=n[14];let pe;n[15]!==N?(pe=[N],n[15]=N,n[16]=pe):pe=n[16],ye.useEffect(de,pe);let re;n[17]!==ee||n[18]!==m?(re=function(g){return T.jsxs(ye.Fragment,{children:[(g.type===void 0||g.type=="text")&&T.jsx(B.TextInput,{label:g.column.title,placeholder:g.placeholder??"",...ee.getInputProps(g.id),type:g.id.includes("email")?"email":void 0},ee.key(g.id)),g.type==="number"&&T.jsx(B.NumberInput,{decimalSeparator:",",label:g.column.title,placeholder:g.placeholder??"",...ee.getInputProps(g.id)},ee.key(g.id)),g.type==="date"&&T.jsx(Zo,{label:g.column.title,placeholder:g.placeholder??"",valueFormat:"DD.MM.YYYY",clearable:!0,...ee.getInputProps(g.id)},ee.key(g.id)),g.type==="boolean"&&T.jsx(B.Checkbox,{mt:"md",label:g.column.title,...ee.getInputProps(g.id,{type:"checkbox"})},ee.key(g.id)),g.type==="custom"&&g.render&&g.render({...ee.getValues(),id:m},ee.setValues,R)]},g.id)},n[17]=ee,n[18]=m,n[19]=re):re=n[19];const Ae=re;let Se;n[20]!==$||n[21]!==(j==null?void 0:j.message)||n[22]!==(j==null?void 0:j.name)?(Se=$&&T.jsx(B.Alert,{variant:"outline",color:"red",title:(j==null?void 0:j.name)??"Fehler aufgetreten",mb:"lg",children:(j==null?void 0:j.message)??"Fehler aufgetreten"}),n[20]=$,n[21]=j==null?void 0:j.message,n[22]=j==null?void 0:j.name,n[23]=Se):Se=n[23];let Y;n[24]!==x||n[25]!==r||n[26]!==ee||n[27]!==O||n[28]!==m||n[29]!==E||n[30]!==X||n[31]!==$||n[32]!==s||n[33]!==Ae||n[34]!==c||n[35]!==ue||n[36]!==I?(Y=E?T.jsxs(B.Stack,{gap:"md",children:[T.jsx(B.Skeleton,{height:40}),Array(r.length).fill(0).map(U0),T.jsxs(B.Group,{mt:"md",justify:"end",children:[T.jsx(B.Skeleton,{width:100,height:36}),T.jsx(B.Skeleton,{width:100,height:36})]})]}):T.jsxs("form",{onSubmit:ee.onSubmit(async A=>{await I({...A,id:m}),ue.length&&x<ue.length-1?$||C(x+1):$||(ee.setInitialValues(A),ee.reset(),s())}),children:[ue.length?T.jsx(B.Stepper,{active:x,size:"sm",children:ue.map(A=>T.jsx(B.Stepper.Step,{...c&&c[A-1]?{label:c[A-1].label}:{},children:r.filter(g=>g.step===A).map(g=>Ae(g))},A))}):r.map(A=>Ae(A)),!O&&T.jsxs(B.Group,{mt:"md",justify:"end",children:[T.jsx(B.Button,{onClick:()=>ue.length?x===0?s():C(x-1):s(),variant:"outline",children:ue.length?x===0?"Abbrechen":"Zurück":"Abbrechen"}),T.jsx(B.Button,{type:"submit",loading:X,children:ue.length?x===ue.length-1?"Speichern":"Weiter":"Speichern"})]})]}),n[24]=x,n[25]=r,n[26]=ee,n[27]=O,n[28]=m,n[29]=E,n[30]=X,n[31]=$,n[32]=s,n[33]=Ae,n[34]=c,n[35]=ue,n[36]=I,n[37]=Y):Y=n[37];let L;return n[38]!==Y||n[39]!==Se?(L=T.jsxs(T.Fragment,{children:[Se,Y]}),n[38]=Y,n[39]=Se,n[40]=L):L=n[40],L}function U0(i,n){return T.jsx(B.Skeleton,{height:35},`skeleton-field-${n}`)}function F0(i,n){return i[n.id]=W0,i}function W0(i){return i?null:"Pflichtfeld"}function z0(i){return i.required}function q0(i,n){return i[n.id]=n.type==="boolean"?n.defaultValue??!1:n.defaultValue??"",i}function H0(i){return i.step}function G0(i){return typeof i.step=="number"}function V0(i){const n=an.c(28),{queryKey:r,apiPath:s,onClose:l,selectedRecords:d}=i,{mutateAsync:m,isError:c,error:x,isPending:C}=yc(s,r),[O,R]=ye.useState(d);let N;n[0]!==l||n[1]!==O.length?(N=()=>{O.length||l()},n[0]=l,n[1]=O.length,n[2]=N):N=n[2];let E;if(n[3]!==l||n[4]!==O?(E=[l,O],n[3]=l,n[4]=O,n[5]=E):E=n[5],ye.useEffect(N,E),!O.length){let ce;return n[6]===Symbol.for("react.memo_cache_sentinel")?(ce=T.jsx(T.Fragment,{}),n[6]=ce):ce=n[6],ce}let I;n[7]!==x||n[8]!==c?(I=c&&x.message&&T.jsx(B.Alert,{variant:"outline",color:"red",title:x.name,children:x.message}),n[7]=x,n[8]=c,n[9]=I):I=n[9];let $;n[10]===Symbol.for("react.memo_cache_sentinel")?($=T.jsx("br",{}),n[10]=$):$=n[10];let j;n[11]!==d[0].id?(j=T.jsxs(B.Text,{children:["Bist du sicher, dass du folgenden Eintrag löschen möchtest?",$,d[0].id]}),n[11]=d[0].id,n[12]=j):j=n[12];let X;n[13]!==l?(X=T.jsx(B.Button,{onClick:l,variant:"outline",children:"Abbrechen"}),n[13]=l,n[14]=X):X=n[14];let te;n[15]!==m||n[16]!==O[0].id?(te=async()=>{await m(O[0].id),R(ce=>ce.filter(oe=>oe.id!==O[0].id))},n[15]=m,n[16]=O[0].id,n[17]=te):te=n[17];let ne;n[18]!==C||n[19]!==te?(ne=T.jsx(B.Button,{color:"red",loading:C,onClick:te,children:"Delete"}),n[18]=C,n[19]=te,n[20]=ne):ne=n[20];let ue;n[21]!==X||n[22]!==ne?(ue=T.jsxs(B.Group,{mt:"md",justify:"end",children:[X,ne]}),n[21]=X,n[22]=ne,n[23]=ue):ue=n[23];let V;return n[24]!==I||n[25]!==j||n[26]!==ue?(V=T.jsxs(T.Fragment,{children:[I,j,ue]}),n[24]=I,n[25]=j,n[26]=ue,n[27]=V):V=n[27],V}function Vc(i,n){const r=an.c(8);let s;r[0]!==i||r[1]!==n?(s=()=>{const C=localStorage.getItem(`use_persistent_storage_${n}`);return C?JSON.parse(C):i},r[0]=i,r[1]=n,r[2]=s):s=r[2];const[l,d]=ye.useState(s);let m;r[3]!==n?(m=C=>{d(C),localStorage.setItem(`use_persistent_storage_${n}`,JSON.stringify(C))},r[3]=n,r[4]=m):m=r[4];const c=m;let x;return r[5]!==c||r[6]!==l?(x=[l,c],r[5]=c,r[6]=l,r[7]=x):x=r[7],x}const Zc=[10,15,20,50,100,500];function Z0(i){const n=an.c(130),{title:r,queryKey:s,connectedQueryKeys:l,apiPath:d,buttons:m,fields:c,selection:x,pagination:C,filters:O,actions:R,steps:N,defaultSort:E,createButtonText:I}=i,{data:$,isLoading:j,isError:X,isRefetching:te,refetch:ne}=mc(d,s);let ue;n[0]===Symbol.for("react.memo_cache_sentinel")?(ue=[],n[0]=ue):ue=n[0];const[V,ce]=ye.useState(ue),{queryClient:oe}=nr();let ee;n[1]!==$||n[2]!==l||n[3]!==O||n[4]!==oe?(ee=()=>{if(!(!$||!Array.isArray($))){if(l==null||l.forEach(dt=>oe.invalidateQueries({queryKey:dt})),!O||O.length===0){ce($);return}ce($.filter(dt=>O.every(Mt=>{const pr=Mt.id;if(Mt.type==="query"&&typeof Mt.value=="string"){const gr=dt[pr];return typeof gr=="string"&&gr.includes(Mt.value)}else if(Mt.type==="date"){if(!Mt.value)return!0;const gr=Mt.value,[mr,ci]=gr;if(mr&&ci){const fi=dt[pr];if(typeof fi=="string"){const hi=new Date(fi);return hi>=mr&&hi<=ci}}return!0}return!0})))}},n[1]=$,n[2]=l,n[3]=O,n[4]=oe,n[5]=ee):ee=n[5];let de;n[6]!==$||n[7]!==O?(de=[$,O],n[6]=$,n[7]=O,n[8]=de):de=n[8],ye.useEffect(ee,de);const pe=(E==null?void 0:E.field)??c[0].id,re=(E==null?void 0:E.direction)??"desc";let Ae;n[9]!==pe||n[10]!==re?(Ae={columnAccessor:pe,direction:re},n[9]=pe,n[10]=re,n[11]=Ae):Ae=n[11];const[Se,Y]=ye.useState(Ae);let L;n[12]!==V||n[13]!==(E==null?void 0:E.direction)||n[14]!==(E==null?void 0:E.field)||n[15]!==c[0]?(L=()=>{const dt=Gc.sortBy(V,(E==null?void 0:E.field)??c[0].id);return(E==null?void 0:E.direction)==="asc"?dt:dt.reverse()},n[12]=V,n[13]=E==null?void 0:E.direction,n[14]=E==null?void 0:E.field,n[15]=c[0],n[16]=L):L=n[16];const[A,g]=ye.useState(L);let p;n[17]!==V||n[18]!==Se.columnAccessor||n[19]!==Se.direction?(p=()=>{const dt=Gc.sortBy(V,Se.columnAccessor);g(Se.direction==="desc"?dt.reverse():dt)},n[17]=V,n[18]=Se.columnAccessor,n[19]=Se.direction,n[20]=p):p=n[20];let w;n[21]!==V||n[22]!==Se?(w=[Se,V],n[21]=V,n[22]=Se,n[23]=w):w=n[23],ye.useEffect(p,w);const[h,v]=Vc(Zc[1],"mantine-table-page-size"),[D,z]=ye.useState(1);let Z;n[24]!==h||n[25]!==C||n[26]!==A?(Z=C?A.slice(0,h):A,n[24]=h,n[25]=C,n[26]=A,n[27]=Z):Z=n[27];const[ae,fe]=ye.useState(Z);let _e;n[28]===Symbol.for("react.memo_cache_sentinel")?(_e=()=>{z(1)},n[28]=_e):_e=n[28];let J;n[29]!==h?(J=[h],n[29]=h,n[30]=J):J=n[30],ye.useEffect(_e,J);let he,De;n[31]!==D||n[32]!==h||n[33]!==C||n[34]!==A?(he=()=>{if(C){const dt=(D-1)*h,Mt=dt+h;fe(A.slice(dt,Mt))}else fe(A)},De=[D,A,C,h],n[31]=D,n[32]=h,n[33]=C,n[34]=A,n[35]=he,n[36]=De):(he=n[35],De=n[36]),ye.useEffect(he,De);let be;n[37]===Symbol.for("react.memo_cache_sentinel")?(be=[],n[37]=be):be=n[37];const[P,q]=ye.useState(be);let F;n[38]!==P||n[39]!==x||n[40]!==A?(F=()=>{x&&q(A.filter(dt=>P.some(Mt=>Mt.id===dt.id)))},n[38]=P,n[39]=x,n[40]=A,n[41]=F):F=n[41];let K;n[42]!==A?(K=[A],n[42]=A,n[43]=K):K=n[43],ye.useEffect(F,K);const[se,Oe]=ye.useState(!1),[u,f]=ye.useState(!1),[_,M]=ye.useState(!1),W=r?"space-between":"end";let Q;n[44]!==r?(Q=r&&(typeof r=="string"?T.jsx(B.Title,{order:4,children:r}):r),n[44]=r,n[45]=Q):Q=n[45];let xe;n[46]!==ne?(xe=()=>ne(),n[46]=ne,n[47]=xe):xe=n[47];let Me;n[48]===Symbol.for("react.memo_cache_sentinel")?(Me=T.jsx(Ei.IconRefresh,{}),n[48]=Me):Me=n[48];let Ie;n[49]!==xe?(Ie=T.jsx(B.ActionIcon,{variant:"subtle",onClick:xe,"aria-label":"Neuladen",children:Me}),n[49]=xe,n[50]=Ie):Ie=n[50];let Ce;n[51]!==R||n[52]!==c||n[53]!==P||n[54]!==x?(Ce=(c.some(rm)||x)&&T.jsxs(B.Menu,{shadow:"md",children:[T.jsx(B.Menu.Target,{children:T.jsx(B.Button,{variant:"outline",rightSection:T.jsx(Ei.IconCaretDownFilled,{size:14}),disabled:!P.length,children:"Aktionen"})}),T.jsxs(B.Menu.Dropdown,{children:[c.find(nm)&&T.jsx(B.Menu.Item,{leftSection:T.jsx(Ei.IconPencil,{size:14}),onClick:()=>f(!0),disabled:P.length!==1,children:"Bearbeiten"}),(R??[]).map((dt,Mt)=>ye.createElement(B.Menu.Item,{...dt.icon&&{leftSection:dt.icon},key:`custom_action_${Mt}`,onClick:()=>dt.onClick(P)},dt.label)),c.find(tm)&&T.jsx(B.Menu.Item,{leftSection:T.jsx(Ei.IconTrash,{size:14}),onClick:()=>M(!0),color:"red",children:"Löschen"})]})]}),n[51]=R,n[52]=c,n[53]=P,n[54]=x,n[55]=Ce):Ce=n[55];let ke;n[56]!==I||n[57]!==c||n[58]!==j?(ke=c.find(em)&&T.jsx(B.Button,{onClick:()=>Oe(!0),disabled:j,children:I??"Erstellen"}),n[56]=I,n[57]=c,n[58]=j,n[59]=ke):ke=n[59];let Ne;n[60]!==m||n[61]!==Ie||n[62]!==Ce||n[63]!==ke?(Ne=T.jsxs(B.Group,{align:"center",gap:"xs",children:[Ie,Ce,ke,m]}),n[60]=m,n[61]=Ie,n[62]=Ce,n[63]=ke,n[64]=Ne):Ne=n[64];let Re;n[65]!==W||n[66]!==Q||n[67]!==Ne?(Re=T.jsxs(B.Group,{gap:"xs",justify:W,align:"center",children:[Q,Ne]}),n[65]=W,n[66]=Q,n[67]=Ne,n[68]=Re):Re=n[68];let Ge;n[69]!==X?(Ge=X&&T.jsx(B.Alert,{mt:"md",variant:"light",color:"red",title:"Es ist ein Fehler aufgetreten.",icon:T.jsx(Ei.IconInfoCircle,{}),children:"Bitte versuche es später erneut oder sende eine Nachricht an unseren Support."}),n[69]=X,n[70]=Ge):Ge=n[70];let Je;n[71]!==j||n[72]!==te?(Je=(j||te)&&T.jsxs(B.Stack,{my:"md",children:[T.jsx(B.Skeleton,{height:40}),Array(5).fill(0).map(X0)]}),n[71]=j,n[72]=te,n[73]=Je):Je=n[73];let Ve;n[74]!==c||n[75]!==X||n[76]!==j||n[77]!==te||n[78]!==D||n[79]!==h||n[80]!==C||n[81]!==ae||n[82]!==P||n[83]!==x||n[84]!==v||n[85]!==Se||n[86]!==A?(Ve=!j&&!te&&T.jsx(N0,{my:"md",striped:!0,minHeight:150,fetching:X,records:ae,sortStatus:Se,onSortStatusChange:Y,...x&&{selectedRecords:P,onSelectedRecordsChange:q},...C&&ae.length&&{totalRecords:A.length,recordsPerPage:h,onPageChange:z,page:D,recordsPerPageOptions:Zc,onRecordsPerPageChange:v,recordsPerPageLabel:"Einträge pro Seite"},columns:c.map(J0),noRecordsText:"Keine Einträge gefunden"}),n[74]=c,n[75]=X,n[76]=j,n[77]=te,n[78]=D,n[79]=h,n[80]=C,n[81]=ae,n[82]=P,n[83]=x,n[84]=v,n[85]=Se,n[86]=A,n[87]=Ve):Ve=n[87];let xt;n[88]===Symbol.for("react.memo_cache_sentinel")?(xt=()=>{f(!1),q([])},n[88]=xt):xt=n[88];const vt=r??"Bearbeiten";let ut;n[89]!==d||n[90]!==c||n[91]!==s||n[92]!==P[0]||n[93]!==P.length||n[94]!==N?(ut=P.length>0&&T.jsx(Y0,{fields:c.filter(Q0),queryKey:s,apiPath:d,id:P[0].id,onClose:()=>{f(!1),q([])},steps:N}),n[89]=d,n[90]=c,n[91]=s,n[92]=P[0],n[93]=P.length,n[94]=N,n[95]=ut):ut=n[95];let qt;n[96]!==vt||n[97]!==ut||n[98]!==u?(qt=T.jsx(B.Modal,{opened:u,onClose:xt,title:vt,children:ut}),n[96]=vt,n[97]=ut,n[98]=u,n[99]=qt):qt=n[99];let Dt;n[100]===Symbol.for("react.memo_cache_sentinel")?(Dt=()=>{M(!1),q([])},n[100]=Dt):Dt=n[100];const $n=r??"Löschen";let fn;n[101]!==d||n[102]!==s||n[103]!==P?(fn=P.length>0&&T.jsx(V0,{onClose:()=>{M(!1),q([])},queryKey:s,apiPath:d,selectedRecords:P}),n[101]=d,n[102]=s,n[103]=P,n[104]=fn):fn=n[104];let Qt;n[105]!==_||n[106]!==$n||n[107]!==fn?(Qt=T.jsx(B.Modal,{opened:_,onClose:Dt,title:$n,children:fn}),n[105]=_,n[106]=$n,n[107]=fn,n[108]=Qt):Qt=n[108];let xn;n[109]===Symbol.for("react.memo_cache_sentinel")?(xn=()=>{Oe(!1)},n[109]=xn):xn=n[109];const Bn=r??"Anlegen";let En;n[110]===Symbol.for("react.memo_cache_sentinel")?(En=()=>{Oe(!1)},n[110]=En):En=n[110];let it;n[111]!==c?(it=c.filter(K0),n[111]=c,n[112]=it):it=n[112];let It;n[113]!==d||n[114]!==s||n[115]!==N||n[116]!==it?(It=T.jsx(U1,{queryKey:s,apiPath:d,onClose:En,fields:it,steps:N}),n[113]=d,n[114]=s,n[115]=N,n[116]=it,n[117]=It):It=n[117];let Sn;n[118]!==se||n[119]!==Bn||n[120]!==It?(Sn=T.jsx(B.Modal,{opened:se,onClose:xn,title:Bn,children:It}),n[118]=se,n[119]=Bn,n[120]=It,n[121]=Sn):Sn=n[121];let dr;return n[122]!==Re||n[123]!==Ge||n[124]!==Je||n[125]!==Ve||n[126]!==qt||n[127]!==Qt||n[128]!==Sn?(dr=T.jsxs(T.Fragment,{children:[Re,Ge,Je,Ve,qt,Qt,Sn]}),n[122]=Re,n[123]=Ge,n[124]=Je,n[125]=Ve,n[126]=qt,n[127]=Qt,n[128]=Sn,n[129]=dr):dr=n[129],dr}function K0(i){return i.create}function Q0(i){return i.update}function J0(i){return i.column}function X0(i,n){return T.jsx(B.Skeleton,{height:35},`skeleton-${n}`)}function em(i){return i.create}function tm(i){return i.delete}function nm(i){return i.update}function rm(i){return i.update}function im(i){const n=an.c(5),{queryClient:r}=nr();let s;n[0]!==i?(s=T.jsx(Z0,{...i}),n[0]=i,n[1]=s):s=n[1];let l;return n[2]!==r||n[3]!==s?(l=T.jsx(bl,{client:r,children:s}),n[2]=r,n[3]=s,n[4]=l):l=n[4],l}Ue.DataTable=im,Ue.DataTableProvider=Ng,Ue.api=Bg,Ue.createOne=dc,Ue.deleteOne=hc,Ue.getAll=cc,Ue.getApiHeaders=kr,Ue.getOne=fc,Ue.updateOne=pc,Ue.useAddOne=vc,Ue.useDataTable=nr,Ue.useDeleteOne=yc,Ue.useGetAll=mc,Ue.useGetOne=gc,Ue.usePersistentState=Vc,Ue.useUpdateOne=ba,Object.defineProperty(Ue,Symbol.toStringTag,{value:"Module"})});
142
+ `)+xe+`return __p
143
+ }`;var qe=od(function(){return nt(S,Pe+"return "+xe).apply(r,L)});if(qe.source=xe,Bu(qe))throw qe;return qe}function Jw(e){return ot(e).toLowerCase()}function Xw(e){return ot(e).toUpperCase()}function eb(e,t,o){if(e=ot(e),e&&(o||t===r))return pf(e);if(!e||!(t=nn(t)))return e;var a=An(e),y=An(t),S=gf(a,y),L=mf(a,y)+1;return Er(a,S,L).join("")}function tb(e,t,o){if(e=ot(e),e&&(o||t===r))return e.slice(0,yf(e)+1);if(!e||!(t=nn(t)))return e;var a=An(e),y=mf(a,An(t))+1;return Er(a,0,y).join("")}function nb(e,t,o){if(e=ot(e),e&&(o||t===r))return e.replace(mr,"");if(!e||!(t=nn(t)))return e;var a=An(e),y=gf(a,An(t));return Er(a,y).join("")}function rb(e,t){var o=de,a=re;if(gt(t)){var y="separator"in t?t.separator:y;o="length"in t?ze(t.length):o,a="omission"in t?nn(t.omission):a}e=ot(e);var S=e.length;if(vi(e)){var L=An(e);S=L.length}if(o>=S)return e;var U=o-yi(a);if(U<1)return a;var G=L?Er(L,0,U).join(""):e.slice(0,U);if(y===r)return G+a;if(L&&(U+=G.length-U),ju(y)){if(e.slice(U).search(y)){var pe,ge=G;for(y.global||(y=tu(y.source,ot(Zi.exec(y))+"g")),y.lastIndex=0;pe=y.exec(ge);)var xe=pe.index;G=G.slice(0,xe===r?U:xe)}}else if(e.indexOf(nn(y),U)!=U){var Me=G.lastIndexOf(y);Me>-1&&(G=G.slice(0,Me))}return G+a}function ib(e){return e=ot(e),e&&Bn.test(e)?e.replace(Qt,km):e}var ob=Ai(function(e,t,o){return e+(o?" ":"")+t.toUpperCase()}),Fu=sh("toUpperCase");function id(e,t,o){return e=ot(e),t=o?r:t,t===r?Tm(e)?Nm(e):_m(e):e.match(t)||[]}var od=He(function(e,t){try{return en(e,r,t)}catch(o){return Bu(o)?o:new Fe(o)}}),sb=Zn(function(e,t){return pn(t,function(o){o=In(o),Gn(e,o,Nu(e[o],e))}),e});function ab(e){var t=e==null?0:e.length,o=$e();return e=t?pt(e,function(a){if(typeof a[1]!="function")throw new gn(m);return[o(a[0]),a[1]]}):[],He(function(a){for(var y=-1;++y<t;){var S=e[y];if(en(S[0],this,a))return en(S[1],this,a)}})}function ub(e){return kv(vn(e,E))}function Wu(e){return function(){return e}}function lb(e,t){return e==null||e!==e?t:e}var cb=uh(),fb=uh(!0);function Kt(e){return e}function zu(e){return Bf(typeof e=="function"?e:vn(e,E))}function hb(e){return Yf(vn(e,E))}function db(e,t){return Uf(e,vn(t,E))}var pb=He(function(e,t){return function(o){return po(o,e,t)}}),gb=He(function(e,t){return function(o){return po(e,o,t)}});function qu(e,t,o){var a=Ot(t),y=Ts(t,a);o==null&&!(gt(t)&&(y.length||!a.length))&&(o=t,t=e,e=this,y=Ts(t,Ot(t)));var S=!(gt(o)&&"chain"in o)||!!o.chain,L=Qn(e);return pn(y,function(U){var G=t[U];e[U]=G,L&&(e.prototype[U]=function(){var pe=this.__chain__;if(S||pe){var ge=e(this.__wrapped__),xe=ge.__actions__=Gt(this.__actions__);return xe.push({func:G,args:arguments,thisArg:e}),ge.__chain__=pe,ge}return G.apply(e,Cr([this.value()],arguments))})}),e}function mb(){return Lt._===this&&(Lt._=Fm),this}function Hu(){}function vb(e){return e=ze(e),He(function(t){return Ff(t,e)})}var yb=Su(pt),_b=Su(lf),wb=Su(Va);function sd(e){return Eu(e)?Za(In(e)):Kv(e)}function bb(e){return function(t){return e==null?r:Zr(e,t)}}var xb=ch(),Sb=ch(!0);function Gu(){return[]}function Vu(){return!1}function Cb(){return{}}function Ab(){return""}function Db(){return!0}function Ob(e,t){if(e=ze(e),e<1||e>p)return[];var o=v,a=Pt(e,v);t=$e(t),e-=v;for(var y=Ja(a,t);++o<e;)t(o);return y}function Tb(e){return We(e)?pt(e,In):rn(e)?[e]:Gt(Dh(ot(e)))}function Mb(e){var t=++Ym;return ot(e)+t}var Eb=Is(function(e,t){return e+t},0),Rb=Cu("ceil"),Lb=Is(function(e,t){return e/t},1),kb=Cu("floor");function Ib(e){return e&&e.length?Os(e,Kt,lu):r}function Pb(e,t){return e&&e.length?Os(e,$e(t,2),lu):r}function Nb(e){return hf(e,Kt)}function $b(e,t){return hf(e,$e(t,2))}function Bb(e){return e&&e.length?Os(e,Kt,du):r}function jb(e,t){return e&&e.length?Os(e,$e(t,2),du):r}var Yb=Is(function(e,t){return e*t},1),Ub=Cu("round"),Fb=Is(function(e,t){return e-t},0);function Wb(e){return e&&e.length?Qa(e,Kt):0}function zb(e,t){return e&&e.length?Qa(e,$e(t,2)):0}return b.after=h_,b.ary=$h,b.assign=X_,b.assignIn=Qh,b.assignInWith=Gs,b.assignWith=ew,b.at=tw,b.before=Bh,b.bind=Nu,b.bindAll=sb,b.bindKey=jh,b.castArray=C_,b.chain=Ih,b.chunk=ky,b.compact=Iy,b.concat=Py,b.cond=ab,b.conforms=ub,b.constant=Wu,b.countBy=W2,b.create=nw,b.curry=Yh,b.curryRight=Uh,b.debounce=Fh,b.defaults=rw,b.defaultsDeep=iw,b.defer=d_,b.delay=p_,b.difference=Ny,b.differenceBy=$y,b.differenceWith=By,b.drop=jy,b.dropRight=Yy,b.dropRightWhile=Uy,b.dropWhile=Fy,b.fill=Wy,b.filter=q2,b.flatMap=V2,b.flatMapDeep=Z2,b.flatMapDepth=K2,b.flatten=Eh,b.flattenDeep=zy,b.flattenDepth=qy,b.flip=g_,b.flow=cb,b.flowRight=fb,b.fromPairs=Hy,b.functions=fw,b.functionsIn=hw,b.groupBy=Q2,b.initial=Vy,b.intersection=Zy,b.intersectionBy=Ky,b.intersectionWith=Qy,b.invert=pw,b.invertBy=gw,b.invokeMap=X2,b.iteratee=zu,b.keyBy=e_,b.keys=Ot,b.keysIn=Zt,b.map=Us,b.mapKeys=vw,b.mapValues=yw,b.matches=hb,b.matchesProperty=db,b.memoize=Ws,b.merge=_w,b.mergeWith=Jh,b.method=pb,b.methodOf=gb,b.mixin=qu,b.negate=zs,b.nthArg=vb,b.omit=ww,b.omitBy=bw,b.once=m_,b.orderBy=t_,b.over=yb,b.overArgs=v_,b.overEvery=_b,b.overSome=wb,b.partial=$u,b.partialRight=Wh,b.partition=n_,b.pick=xw,b.pickBy=Xh,b.property=sd,b.propertyOf=bb,b.pull=t2,b.pullAll=Lh,b.pullAllBy=n2,b.pullAllWith=r2,b.pullAt=i2,b.range=xb,b.rangeRight=Sb,b.rearg=y_,b.reject=o_,b.remove=o2,b.rest=__,b.reverse=Iu,b.sampleSize=a_,b.set=Cw,b.setWith=Aw,b.shuffle=u_,b.slice=s2,b.sortBy=f_,b.sortedUniq=d2,b.sortedUniqBy=p2,b.split=Vw,b.spread=w_,b.tail=g2,b.take=m2,b.takeRight=v2,b.takeRightWhile=y2,b.takeWhile=_2,b.tap=I2,b.throttle=b_,b.thru=Ys,b.toArray=Vh,b.toPairs=ed,b.toPairsIn=td,b.toPath=Tb,b.toPlainObject=Kh,b.transform=Dw,b.unary=x_,b.union=w2,b.unionBy=b2,b.unionWith=x2,b.uniq=S2,b.uniqBy=C2,b.uniqWith=A2,b.unset=Ow,b.unzip=Pu,b.unzipWith=kh,b.update=Tw,b.updateWith=Mw,b.values=Ti,b.valuesIn=Ew,b.without=D2,b.words=id,b.wrap=S_,b.xor=O2,b.xorBy=T2,b.xorWith=M2,b.zip=E2,b.zipObject=R2,b.zipObjectDeep=L2,b.zipWith=k2,b.entries=ed,b.entriesIn=td,b.extend=Qh,b.extendWith=Gs,qu(b,b),b.add=Eb,b.attempt=od,b.camelCase=Iw,b.capitalize=nd,b.ceil=Rb,b.clamp=Rw,b.clone=A_,b.cloneDeep=O_,b.cloneDeepWith=T_,b.cloneWith=D_,b.conformsTo=M_,b.deburr=rd,b.defaultTo=lb,b.divide=Lb,b.endsWith=Pw,b.eq=On,b.escape=Nw,b.escapeRegExp=$w,b.every=z2,b.find=H2,b.findIndex=Th,b.findKey=ow,b.findLast=G2,b.findLastIndex=Mh,b.findLastKey=sw,b.floor=kb,b.forEach=Ph,b.forEachRight=Nh,b.forIn=aw,b.forInRight=uw,b.forOwn=lw,b.forOwnRight=cw,b.get=Yu,b.gt=E_,b.gte=R_,b.has=dw,b.hasIn=Uu,b.head=Rh,b.identity=Kt,b.includes=J2,b.indexOf=Gy,b.inRange=Lw,b.invoke=mw,b.isArguments=Jr,b.isArray=We,b.isArrayBuffer=L_,b.isArrayLike=Vt,b.isArrayLikeObject=_t,b.isBoolean=k_,b.isBuffer=Rr,b.isDate=I_,b.isElement=P_,b.isEmpty=N_,b.isEqual=$_,b.isEqualWith=B_,b.isError=Bu,b.isFinite=j_,b.isFunction=Qn,b.isInteger=zh,b.isLength=qs,b.isMap=qh,b.isMatch=Y_,b.isMatchWith=U_,b.isNaN=F_,b.isNative=W_,b.isNil=q_,b.isNull=z_,b.isNumber=Hh,b.isObject=gt,b.isObjectLike=yt,b.isPlainObject=wo,b.isRegExp=ju,b.isSafeInteger=H_,b.isSet=Gh,b.isString=Hs,b.isSymbol=rn,b.isTypedArray=Oi,b.isUndefined=G_,b.isWeakMap=V_,b.isWeakSet=Z_,b.join=Jy,b.kebabCase=Bw,b.last=_n,b.lastIndexOf=Xy,b.lowerCase=jw,b.lowerFirst=Yw,b.lt=K_,b.lte=Q_,b.max=Ib,b.maxBy=Pb,b.mean=Nb,b.meanBy=$b,b.min=Bb,b.minBy=jb,b.stubArray=Gu,b.stubFalse=Vu,b.stubObject=Cb,b.stubString=Ab,b.stubTrue=Db,b.multiply=Yb,b.nth=e2,b.noConflict=mb,b.noop=Hu,b.now=Fs,b.pad=Uw,b.padEnd=Fw,b.padStart=Ww,b.parseInt=zw,b.random=kw,b.reduce=r_,b.reduceRight=i_,b.repeat=qw,b.replace=Hw,b.result=Sw,b.round=Ub,b.runInContext=H,b.sample=s_,b.size=l_,b.snakeCase=Gw,b.some=c_,b.sortedIndex=a2,b.sortedIndexBy=u2,b.sortedIndexOf=l2,b.sortedLastIndex=c2,b.sortedLastIndexBy=f2,b.sortedLastIndexOf=h2,b.startCase=Zw,b.startsWith=Kw,b.subtract=Fb,b.sum=Wb,b.sumBy=zb,b.template=Qw,b.times=Ob,b.toFinite=Jn,b.toInteger=ze,b.toLength=Zh,b.toLower=Jw,b.toNumber=wn,b.toSafeInteger=J_,b.toString=ot,b.toUpper=Xw,b.trim=eb,b.trimEnd=tb,b.trimStart=nb,b.truncate=rb,b.unescape=ib,b.uniqueId=Mb,b.upperCase=ob,b.upperFirst=Fu,b.each=Ph,b.eachRight=Nh,b.first=Rh,qu(b,function(){var e={};return Ln(b,function(t,o){st.call(b.prototype,o)||(e[o]=t)}),e}(),{chain:!1}),b.VERSION=s,pn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){b[e].placeholder=b}),pn(["drop","take"],function(e,t){Xe.prototype[e]=function(o){o=o===r?1:Ct(ze(o),0);var a=this.__filtered__&&!t?new Xe(this):this.clone();return a.__filtered__?a.__takeCount__=Pt(o,a.__takeCount__):a.__views__.push({size:Pt(o,v),type:e+(a.__dir__<0?"Right":"")}),a},Xe.prototype[e+"Right"]=function(o){return this.reverse()[e](o).reverse()}}),pn(["filter","map","takeWhile"],function(e,t){var o=t+1,a=o==Y||o==A;Xe.prototype[e]=function(y){var S=this.clone();return S.__iteratees__.push({iteratee:$e(y,3),type:o}),S.__filtered__=S.__filtered__||a,S}}),pn(["head","last"],function(e,t){var o="take"+(t?"Right":"");Xe.prototype[e]=function(){return this[o](1).value()[0]}}),pn(["initial","tail"],function(e,t){var o="drop"+(t?"":"Right");Xe.prototype[e]=function(){return this.__filtered__?new Xe(this):this[o](1)}}),Xe.prototype.compact=function(){return this.filter(Kt)},Xe.prototype.find=function(e){return this.filter(e).head()},Xe.prototype.findLast=function(e){return this.reverse().find(e)},Xe.prototype.invokeMap=He(function(e,t){return typeof e=="function"?new Xe(this):this.map(function(o){return po(o,e,t)})}),Xe.prototype.reject=function(e){return this.filter(zs($e(e)))},Xe.prototype.slice=function(e,t){e=ze(e);var o=this;return o.__filtered__&&(e>0||t<0)?new Xe(o):(e<0?o=o.takeRight(-e):e&&(o=o.drop(e)),t!==r&&(t=ze(t),o=t<0?o.dropRight(-t):o.take(t-e)),o)},Xe.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Xe.prototype.toArray=function(){return this.take(v)},Ln(Xe.prototype,function(e,t){var o=/^(?:filter|find|map|reject)|While$/.test(t),a=/^(?:head|last)$/.test(t),y=b[a?"take"+(t=="last"?"Right":""):t],S=a||/^find/.test(t);y&&(b.prototype[t]=function(){var L=this.__wrapped__,U=a?[1]:arguments,G=L instanceof Xe,pe=U[0],ge=G||We(L),xe=function(Qe){var tt=y.apply(b,Cr([Qe],U));return a&&Me?tt[0]:tt};ge&&o&&typeof pe=="function"&&pe.length!=1&&(G=ge=!1);var Me=this.__chain__,Pe=!!this.__actions__.length,Be=S&&!Me,qe=G&&!Pe;if(!S&&ge){L=qe?L:new Xe(this);var je=e.apply(L,U);return je.__actions__.push({func:Ys,args:[xe],thisArg:r}),new mn(je,Me)}return Be&&qe?e.apply(this,U):(je=this.thru(xe),Be?a?je.value()[0]:je.value():je)})}),pn(["pop","push","shift","sort","splice","unshift"],function(e){var t=hs[e],o=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",a=/^(?:pop|shift)$/.test(e);b.prototype[e]=function(){var y=arguments;if(a&&!this.__chain__){var S=this.value();return t.apply(We(S)?S:[],y)}return this[o](function(L){return t.apply(We(L)?L:[],y)})}}),Ln(Xe.prototype,function(e,t){var o=b[t];if(o){var a=o.name+"";st.call(xi,a)||(xi[a]=[]),xi[a].push({name:t,func:o})}}),xi[ks(r,J).name]=[{name:"wrapper",func:r}],Xe.prototype.clone=iv,Xe.prototype.reverse=ov,Xe.prototype.value=sv,b.prototype.at=P2,b.prototype.chain=N2,b.prototype.commit=$2,b.prototype.next=B2,b.prototype.plant=Y2,b.prototype.reverse=U2,b.prototype.toJSON=b.prototype.valueOf=b.prototype.value=F2,b.prototype.first=b.prototype.head,so&&(b.prototype[so]=j2),b},_i=$m();zr?((zr.exports=_i)._=_i,za._=_i):Lt._=_i}).call(B0)}(qi,qi.exports)),qi.exports}var Gc=j0();function Y0(i){const n=an.c(41),{fields:r,onClose:s,queryKey:l,apiPath:d,id:m,steps:c}=i,[x,C]=ye.useState(0),[O,E]=ye.useState(!1),{data:N,isLoading:M}=mc(d,l,m),{mutateAsync:I,isError:$,error:j,isPending:J}=ba(d,l);let te;n[0]!==r?(te=new Set(r.filter(G0).map(H0)),n[0]=r,n[1]=te):te=n[1];let ne;n[2]!==te?(ne=[...te],n[2]=te,n[3]=ne):ne=n[3];const ue=ne;let Z;n[4]!==r?(Z=r.reduce(q0,{}),n[4]=r,n[5]=Z):Z=n[5];let le;n[6]!==r?(le=r.filter(z0).reduce(F0,{}),n[6]=r,n[7]=le):le=n[7];let oe;n[8]!==Z||n[9]!==le?(oe={mode:"uncontrolled",initialValues:Z,validate:le},n[8]=Z,n[9]=le,n[10]=oe):oe=n[10];const X=Mi.useForm(oe);let me;n[11]!==N||n[12]!==r||n[13]!==X?(me=()=>{if(N){const A=r.reduce((g,p)=>{const w=p.id;return g[w]=Array.isArray(N[w])?N[w]:p.type==="boolean"?N[w]??!1:p.type==="date"?N[w]?new Date(N[w]):"":N[w]??"",g},{});X.initialize(A),X.setValues(A)}},n[11]=N,n[12]=r,n[13]=X,n[14]=me):me=n[14];let de;n[15]!==N?(de=[N],n[15]=N,n[16]=de):de=n[16],ye.useEffect(me,de);let re;n[17]!==X||n[18]!==m?(re=function(g){return T.jsxs(ye.Fragment,{children:[(g.type===void 0||g.type=="text")&&T.jsx(B.TextInput,{label:g.column.title,placeholder:g.placeholder??"",...X.getInputProps(g.id),type:g.id.includes("email")?"email":void 0},X.key(g.id)),g.type==="number"&&T.jsx(B.NumberInput,{decimalSeparator:",",label:g.column.title,placeholder:g.placeholder??"",...X.getInputProps(g.id)},X.key(g.id)),g.type==="date"&&T.jsx(Zo,{label:g.column.title,placeholder:g.placeholder??"",valueFormat:"DD.MM.YYYY",clearable:!0,...X.getInputProps(g.id)},X.key(g.id)),g.type==="boolean"&&T.jsx(B.Checkbox,{mt:"md",label:g.column.title,...X.getInputProps(g.id,{type:"checkbox"})},X.key(g.id)),g.type==="custom"&&g.render&&g.render({...X.getValues(),id:m},X.setValues,E)]},g.id)},n[17]=X,n[18]=m,n[19]=re):re=n[19];const Oe=re;let Ae;n[20]!==$||n[21]!==(j==null?void 0:j.message)||n[22]!==(j==null?void 0:j.name)?(Ae=$&&T.jsx(B.Alert,{variant:"outline",color:"red",title:(j==null?void 0:j.name)??"Fehler aufgetreten",mb:"lg",children:(j==null?void 0:j.message)??"Fehler aufgetreten"}),n[20]=$,n[21]=j==null?void 0:j.message,n[22]=j==null?void 0:j.name,n[23]=Ae):Ae=n[23];let Y;n[24]!==x||n[25]!==r||n[26]!==X||n[27]!==O||n[28]!==m||n[29]!==M||n[30]!==J||n[31]!==$||n[32]!==s||n[33]!==Oe||n[34]!==c||n[35]!==ue||n[36]!==I?(Y=M?T.jsxs(B.Stack,{gap:"md",children:[T.jsx(B.Skeleton,{height:40}),Array(r.length).fill(0).map(U0),T.jsxs(B.Group,{mt:"md",justify:"end",children:[T.jsx(B.Skeleton,{width:100,height:36}),T.jsx(B.Skeleton,{width:100,height:36})]})]}):T.jsxs("form",{onSubmit:X.onSubmit(async A=>{await I({...A,id:m}),ue.length&&x<ue.length-1?$||C(x+1):$||(X.setInitialValues(A),X.reset(),s())}),children:[ue.length?T.jsx(B.Stepper,{active:x,size:"sm",children:ue.map(A=>T.jsx(B.Stepper.Step,{...c&&c[A-1]?{label:c[A-1].label}:{},children:r.filter(g=>g.step===A).map(g=>Oe(g))},A))}):r.map(A=>Oe(A)),!O&&T.jsxs(B.Group,{mt:"md",justify:"end",children:[T.jsx(B.Button,{onClick:()=>ue.length?x===0?s():C(x-1):s(),variant:"outline",children:ue.length?x===0?"Abbrechen":"Zurück":"Abbrechen"}),T.jsx(B.Button,{type:"submit",loading:J,children:ue.length?x===ue.length-1?"Speichern":"Weiter":"Speichern"})]})]}),n[24]=x,n[25]=r,n[26]=X,n[27]=O,n[28]=m,n[29]=M,n[30]=J,n[31]=$,n[32]=s,n[33]=Oe,n[34]=c,n[35]=ue,n[36]=I,n[37]=Y):Y=n[37];let R;return n[38]!==Y||n[39]!==Ae?(R=T.jsxs(T.Fragment,{children:[Ae,Y]}),n[38]=Y,n[39]=Ae,n[40]=R):R=n[40],R}function U0(i,n){return T.jsx(B.Skeleton,{height:35},`skeleton-field-${n}`)}function F0(i,n){return i[n.id]=W0,i}function W0(i){return i?null:"Pflichtfeld"}function z0(i){return i.required}function q0(i,n){return i[n.id]=n.type==="boolean"?n.defaultValue??!1:n.defaultValue??"",i}function H0(i){return i.step}function G0(i){return typeof i.step=="number"}function V0(i){const n=an.c(28),{queryKey:r,apiPath:s,onClose:l,selectedRecords:d}=i,{mutateAsync:m,isError:c,error:x,isPending:C}=_c(s,r),[O,E]=ye.useState(d);let N;n[0]!==l||n[1]!==O.length?(N=()=>{O.length||l()},n[0]=l,n[1]=O.length,n[2]=N):N=n[2];let M;if(n[3]!==l||n[4]!==O?(M=[l,O],n[3]=l,n[4]=O,n[5]=M):M=n[5],ye.useEffect(N,M),!O.length){let le;return n[6]===Symbol.for("react.memo_cache_sentinel")?(le=T.jsx(T.Fragment,{}),n[6]=le):le=n[6],le}let I;n[7]!==x||n[8]!==c?(I=c&&x.message&&T.jsx(B.Alert,{variant:"outline",color:"red",title:x.name,children:x.message}),n[7]=x,n[8]=c,n[9]=I):I=n[9];let $;n[10]===Symbol.for("react.memo_cache_sentinel")?($=T.jsx("br",{}),n[10]=$):$=n[10];let j;n[11]!==d[0].id?(j=T.jsxs(B.Text,{children:["Bist du sicher, dass du folgenden Eintrag löschen möchtest?",$,d[0].id]}),n[11]=d[0].id,n[12]=j):j=n[12];let J;n[13]!==l?(J=T.jsx(B.Button,{onClick:l,variant:"outline",children:"Abbrechen"}),n[13]=l,n[14]=J):J=n[14];let te;n[15]!==m||n[16]!==O[0].id?(te=async()=>{await m(O[0].id),E(le=>le.filter(oe=>oe.id!==O[0].id))},n[15]=m,n[16]=O[0].id,n[17]=te):te=n[17];let ne;n[18]!==C||n[19]!==te?(ne=T.jsx(B.Button,{color:"red",loading:C,onClick:te,children:"Delete"}),n[18]=C,n[19]=te,n[20]=ne):ne=n[20];let ue;n[21]!==J||n[22]!==ne?(ue=T.jsxs(B.Group,{mt:"md",justify:"end",children:[J,ne]}),n[21]=J,n[22]=ne,n[23]=ue):ue=n[23];let Z;return n[24]!==I||n[25]!==j||n[26]!==ue?(Z=T.jsxs(T.Fragment,{children:[I,j,ue]}),n[24]=I,n[25]=j,n[26]=ue,n[27]=Z):Z=n[27],Z}function Vc(i,n){const r=an.c(8);let s;r[0]!==i||r[1]!==n?(s=()=>{const C=localStorage.getItem(`use_persistent_storage_${n}`);return C?JSON.parse(C):i},r[0]=i,r[1]=n,r[2]=s):s=r[2];const[l,d]=ye.useState(s);let m;r[3]!==n?(m=C=>{d(C),localStorage.setItem(`use_persistent_storage_${n}`,JSON.stringify(C))},r[3]=n,r[4]=m):m=r[4];const c=m;let x;return r[5]!==c||r[6]!==l?(x=[l,c],r[5]=c,r[6]=l,r[7]=x):x=r[7],x}const Zc=[10,15,20,50,100,500];function Z0(i){const n=an.c(130),{title:r,queryKey:s,connectedQueryKeys:l,apiPath:d,buttons:m,fields:c,selection:x,pagination:C,filters:O,actions:E,steps:N,defaultSort:M,createButtonText:I}=i,{data:$,isLoading:j,isError:J,isRefetching:te,refetch:ne}=vc(d,s);let ue;n[0]===Symbol.for("react.memo_cache_sentinel")?(ue=[],n[0]=ue):ue=n[0];const[Z,le]=ye.useState(ue),{queryClient:oe}=nr();let X;n[1]!==$||n[2]!==l||n[3]!==O||n[4]!==oe?(X=()=>{if(!(!$||!Array.isArray($))){if(l==null||l.forEach(dt=>oe.invalidateQueries({queryKey:dt})),!O||O.length===0){le($);return}le($.filter(dt=>O.every(Mt=>{const pr=Mt.id;if(Mt.type==="query"&&typeof Mt.value=="string"){const gr=dt[pr];return typeof gr=="string"&&gr.includes(Mt.value)}else if(Mt.type==="date"){if(!Mt.value)return!0;const gr=Mt.value,[mr,ci]=gr;if(mr&&ci){const fi=dt[pr];if(typeof fi=="string"){const hi=new Date(fi);return hi>=mr&&hi<=ci}}return!0}return!0})))}},n[1]=$,n[2]=l,n[3]=O,n[4]=oe,n[5]=X):X=n[5];let me;n[6]!==$||n[7]!==O?(me=[$,O],n[6]=$,n[7]=O,n[8]=me):me=n[8],ye.useEffect(X,me);const de=(M==null?void 0:M.field)??c[0].id,re=(M==null?void 0:M.direction)??"desc";let Oe;n[9]!==de||n[10]!==re?(Oe={columnAccessor:de,direction:re},n[9]=de,n[10]=re,n[11]=Oe):Oe=n[11];const[Ae,Y]=ye.useState(Oe);let R;n[12]!==Z||n[13]!==(M==null?void 0:M.direction)||n[14]!==(M==null?void 0:M.field)||n[15]!==c[0]?(R=()=>{const dt=Gc.sortBy(Z,(M==null?void 0:M.field)??c[0].id);return(M==null?void 0:M.direction)==="asc"?dt:dt.reverse()},n[12]=Z,n[13]=M==null?void 0:M.direction,n[14]=M==null?void 0:M.field,n[15]=c[0],n[16]=R):R=n[16];const[A,g]=ye.useState(R);let p;n[17]!==Z||n[18]!==Ae.columnAccessor||n[19]!==Ae.direction?(p=()=>{const dt=Gc.sortBy(Z,Ae.columnAccessor);g(Ae.direction==="desc"?dt.reverse():dt)},n[17]=Z,n[18]=Ae.columnAccessor,n[19]=Ae.direction,n[20]=p):p=n[20];let w;n[21]!==Z||n[22]!==Ae?(w=[Ae,Z],n[21]=Z,n[22]=Ae,n[23]=w):w=n[23],ye.useEffect(p,w);const[h,v]=Vc(Zc[1],"mantine-table-page-size"),[D,W]=ye.useState(1);let V;n[24]!==h||n[25]!==C||n[26]!==A?(V=C?A.slice(0,h):A,n[24]=h,n[25]=C,n[26]=A,n[27]=V):V=n[27];const[ae,fe]=ye.useState(V);let we;n[28]===Symbol.for("react.memo_cache_sentinel")?(we=()=>{W(1)},n[28]=we):we=n[28];let ee;n[29]!==h?(ee=[h],n[29]=h,n[30]=ee):ee=n[30],ye.useEffect(we,ee);let he,De;n[31]!==D||n[32]!==h||n[33]!==C||n[34]!==A?(he=()=>{if(C){const dt=(D-1)*h,Mt=dt+h;fe(A.slice(dt,Mt))}else fe(A)},De=[D,A,C,h],n[31]=D,n[32]=h,n[33]=C,n[34]=A,n[35]=he,n[36]=De):(he=n[35],De=n[36]),ye.useEffect(he,De);let _e;n[37]===Symbol.for("react.memo_cache_sentinel")?(_e=[],n[37]=_e):_e=n[37];const[P,z]=ye.useState(_e);let F;n[38]!==P||n[39]!==x||n[40]!==A?(F=()=>{x&&z(A.filter(dt=>P.some(Mt=>Mt.id===dt.id)))},n[38]=P,n[39]=x,n[40]=A,n[41]=F):F=n[41];let K;n[42]!==A?(K=[A],n[42]=A,n[43]=K):K=n[43],ye.useEffect(F,K);const[se,Te]=ye.useState(!1),[u,f]=ye.useState(!1),[_,k]=ye.useState(!1),q=r?"space-between":"end";let Q;n[44]!==r?(Q=r&&(typeof r=="string"?T.jsx(B.Title,{order:4,children:r}):r),n[44]=r,n[45]=Q):Q=n[45];let Ce;n[46]!==ne?(Ce=()=>ne(),n[46]=ne,n[47]=Ce):Ce=n[47];let be;n[48]===Symbol.for("react.memo_cache_sentinel")?(be=T.jsx(Ei.IconRefresh,{}),n[48]=be):be=n[48];let Re;n[49]!==Ce?(Re=T.jsx(B.ActionIcon,{variant:"subtle",onClick:Ce,"aria-label":"Neuladen",children:be}),n[49]=Ce,n[50]=Re):Re=n[50];let Se;n[51]!==E||n[52]!==c||n[53]!==P||n[54]!==x?(Se=(c.some(rm)||x)&&T.jsxs(B.Menu,{shadow:"md",children:[T.jsx(B.Menu.Target,{children:T.jsx(B.Button,{variant:"outline",rightSection:T.jsx(Ei.IconCaretDownFilled,{size:14}),disabled:!P.length,children:"Aktionen"})}),T.jsxs(B.Menu.Dropdown,{children:[c.find(nm)&&T.jsx(B.Menu.Item,{leftSection:T.jsx(Ei.IconPencil,{size:14}),onClick:()=>f(!0),disabled:P.length!==1,children:"Bearbeiten"}),(E??[]).map((dt,Mt)=>ye.createElement(B.Menu.Item,{...dt.icon&&{leftSection:dt.icon},key:`custom_action_${Mt}`,onClick:()=>dt.onClick(P)},dt.label)),c.find(tm)&&T.jsx(B.Menu.Item,{leftSection:T.jsx(Ei.IconTrash,{size:14}),onClick:()=>k(!0),color:"red",children:"Löschen"})]})]}),n[51]=E,n[52]=c,n[53]=P,n[54]=x,n[55]=Se):Se=n[55];let Le;n[56]!==I||n[57]!==c||n[58]!==j?(Le=c.find(em)&&T.jsx(B.Button,{onClick:()=>Te(!0),disabled:j,children:I??"Erstellen"}),n[56]=I,n[57]=c,n[58]=j,n[59]=Le):Le=n[59];let Ne;n[60]!==m||n[61]!==Re||n[62]!==Se||n[63]!==Le?(Ne=T.jsxs(B.Group,{align:"center",gap:"xs",children:[Re,Se,Le,m]}),n[60]=m,n[61]=Re,n[62]=Se,n[63]=Le,n[64]=Ne):Ne=n[64];let ke;n[65]!==q||n[66]!==Q||n[67]!==Ne?(ke=T.jsxs(B.Group,{gap:"xs",justify:q,align:"center",children:[Q,Ne]}),n[65]=q,n[66]=Q,n[67]=Ne,n[68]=ke):ke=n[68];let Ge;n[69]!==J?(Ge=J&&T.jsx(B.Alert,{mt:"md",variant:"light",color:"red",title:"Es ist ein Fehler aufgetreten.",icon:T.jsx(Ei.IconInfoCircle,{}),children:"Bitte versuche es später erneut oder sende eine Nachricht an unseren Support."}),n[69]=J,n[70]=Ge):Ge=n[70];let Je;n[71]!==j||n[72]!==te?(Je=(j||te)&&T.jsxs(B.Stack,{my:"md",children:[T.jsx(B.Skeleton,{height:40}),Array(5).fill(0).map(X0)]}),n[71]=j,n[72]=te,n[73]=Je):Je=n[73];let Ve;n[74]!==c||n[75]!==J||n[76]!==j||n[77]!==te||n[78]!==D||n[79]!==h||n[80]!==C||n[81]!==ae||n[82]!==P||n[83]!==x||n[84]!==v||n[85]!==Ae||n[86]!==A?(Ve=!j&&!te&&T.jsx(N0,{my:"md",striped:!0,minHeight:150,fetching:J,records:ae,sortStatus:Ae,onSortStatusChange:Y,...x&&{selectedRecords:P,onSelectedRecordsChange:z},...C&&ae.length&&{totalRecords:A.length,recordsPerPage:h,onPageChange:W,page:D,recordsPerPageOptions:Zc,onRecordsPerPageChange:v,recordsPerPageLabel:"Einträge pro Seite"},columns:c.map(J0),noRecordsText:"Keine Einträge gefunden"}),n[74]=c,n[75]=J,n[76]=j,n[77]=te,n[78]=D,n[79]=h,n[80]=C,n[81]=ae,n[82]=P,n[83]=x,n[84]=v,n[85]=Ae,n[86]=A,n[87]=Ve):Ve=n[87];let xt;n[88]===Symbol.for("react.memo_cache_sentinel")?(xt=()=>{f(!1),z([])},n[88]=xt):xt=n[88];const vt=r??"Bearbeiten";let ut;n[89]!==d||n[90]!==c||n[91]!==s||n[92]!==P[0]||n[93]!==P.length||n[94]!==N?(ut=P.length>0&&T.jsx(Y0,{fields:c.filter(Q0),queryKey:s,apiPath:d,id:P[0].id,onClose:()=>{f(!1),z([])},steps:N}),n[89]=d,n[90]=c,n[91]=s,n[92]=P[0],n[93]=P.length,n[94]=N,n[95]=ut):ut=n[95];let qt;n[96]!==vt||n[97]!==ut||n[98]!==u?(qt=T.jsx(B.Modal,{opened:u,onClose:xt,title:vt,children:ut}),n[96]=vt,n[97]=ut,n[98]=u,n[99]=qt):qt=n[99];let Dt;n[100]===Symbol.for("react.memo_cache_sentinel")?(Dt=()=>{k(!1),z([])},n[100]=Dt):Dt=n[100];const $n=r??"Löschen";let fn;n[101]!==d||n[102]!==s||n[103]!==P?(fn=P.length>0&&T.jsx(V0,{onClose:()=>{k(!1),z([])},queryKey:s,apiPath:d,selectedRecords:P}),n[101]=d,n[102]=s,n[103]=P,n[104]=fn):fn=n[104];let Qt;n[105]!==_||n[106]!==$n||n[107]!==fn?(Qt=T.jsx(B.Modal,{opened:_,onClose:Dt,title:$n,children:fn}),n[105]=_,n[106]=$n,n[107]=fn,n[108]=Qt):Qt=n[108];let xn;n[109]===Symbol.for("react.memo_cache_sentinel")?(xn=()=>{Te(!1)},n[109]=xn):xn=n[109];const Bn=r??"Anlegen";let En;n[110]===Symbol.for("react.memo_cache_sentinel")?(En=()=>{Te(!1)},n[110]=En):En=n[110];let it;n[111]!==c?(it=c.filter(K0),n[111]=c,n[112]=it):it=n[112];let It;n[113]!==d||n[114]!==s||n[115]!==N||n[116]!==it?(It=T.jsx(U1,{queryKey:s,apiPath:d,onClose:En,fields:it,steps:N}),n[113]=d,n[114]=s,n[115]=N,n[116]=it,n[117]=It):It=n[117];let Sn;n[118]!==se||n[119]!==Bn||n[120]!==It?(Sn=T.jsx(B.Modal,{opened:se,onClose:xn,title:Bn,children:It}),n[118]=se,n[119]=Bn,n[120]=It,n[121]=Sn):Sn=n[121];let dr;return n[122]!==ke||n[123]!==Ge||n[124]!==Je||n[125]!==Ve||n[126]!==qt||n[127]!==Qt||n[128]!==Sn?(dr=T.jsxs(T.Fragment,{children:[ke,Ge,Je,Ve,qt,Qt,Sn]}),n[122]=ke,n[123]=Ge,n[124]=Je,n[125]=Ve,n[126]=qt,n[127]=Qt,n[128]=Sn,n[129]=dr):dr=n[129],dr}function K0(i){return i.create}function Q0(i){return i.update}function J0(i){return i.column}function X0(i,n){return T.jsx(B.Skeleton,{height:35},`skeleton-${n}`)}function em(i){return i.create}function tm(i){return i.delete}function nm(i){return i.update}function rm(i){return i.update}function im(i){const n=an.c(5),{queryClient:r}=nr();let s;n[0]!==i?(s=T.jsx(Z0,{...i}),n[0]=i,n[1]=s):s=n[1];let l;return n[2]!==r||n[3]!==s?(l=T.jsx(xl,{client:r,children:s}),n[2]=r,n[3]=s,n[4]=l):l=n[4],l}Ue.DataTable=im,Ue.DataTableProvider=Ng,Ue.api=Bg,Ue.createOne=pc,Ue.deleteOne=dc,Ue.getAll=fc,Ue.getApiHeaders=kr,Ue.getOne=hc,Ue.updateOne=gc,Ue.useAddOne=yc,Ue.useDataTable=nr,Ue.useDeleteOne=_c,Ue.useGetAll=vc,Ue.useGetOne=mc,Ue.usePersistentState=Vc,Ue.useUpdateOne=ba,Object.defineProperty(Ue,Symbol.toStringTag,{value:"Module"})});
144
144
  //# sourceMappingURL=index.umd.js.map