@wellesley/network 1.0.693 → 1.0.694

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.
Files changed (2) hide show
  1. package/index.mjs +4 -4
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- var H3=Object.defineProperty,K3=(e,t,n)=>t in e?H3(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,P1=(e,t,n)=>K3(e,"symbol"!=typeof t?t+"":t,n);function Y3(e,t){for(var n=0;n<t.length;n++){const r=t[n];if("string"!=typeof r&&!Array.isArray(r))for(const t in r)if("default"!==t&&!(t in e)){const n=Object.getOwnPropertyDescriptor(r,t);n&&Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>r[t]})}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function yS(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var T1=()=>Math.random().toString(36).substring(7).split("").join("."),Q3={INIT:`@@redux/INIT${T1()}`,REPLACE:`@@redux/REPLACE${T1()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${T1()}`},aC=Q3;function ld(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function X3(e){Object.keys(e).forEach((t=>{const n=e[t];if(typeof n(void 0,{type:aC.INIT})>"u")throw new Error(yS(12));if(typeof n(void 0,{type:aC.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(yS(13))}))}function F2(e){const t=Object.keys(e),n={};for(let r=0;r<t.length;r++){const o=t[r];"function"==typeof e[o]&&(n[o]=e[o])}const r=Object.keys(n);let o;try{X3(n)}catch(e){o=e}return function(e={},t){if(o)throw o;let a=!1;const i={};for(let o=0;o<r.length;o++){const s=r[o],u=n[s],l=e[s],c=u(l,t);if(typeof c>"u")throw t&&t.type,new Error(yS(14));i[s]=c,a=a||c!==l}return a=a||r.length!==Object.keys(e).length,a?i:e}}function B2(e){return ld(e)&&"type"in e&&"string"==typeof e.type}var lE=Symbol.for("immer-nothing"),tv=Symbol.for("immer-draftable"),xi=Symbol.for("immer-state");function Eo(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var zf=Object.getPrototypeOf;function gs(e){return!!e&&!!e[xi]}function ys(e){var t;return!!e&&(j2(e)||Array.isArray(e)||!!e[tv]||!(null==(t=e.constructor)||!t[tv])||Iv(e)||Rv(e))}var J3=Object.prototype.constructor.toString();function j2(e){if(!e||"object"!=typeof e)return!1;const t=zf(e);if(null===t)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===J3}function Z3(e){return gs(e)||Eo(15,e),e[xi].base_}function Am(e,t){0===Vf(e)?Object.entries(e).forEach((([n,r])=>{t(n,r,e)})):e.forEach(((n,r)=>t(r,n,e)))}function Vf(e){const t=e[xi];return t?t.type_:Array.isArray(e)?1:Iv(e)?2:Rv(e)?3:0}function lv(e,t){return 2===Vf(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function O1(e,t){return 2===Vf(e)?e.get(t):e[t]}function z2(e,t,n){const r=Vf(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function eL(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function Iv(e){return e instanceof Map}function Rv(e){return e instanceof Set}function Mf(e){return e.copy_||e.base_}function wS(e,t){if(Iv(e))return new Map(e);if(Rv(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&j2(e))return zf(e)?{...e}:Object.assign(Object.create(null),e);const n=Object.getOwnPropertyDescriptors(e);delete n[xi];let r=Reflect.ownKeys(n);for(let t=0;t<r.length;t++){const o=r[t],a=n[o];!1===a.writable&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(n[o]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[o]})}return Object.create(zf(e),n)}function cE(e,t=!1){return cy(e)||gs(e)||!ys(e)||(Vf(e)>1&&(e.set=e.add=e.clear=e.delete=tL),Object.freeze(e),t&&Am(e,((e,t)=>cE(t,!0)))),e}function tL(){Eo(2)}function cy(e){return Object.isFrozen(e)}var cv,bS={};function Uf(e){const t=bS[e];return t||Eo(0,e),t}function nL(e,t){bS[e]||(bS[e]=t)}function V2(){return cv}function rL(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function sC(e,t){t&&(Uf("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function _S(e){xS(e),e.drafts_.forEach(oL),e.drafts_=null}function xS(e){e===cv&&(cv=e.parent_)}function uC(e){return cv=rL(cv,e)}function oL(e){const t=e[xi];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function lC(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return void 0!==e&&e!==n?(n[xi].modified_&&(_S(t),Eo(4)),ys(e)&&(e=Gg(t,e),t.parent_||Hg(t,e)),t.patches_&&Uf("Patches").generateReplacementPatches_(n[xi].base_,e,t.patches_,t.inversePatches_)):e=Gg(t,n,[]),_S(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==lE?e:void 0}function Gg(e,t,n){if(cy(t))return t;const r=t[xi];if(!r)return Am(t,((o,a)=>cC(e,r,t,o,a,n))),t;if(r.scope_!==e)return t;if(!r.modified_)return Hg(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const t=r.copy_;let o=t,a=!1;3===r.type_&&(o=new Set(t),t.clear(),a=!0),Am(o,((o,i)=>cC(e,r,t,o,i,n,a))),Hg(e,t,!1),n&&e.patches_&&Uf("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function cC(e,t,n,r,o,a,i){if(gs(o)){const i=Gg(e,o,a&&t&&3!==t.type_&&!lv(t.assigned_,r)?a.concat(r):void 0);if(z2(n,r,i),!gs(i))return;e.canAutoFreeze_=!1}else i&&n.add(o);if(ys(o)&&!cy(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Gg(e,o),(!t||!t.scope_.parent_)&&Hg(e,o)}}function Hg(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&cE(t,n)}function iL(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:V2(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,a=dE;n&&(o=[r],a=dv);const{revoke:i,proxy:s}=Proxy.revocable(o,a);return r.draft_=s,r.revoke_=i,s}var dE={get(e,t){if(t===xi)return e;const n=Mf(e);if(!lv(n,t))return aL(e,n,t);const r=n[t];return e.finalized_||!ys(r)?r:r===A1(e.base_,t)?(M1(e),e.copy_[t]=ES(r,e)):r},has:(e,t)=>t in Mf(e),ownKeys:e=>Reflect.ownKeys(Mf(e)),set(e,t,n){const r=U2(Mf(e),t);if(null!=r&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=A1(Mf(e),t),o=null==r?void 0:r[xi];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(eL(n,r)&&(void 0!==n||lv(e.base_,t)))return!0;M1(e),SS(e)}return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==A1(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,M1(e),SS(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=Mf(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:r.enumerable,value:n[t]}},defineProperty(){Eo(11)},getPrototypeOf:e=>zf(e.base_),setPrototypeOf(){Eo(12)}},dv={};function A1(e,t){const n=e[xi];return(n?Mf(n):e)[t]}function aL(e,t,n){var r;const o=U2(t,n);return o?"value"in o?o.value:null==(r=o.get)?void 0:r.call(e.draft_):void 0}function U2(e,t){if(!(t in e))return;let n=zf(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=zf(n)}}function SS(e){e.modified_||(e.modified_=!0,e.parent_&&SS(e.parent_))}function M1(e){e.copy_||(e.copy_=wS(e.base_,e.scope_.immer_.useStrictShallowCopy_))}Am(dE,((e,t)=>{dv[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),dv.deleteProperty=function(e,t){return dv.set.call(this,e,t,void 0)},dv.set=function(e,t,n){return dE.set.call(this,e[0],t,n,e[0])};var sL=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,n)=>{if("function"==typeof e&&"function"!=typeof t){const n=t;t=e;const r=this;return function(e=n,...o){return r.produce(e,(e=>t.call(this,e,...o)))}}let r;if("function"!=typeof t&&Eo(6),void 0!==n&&"function"!=typeof n&&Eo(7),ys(e)){const o=uC(this),a=ES(e,void 0);let i=!0;try{r=t(a),i=!1}finally{i?_S(o):xS(o)}return sC(o,n),lC(r,o)}if(!e||"object"!=typeof e){if(r=t(e),void 0===r&&(r=e),r===lE&&(r=void 0),this.autoFreeze_&&cE(r,!0),n){const t=[],o=[];Uf("Patches").generateReplacementPatches_(e,r,t,o),n(t,o)}return r}Eo(1,e)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...n)=>this.produceWithPatches(t,(t=>e(t,...n)));let n,r;return[this.produce(e,t,((e,t)=>{n=e,r=t})),n,r]},"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof(null==e?void 0:e.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){ys(e)||Eo(8),gs(e)&&(e=W2(e));const t=uC(this),n=ES(e,void 0);return n[xi].isManual_=!0,xS(t),n}finishDraft(e,t){const n=e&&e[xi];(!n||!n.isManual_)&&Eo(9);const{scope_:r}=n;return sC(r,t),lC(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));const r=Uf("Patches").applyPatches_;return gs(e)?r(e,t):this.produce(e,(e=>r(e,t)))}};function ES(e,t){const n=Iv(e)?Uf("MapSet").proxyMap_(e,t):Rv(e)?Uf("MapSet").proxySet_(e,t):iL(e,t);return(t?t.scope_:V2()).drafts_.push(n),n}function W2(e){return gs(e)||Eo(10,e),q2(e)}function q2(e){if(!ys(e)||cy(e))return e;const t=e[xi];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=wS(e,t.scope_.immer_.useStrictShallowCopy_)}else n=wS(e,!0);return Am(n,((e,t)=>{z2(n,e,q2(t))})),t&&(t.finalized_=!1),n}function uL(){const e="replace",t="remove";function n(e){if(!ys(e))return e;if(Array.isArray(e))return e.map(n);if(Iv(e))return new Map(Array.from(e.entries()).map((([e,t])=>[e,n(t)])));if(Rv(e))return new Set(Array.from(e).map(n));const t=Object.create(zf(e));for(const r in e)t[r]=n(e[r]);return lv(e,tv)&&(t[tv]=e[tv]),t}function r(e){return gs(e)?n(e):e}nL("Patches",{applyPatches_:function(r,o){return o.forEach((o=>{const{path:a,op:i}=o;let s=r;for(let e=0;e<a.length-1;e++){const t=Vf(s);let n=a[e];"string"!=typeof n&&"number"!=typeof n&&(n=""+n),(0===t||1===t)&&("__proto__"===n||"constructor"===n)&&Eo(19),"function"==typeof s&&"prototype"===n&&Eo(19),s=O1(s,n),"object"!=typeof s&&Eo(18,a.join("/"))}const u=Vf(s),l=n(o.value),c=a[a.length-1];switch(i){case e:switch(u){case 2:return s.set(c,l);case 3:Eo(16);default:return s[c]=l}case"add":switch(u){case 1:return"-"===c?s.push(l):s.splice(c,0,l);case 2:return s.set(c,l);case 3:return s.add(l);default:return s[c]=l}case t:switch(u){case 1:return s.splice(c,1);case 2:return s.delete(c);case 3:return s.delete(o.value);default:return delete s[c]}default:Eo(17,i)}})),r},generatePatches_:function(n,o,a,i){switch(n.type_){case 0:case 2:return function(n,o,a,i){const{base_:s,copy_:u}=n;Am(n.assigned_,((n,l)=>{const c=O1(s,n),d=O1(u,n),f=l?lv(s,n)?e:"add":t;if(c===d&&f===e)return;const p=o.concat(n);a.push(f===t?{op:f,path:p}:{op:f,path:p,value:d}),i.push("add"===f?{op:t,path:p}:f===t?{op:"add",path:p,value:r(c)}:{op:e,path:p,value:r(c)})}))}(n,o,a,i);case 1:return function(n,o,a,i){let{base_:s,assigned_:u}=n,l=n.copy_;l.length<s.length&&([s,l]=[l,s],[a,i]=[i,a]);for(let t=0;t<s.length;t++)if(u[t]&&l[t]!==s[t]){const n=o.concat([t]);a.push({op:e,path:n,value:r(l[t])}),i.push({op:e,path:n,value:r(s[t])})}for(let e=s.length;e<l.length;e++){const t=o.concat([e]);a.push({op:"add",path:t,value:r(l[e])})}for(let e=l.length-1;s.length<=e;--e){const n=o.concat([e]);i.push({op:t,path:n})}}(n,o,a,i);case 3:return function(e,n,r,o){let{base_:a,copy_:i}=e,s=0;a.forEach((e=>{if(!i.has(e)){const a=n.concat([s]);r.push({op:t,path:a,value:e}),o.unshift({op:"add",path:a,value:e})}s++})),s=0,i.forEach((e=>{if(!a.has(e)){const a=n.concat([s]);r.push({op:"add",path:a,value:e}),o.unshift({op:t,path:a,value:e})}s++}))}(n,o,a,i)}},generateReplacementPatches_:function(t,n,r,o){r.push({op:e,path:[],value:n===lE?void 0:n}),o.push({op:e,path:[],value:t})}})}var Zi=new sL,Pv=Zi.produce,G2=Zi.produceWithPatches.bind(Zi);Zi.setAutoFreeze.bind(Zi),Zi.setUseStrictShallowCopy.bind(Zi);var dC=Zi.applyPatches.bind(Zi);function lL(e,t="expected a function, instead received "+typeof e){if("function"!=typeof e)throw new TypeError(t)}function cL(e,t="expected an object, instead received "+typeof e){if("object"!=typeof e)throw new TypeError(t)}function dL(e,t="expected all items to be functions, instead received the following types: "){if(!e.every((e=>"function"==typeof e))){const n=e.map((e=>"function"==typeof e?`function ${e.name||"unnamed"}()`:typeof e)).join(", ");throw new TypeError(`${t}[${n}]`)}}Zi.createDraft.bind(Zi),Zi.finishDraft.bind(Zi);var fC=e=>Array.isArray(e)?e:[e];function fL(e){const t=Array.isArray(e[0])?e[0]:e;return dL(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function pL(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var mL=class{constructor(e){this.value=e}deref(){return this.value}},hL=typeof WeakRef<"u"?WeakRef:mL,vL=0,pC=1;function vg(){return{s:vL,v:void 0,o:null,p:null}}function fv(e,t={}){let n=vg();const{resultEqualityCheck:r}=t;let o,a=0;function i(){var t;let i=n;const{length:s}=arguments;for(let e=0,t=s;e<t;e++){const t=arguments[e];if("function"==typeof t||"object"==typeof t&&null!==t){let e=i.o;null===e&&(i.o=e=new WeakMap);const n=e.get(t);void 0===n?(i=vg(),e.set(t,i)):i=n}else{let e=i.p;null===e&&(i.p=e=new Map);const n=e.get(t);void 0===n?(i=vg(),e.set(t,i)):i=n}}const u=i;let l;if(i.s===pC?l=i.v:(l=e.apply(null,arguments),a++),u.s=pC,r){const e=(null==(t=null==o?void 0:o.deref)?void 0:t.call(o))??o;null!=e&&r(e,l)&&(l=e,0!==a&&a--),o="object"==typeof l&&null!==l||"function"==typeof l?new hL(l):l}return u.v=l,l}return i.clearCache=()=>{n=vg(),i.resetResultsCount()},i.resultsCount=()=>a,i.resetResultsCount=()=>{a=0},i}function H2(e,...t){const n="function"==typeof e?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t,r=0,o=0,a={},i=e.pop();"object"==typeof i&&(a=i,i=e.pop()),lL(i,`createSelector expects an output function after the inputs, but received: [${typeof i}]`);const s={...n,...a},{memoize:u,memoizeOptions:l=[],argsMemoize:c=fv,argsMemoizeOptions:d=[],devModeChecks:f={}}=s,p=fC(l),m=fC(d),v=fL(e),h=u((function(){return r++,i.apply(null,arguments)}),...p),g=c((function(){o++;const e=pL(v,arguments);return t=h.apply(null,e),t}),...m);return Object.assign(g,{resultFunc:i,memoizedResultFunc:h,dependencies:v,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>t,recomputations:()=>r,resetRecomputations:()=>{r=0},memoize:u,argsMemoize:c})};return Object.assign(r,{withTypes:()=>r}),r}var Zn=H2(fv),gL=Object.assign(((e,t=Zn)=>{cL(e,"createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+typeof e);const n=Object.keys(e);return t(n.map((t=>e[t])),((...e)=>e.reduce(((e,t,r)=>(e[n[r]]=t,e)),{})))}),{withTypes:()=>gL}),yL=(...e)=>{const t=H2(...e),n=Object.assign(((...e)=>{const n=t(...e),r=(e,...t)=>n(gs(e)?W2(e):e,...t);return Object.assign(r,n),r}),{withTypes:()=>n});return n};yL(fv);var wL=e=>e&&"function"==typeof e.match;function Vn(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw new Error($o(0));return{type:e,payload:r.payload,..."meta"in r&&{meta:r.meta},..."error"in r&&{error:r.error}}}return{type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>B2(t)&&t.type===e,n}function mC(e){return ys(e)?Pv(e,(()=>{})):e}function $S(e,t,n){if(e.has(t)){let r=e.get(t);return n.update&&(r=n.update(r,t,e),e.set(t,r)),r}if(!n.insert)throw new Error($o(10));const r=n.insert(t,e);return e.set(t,r),r}var Yh="RTK_autoBatch",jh=()=>e=>({payload:e,meta:{[Yh]:!0}});function K2(e){const t={},n=[];let r;const o={addCase(e,n){const r="string"==typeof e?e:e.type;if(!r)throw new Error($o(28));if(r in t)throw new Error($o(29));return t[r]=n,o},addMatcher:(e,t)=>(n.push({matcher:e,reducer:t}),o),addDefaultCase:e=>(r=e,o)};return e(o),[t,n,r]}function bL(e){return"function"==typeof e}function _L(e,t){let n,[r,o,a]=K2(t);if(bL(e))n=()=>mC(e());else{const t=mC(e);n=()=>t}function i(e=n(),t){let i=[r[t.type],...o.filter((({matcher:e})=>e(t))).map((({reducer:e})=>e))];return 0===i.filter((e=>!!e)).length&&(i=[a]),i.reduce(((e,n)=>{if(n){if(gs(e)){const r=n(e,t);return void 0===r?e:r}if(ys(e))return Pv(e,(e=>n(e,t)));{const r=n(e,t);if(void 0===r){if(null===e)return e;throw new Error($o(9))}return r}}return e}),e)}return i.getInitialState=n,i}var xL="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",dy=(e=21)=>{let t="",n=e;for(;n--;)t+=xL[64*Math.random()|0];return t},Y2=(e,t)=>wL(e)?e.match(t):e(t);function cd(...e){return t=>e.some((e=>Y2(e,t)))}function nv(...e){return t=>e.every((e=>Y2(e,t)))}function fy(e,t){if(!e||!e.meta)return!1;const n="string"==typeof e.meta.requestId,r=t.indexOf(e.meta.requestStatus)>-1;return n&&r}function Tv(e){return"function"==typeof e[0]&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function fE(...e){return 0===e.length?e=>fy(e,["pending"]):Tv(e)?t=>cd(...e.map((e=>e.pending)))(t):fE()(e[0])}function Mm(...e){return 0===e.length?e=>fy(e,["rejected"]):Tv(e)?t=>cd(...e.map((e=>e.rejected)))(t):Mm()(e[0])}function py(...e){const t=e=>e&&e.meta&&e.meta.rejectedWithValue;return 0===e.length||Tv(e)?n=>nv(Mm(...e),t)(n):py()(e[0])}function dd(...e){return 0===e.length?e=>fy(e,["fulfilled"]):Tv(e)?t=>cd(...e.map((e=>e.fulfilled)))(t):dd()(e[0])}function CS(...e){return 0===e.length?e=>fy(e,["pending","fulfilled","rejected"]):Tv(e)?t=>{const n=[];for(const t of e)n.push(t.pending,t.rejected,t.fulfilled);return cd(...n)(t)}:CS()(e[0])}var SL=["name","message","stack","code"],D1=class{constructor(e,t){P1(this,"_type"),this.payload=e,this.meta=t}},hC=class{constructor(e,t){P1(this,"_type"),this.payload=e,this.meta=t}},EL=e=>{if("object"==typeof e&&null!==e){const t={};for(const n of SL)"string"==typeof e[n]&&(t[n]=e[n]);return t}return{message:String(e)}},vC=(()=>{function e(e,t,n){const r=Vn(e+"/fulfilled",((e,t,n,r)=>({payload:e,meta:{...r||{},arg:n,requestId:t,requestStatus:"fulfilled"}}))),o=Vn(e+"/pending",((e,t,n)=>({payload:void 0,meta:{...n||{},arg:t,requestId:e,requestStatus:"pending"}}))),a=Vn(e+"/rejected",((e,t,r,o,a)=>({payload:o,error:(n&&n.serializeError||EL)(e||"Rejected"),meta:{...a||{},arg:r,requestId:t,rejectedWithValue:!!o,requestStatus:"rejected",aborted:"AbortError"===(null==e?void 0:e.name),condition:"ConditionError"===(null==e?void 0:e.name)}})));return Object.assign((function(e){return(i,s,u)=>{const l=null!=n&&n.idGenerator?n.idGenerator(e):dy(),c=new AbortController;let d,f;function p(e){f=e,c.abort()}const m=async function(){var m,v;let h;try{let a=null==(m=null==n?void 0:n.condition)?void 0:m.call(n,e,{getState:s,extra:u});if(CL(a)&&(a=await a),!1===a||c.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const g=new Promise(((e,t)=>{d=()=>{t({name:"AbortError",message:f||"Aborted"})},c.signal.addEventListener("abort",d)}));i(o(l,e,null==(v=null==n?void 0:n.getPendingMeta)?void 0:v.call(n,{requestId:l,arg:e},{getState:s,extra:u}))),h=await Promise.race([g,Promise.resolve(t(e,{dispatch:i,getState:s,extra:u,requestId:l,signal:c.signal,abort:p,rejectWithValue:(e,t)=>new D1(e,t),fulfillWithValue:(e,t)=>new hC(e,t)})).then((t=>{if(t instanceof D1)throw t;return t instanceof hC?r(t.payload,l,e,t.meta):r(t,l,e)}))])}catch(t){h=t instanceof D1?a(null,l,e,t.payload,t.meta):a(t,l,e)}finally{d&&c.signal.removeEventListener("abort",d)}return n&&!n.dispatchConditionRejection&&a.match(h)&&h.meta.condition||i(h),h}();return Object.assign(m,{abort:p,requestId:l,arg:e,unwrap:()=>m.then($L)})}}),{pending:o,rejected:a,fulfilled:r,settled:cd(a,r),typePrefix:e})}return e.withTypes=()=>e,e})();function $L(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function CL(e){return null!==e&&"object"==typeof e&&"function"==typeof e.then}var IL=Symbol.for("rtk-slice-createasyncthunk");function RL(e,t){return`${e}/${t}`}function PL({creators:e}={}){var t;const n=null==(t=null==e?void 0:e.asyncThunk)?void 0:t[IL];return function(e){const{name:t,reducerPath:r=t}=e;if(!t)throw new Error($o(11));const o=("function"==typeof e.reducers?e.reducers(OL()):e.reducers)||{},a=Object.keys(o),i={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(e,t){const n="string"==typeof e?e:e.type;if(!n)throw new Error($o(12));if(n in i.sliceCaseReducersByType)throw new Error($o(13));return i.sliceCaseReducersByType[n]=t,s},addMatcher:(e,t)=>(i.sliceMatchers.push({matcher:e,reducer:t}),s),exposeAction:(e,t)=>(i.actionCreators[e]=t,s),exposeCaseReducer:(e,t)=>(i.sliceCaseReducersByName[e]=t,s)};function u(){const[t={},n=[],r]="function"==typeof e.extraReducers?K2(e.extraReducers):[e.extraReducers],o={...t,...i.sliceCaseReducersByType};return _L(e.initialState,(e=>{for(let t in o)e.addCase(t,o[t]);for(let t of i.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of n)e.addMatcher(t.matcher,t.reducer);r&&e.addDefaultCase(r)}))}a.forEach((r=>{const a=o[r],i={reducerName:r,type:RL(t,r),createNotation:"function"==typeof e.reducers};ML(a)?NL(i,a,s,n):AL(i,a,s)}));const l=e=>e,c=new Map;let d;function f(e,t){return d||(d=u()),d(e,t)}function p(){return d||(d=u()),d.getInitialState()}function m(t,n=!1){function r(e){let r=e[t];return typeof r>"u"&&n&&(r=p()),r}function o(t=l){const r=$S(c,n,{insert:()=>new WeakMap});return $S(r,t,{insert:()=>{const r={};for(const[o,a]of Object.entries(e.selectors??{}))r[o]=TL(a,t,p,n);return r}})}return{reducerPath:t,getSelectors:o,get selectors(){return o(r)},selectSlice:r}}const v={name:t,reducer:f,actions:i.actionCreators,caseReducers:i.sliceCaseReducersByName,getInitialState:p,...m(r),injectInto(e,{reducerPath:t,...n}={}){const o=t??r;return e.inject({reducerPath:o,reducer:f},n),{...v,...m(o,!0)}}};return v}}function TL(e,t,n,r){function o(o,...a){let i=t(o);return typeof i>"u"&&r&&(i=n()),e(i,...a)}return o.unwrapped=e,o}var oo=PL();function OL(){function e(e,t){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer:e=>Object.assign({[e.name]:(...t)=>e(...t)}[e.name],{_reducerDefinitionType:"reducer"}),preparedReducer:(e,t)=>({_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:t}),asyncThunk:e}}function AL({type:e,reducerName:t,createNotation:n},r,o){let a,i;if("reducer"in r){if(n&&!DL(r))throw new Error($o(17));a=r.reducer,i=r.prepare}else a=r;o.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,i?Vn(e,i):Vn(e))}function ML(e){return"asyncThunk"===e._reducerDefinitionType}function DL(e){return"reducerWithPrepare"===e._reducerDefinitionType}function NL({type:e,reducerName:t},n,r,o){if(!o)throw new Error($o(18));const{payloadCreator:a,fulfilled:i,pending:s,rejected:u,settled:l,options:c}=n,d=o(e,a,c);r.exposeAction(t,d),i&&r.addCase(d.fulfilled,i),s&&r.addCase(d.pending,s),u&&r.addCase(d.rejected,u),l&&r.addMatcher(d.settled,l),r.exposeCaseReducer(t,{fulfilled:i||gg,pending:s||gg,rejected:u||gg,settled:l||gg})}function gg(){}var kL=(e,t)=>{if("function"!=typeof e)throw new Error($o(32))},pE="listenerMiddleware",LL=e=>{let{type:t,actionCreator:n,matcher:r,predicate:o,effect:a}=e;if(t)o=Vn(t).match;else if(n)t=n.type,o=n.match;else if(r)o=r;else if(!o)throw new Error($o(21));return kL(a),{predicate:o,type:t,effect:a}},FL=Object.assign((e=>{const{type:t,predicate:n,effect:r}=LL(e);return{id:dy(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error($o(22))}}}),{withTypes:()=>FL}),BL=Object.assign(Vn(`${pE}/add`),{withTypes:()=>BL});Vn(`${pE}/removeAll`);var jL=Object.assign(Vn(`${pE}/remove`),{withTypes:()=>jL}),zL=e=>"reducerPath"in e&&"string"==typeof e.reducerPath,VL=e=>e.flatMap((e=>zL(e)?[[e.reducerPath,e.reducer]]:Object.entries(e))),mE=Symbol.for("rtk-state-proxy-original"),UL=e=>!!e&&!!e[mE],WL=new WeakMap,qL=(e,t)=>$S(WL,e,{insert:()=>new Proxy(e,{get:(e,n,r)=>{if(n===mE)return e;const o=Reflect.get(e,n,r);if(typeof o>"u"){const e=t[n.toString()];if(e){const t=e(void 0,{type:dy()});if(typeof t>"u")throw new Error($o(24));return t}}return o}})}),GL=e=>{if(!UL(e))throw new Error($o(25));return e[mE]},HL=(e={})=>e;function KL(...e){const t=Object.fromEntries(VL(e)),n=()=>Object.keys(t).length?F2(t):HL;let r=n();function o(e,t){return r(e,t)}o.withLazyLoadedSlices=()=>o;const a=Object.assign((function(e,n){return function(r,...o){return e(qL(n?n(r,...o):r,t),...o)}}),{original:GL});return Object.assign(o,{inject:(e,a={})=>{const{reducerPath:i,reducer:s}=e,u=t[i];return!a.overrideExisting&&u&&u!==s||(t[i]=s,r=n()),o},selector:a})}function $o(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}function YL(){return!(typeof navigator<"u"&&"boolean"==typeof navigator.onLine)||navigator.onLine}const QL={isOnline:YL()},Kg=oo({name:"network",initialState:QL,reducers:{setOnline:(e,{payload:t})=>{e.isOnline=t}},selectors:{selectOnline:e=>e.isOnline}});var Da=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function my(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var gC,yC,N1={exports:{}},Tt={};
1
+ var H3=Object.defineProperty,K3=(e,t,n)=>t in e?H3(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,P1=(e,t,n)=>K3(e,"symbol"!=typeof t?t+"":t,n);function Y3(e,t){for(var n=0;n<t.length;n++){const r=t[n];if("string"!=typeof r&&!Array.isArray(r))for(const t in r)if("default"!==t&&!(t in e)){const n=Object.getOwnPropertyDescriptor(r,t);n&&Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>r[t]})}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function yS(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var T1=()=>Math.random().toString(36).substring(7).split("").join("."),Q3={INIT:`@@redux/INIT${T1()}`,REPLACE:`@@redux/REPLACE${T1()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${T1()}`},aC=Q3;function ld(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function X3(e){Object.keys(e).forEach((t=>{const n=e[t];if(typeof n(void 0,{type:aC.INIT})>"u")throw new Error(yS(12));if(typeof n(void 0,{type:aC.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(yS(13))}))}function FO(e){const t=Object.keys(e),n={};for(let r=0;r<t.length;r++){const o=t[r];"function"==typeof e[o]&&(n[o]=e[o])}const r=Object.keys(n);let o;try{X3(n)}catch(e){o=e}return function(e={},t){if(o)throw o;let a=!1;const i={};for(let o=0;o<r.length;o++){const s=r[o],u=n[s],l=e[s],c=u(l,t);if(typeof c>"u")throw t&&t.type,new Error(yS(14));i[s]=c,a=a||c!==l}return a=a||r.length!==Object.keys(e).length,a?i:e}}function BO(e){return ld(e)&&"type"in e&&"string"==typeof e.type}var lE=Symbol.for("immer-nothing"),tv=Symbol.for("immer-draftable"),xi=Symbol.for("immer-state");function Eo(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var zf=Object.getPrototypeOf;function gs(e){return!!e&&!!e[xi]}function ys(e){var t;return!!e&&(jO(e)||Array.isArray(e)||!!e[tv]||!(null==(t=e.constructor)||!t[tv])||Iv(e)||Rv(e))}var J3=Object.prototype.constructor.toString();function jO(e){if(!e||"object"!=typeof e)return!1;const t=zf(e);if(null===t)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===J3}function Z3(e){return gs(e)||Eo(15,e),e[xi].base_}function Am(e,t){0===Vf(e)?Object.entries(e).forEach((([n,r])=>{t(n,r,e)})):e.forEach(((n,r)=>t(r,n,e)))}function Vf(e){const t=e[xi];return t?t.type_:Array.isArray(e)?1:Iv(e)?2:Rv(e)?3:0}function lv(e,t){return 2===Vf(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function O1(e,t){return 2===Vf(e)?e.get(t):e[t]}function zO(e,t,n){const r=Vf(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function eL(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function Iv(e){return e instanceof Map}function Rv(e){return e instanceof Set}function Mf(e){return e.copy_||e.base_}function wS(e,t){if(Iv(e))return new Map(e);if(Rv(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&jO(e))return zf(e)?{...e}:Object.assign(Object.create(null),e);const n=Object.getOwnPropertyDescriptors(e);delete n[xi];let r=Reflect.ownKeys(n);for(let t=0;t<r.length;t++){const o=r[t],a=n[o];!1===a.writable&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(n[o]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[o]})}return Object.create(zf(e),n)}function cE(e,t=!1){return cy(e)||gs(e)||!ys(e)||(Vf(e)>1&&(e.set=e.add=e.clear=e.delete=tL),Object.freeze(e),t&&Am(e,((e,t)=>cE(t,!0)))),e}function tL(){Eo(2)}function cy(e){return Object.isFrozen(e)}var cv,bS={};function Uf(e){const t=bS[e];return t||Eo(0,e),t}function nL(e,t){bS[e]||(bS[e]=t)}function VO(){return cv}function rL(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function sC(e,t){t&&(Uf("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function _S(e){xS(e),e.drafts_.forEach(oL),e.drafts_=null}function xS(e){e===cv&&(cv=e.parent_)}function uC(e){return cv=rL(cv,e)}function oL(e){const t=e[xi];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function lC(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return void 0!==e&&e!==n?(n[xi].modified_&&(_S(t),Eo(4)),ys(e)&&(e=Gg(t,e),t.parent_||Hg(t,e)),t.patches_&&Uf("Patches").generateReplacementPatches_(n[xi].base_,e,t.patches_,t.inversePatches_)):e=Gg(t,n,[]),_S(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==lE?e:void 0}function Gg(e,t,n){if(cy(t))return t;const r=t[xi];if(!r)return Am(t,((o,a)=>cC(e,r,t,o,a,n))),t;if(r.scope_!==e)return t;if(!r.modified_)return Hg(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const t=r.copy_;let o=t,a=!1;3===r.type_&&(o=new Set(t),t.clear(),a=!0),Am(o,((o,i)=>cC(e,r,t,o,i,n,a))),Hg(e,t,!1),n&&e.patches_&&Uf("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function cC(e,t,n,r,o,a,i){if(gs(o)){const i=Gg(e,o,a&&t&&3!==t.type_&&!lv(t.assigned_,r)?a.concat(r):void 0);if(zO(n,r,i),!gs(i))return;e.canAutoFreeze_=!1}else i&&n.add(o);if(ys(o)&&!cy(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Gg(e,o),(!t||!t.scope_.parent_)&&Hg(e,o)}}function Hg(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&cE(t,n)}function iL(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:VO(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,a=dE;n&&(o=[r],a=dv);const{revoke:i,proxy:s}=Proxy.revocable(o,a);return r.draft_=s,r.revoke_=i,s}var dE={get(e,t){if(t===xi)return e;const n=Mf(e);if(!lv(n,t))return aL(e,n,t);const r=n[t];return e.finalized_||!ys(r)?r:r===A1(e.base_,t)?(M1(e),e.copy_[t]=ES(r,e)):r},has:(e,t)=>t in Mf(e),ownKeys:e=>Reflect.ownKeys(Mf(e)),set(e,t,n){const r=UO(Mf(e),t);if(null!=r&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=A1(Mf(e),t),o=null==r?void 0:r[xi];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(eL(n,r)&&(void 0!==n||lv(e.base_,t)))return!0;M1(e),SS(e)}return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==A1(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,M1(e),SS(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=Mf(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:r.enumerable,value:n[t]}},defineProperty(){Eo(11)},getPrototypeOf:e=>zf(e.base_),setPrototypeOf(){Eo(12)}},dv={};function A1(e,t){const n=e[xi];return(n?Mf(n):e)[t]}function aL(e,t,n){var r;const o=UO(t,n);return o?"value"in o?o.value:null==(r=o.get)?void 0:r.call(e.draft_):void 0}function UO(e,t){if(!(t in e))return;let n=zf(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=zf(n)}}function SS(e){e.modified_||(e.modified_=!0,e.parent_&&SS(e.parent_))}function M1(e){e.copy_||(e.copy_=wS(e.base_,e.scope_.immer_.useStrictShallowCopy_))}Am(dE,((e,t)=>{dv[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),dv.deleteProperty=function(e,t){return dv.set.call(this,e,t,void 0)},dv.set=function(e,t,n){return dE.set.call(this,e[0],t,n,e[0])};var sL=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,n)=>{if("function"==typeof e&&"function"!=typeof t){const n=t;t=e;const r=this;return function(e=n,...o){return r.produce(e,(e=>t.call(this,e,...o)))}}let r;if("function"!=typeof t&&Eo(6),void 0!==n&&"function"!=typeof n&&Eo(7),ys(e)){const o=uC(this),a=ES(e,void 0);let i=!0;try{r=t(a),i=!1}finally{i?_S(o):xS(o)}return sC(o,n),lC(r,o)}if(!e||"object"!=typeof e){if(r=t(e),void 0===r&&(r=e),r===lE&&(r=void 0),this.autoFreeze_&&cE(r,!0),n){const t=[],o=[];Uf("Patches").generateReplacementPatches_(e,r,t,o),n(t,o)}return r}Eo(1,e)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...n)=>this.produceWithPatches(t,(t=>e(t,...n)));let n,r;return[this.produce(e,t,((e,t)=>{n=e,r=t})),n,r]},"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof(null==e?void 0:e.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){ys(e)||Eo(8),gs(e)&&(e=WO(e));const t=uC(this),n=ES(e,void 0);return n[xi].isManual_=!0,xS(t),n}finishDraft(e,t){const n=e&&e[xi];(!n||!n.isManual_)&&Eo(9);const{scope_:r}=n;return sC(r,t),lC(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));const r=Uf("Patches").applyPatches_;return gs(e)?r(e,t):this.produce(e,(e=>r(e,t)))}};function ES(e,t){const n=Iv(e)?Uf("MapSet").proxyMap_(e,t):Rv(e)?Uf("MapSet").proxySet_(e,t):iL(e,t);return(t?t.scope_:VO()).drafts_.push(n),n}function WO(e){return gs(e)||Eo(10,e),qO(e)}function qO(e){if(!ys(e)||cy(e))return e;const t=e[xi];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=wS(e,t.scope_.immer_.useStrictShallowCopy_)}else n=wS(e,!0);return Am(n,((e,t)=>{zO(n,e,qO(t))})),t&&(t.finalized_=!1),n}function uL(){const e="replace",t="remove";function n(e){if(!ys(e))return e;if(Array.isArray(e))return e.map(n);if(Iv(e))return new Map(Array.from(e.entries()).map((([e,t])=>[e,n(t)])));if(Rv(e))return new Set(Array.from(e).map(n));const t=Object.create(zf(e));for(const r in e)t[r]=n(e[r]);return lv(e,tv)&&(t[tv]=e[tv]),t}function r(e){return gs(e)?n(e):e}nL("Patches",{applyPatches_:function(r,o){return o.forEach((o=>{const{path:a,op:i}=o;let s=r;for(let e=0;e<a.length-1;e++){const t=Vf(s);let n=a[e];"string"!=typeof n&&"number"!=typeof n&&(n=""+n),(0===t||1===t)&&("__proto__"===n||"constructor"===n)&&Eo(19),"function"==typeof s&&"prototype"===n&&Eo(19),s=O1(s,n),"object"!=typeof s&&Eo(18,a.join("/"))}const u=Vf(s),l=n(o.value),c=a[a.length-1];switch(i){case e:switch(u){case 2:return s.set(c,l);case 3:Eo(16);default:return s[c]=l}case"add":switch(u){case 1:return"-"===c?s.push(l):s.splice(c,0,l);case 2:return s.set(c,l);case 3:return s.add(l);default:return s[c]=l}case t:switch(u){case 1:return s.splice(c,1);case 2:return s.delete(c);case 3:return s.delete(o.value);default:return delete s[c]}default:Eo(17,i)}})),r},generatePatches_:function(n,o,a,i){switch(n.type_){case 0:case 2:return function(n,o,a,i){const{base_:s,copy_:u}=n;Am(n.assigned_,((n,l)=>{const c=O1(s,n),d=O1(u,n),f=l?lv(s,n)?e:"add":t;if(c===d&&f===e)return;const p=o.concat(n);a.push(f===t?{op:f,path:p}:{op:f,path:p,value:d}),i.push("add"===f?{op:t,path:p}:f===t?{op:"add",path:p,value:r(c)}:{op:e,path:p,value:r(c)})}))}(n,o,a,i);case 1:return function(n,o,a,i){let{base_:s,assigned_:u}=n,l=n.copy_;l.length<s.length&&([s,l]=[l,s],[a,i]=[i,a]);for(let t=0;t<s.length;t++)if(u[t]&&l[t]!==s[t]){const n=o.concat([t]);a.push({op:e,path:n,value:r(l[t])}),i.push({op:e,path:n,value:r(s[t])})}for(let e=s.length;e<l.length;e++){const t=o.concat([e]);a.push({op:"add",path:t,value:r(l[e])})}for(let e=l.length-1;s.length<=e;--e){const n=o.concat([e]);i.push({op:t,path:n})}}(n,o,a,i);case 3:return function(e,n,r,o){let{base_:a,copy_:i}=e,s=0;a.forEach((e=>{if(!i.has(e)){const a=n.concat([s]);r.push({op:t,path:a,value:e}),o.unshift({op:"add",path:a,value:e})}s++})),s=0,i.forEach((e=>{if(!a.has(e)){const a=n.concat([s]);r.push({op:"add",path:a,value:e}),o.unshift({op:t,path:a,value:e})}s++}))}(n,o,a,i)}},generateReplacementPatches_:function(t,n,r,o){r.push({op:e,path:[],value:n===lE?void 0:n}),o.push({op:e,path:[],value:t})}})}var Zi=new sL,Pv=Zi.produce,GO=Zi.produceWithPatches.bind(Zi);Zi.setAutoFreeze.bind(Zi),Zi.setUseStrictShallowCopy.bind(Zi);var dC=Zi.applyPatches.bind(Zi);function lL(e,t="expected a function, instead received "+typeof e){if("function"!=typeof e)throw new TypeError(t)}function cL(e,t="expected an object, instead received "+typeof e){if("object"!=typeof e)throw new TypeError(t)}function dL(e,t="expected all items to be functions, instead received the following types: "){if(!e.every((e=>"function"==typeof e))){const n=e.map((e=>"function"==typeof e?`function ${e.name||"unnamed"}()`:typeof e)).join(", ");throw new TypeError(`${t}[${n}]`)}}Zi.createDraft.bind(Zi),Zi.finishDraft.bind(Zi);var fC=e=>Array.isArray(e)?e:[e];function fL(e){const t=Array.isArray(e[0])?e[0]:e;return dL(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function pL(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var mL=class{constructor(e){this.value=e}deref(){return this.value}},hL=typeof WeakRef<"u"?WeakRef:mL,vL=0,pC=1;function vg(){return{s:vL,v:void 0,o:null,p:null}}function fv(e,t={}){let n=vg();const{resultEqualityCheck:r}=t;let o,a=0;function i(){var t;let i=n;const{length:s}=arguments;for(let e=0,t=s;e<t;e++){const t=arguments[e];if("function"==typeof t||"object"==typeof t&&null!==t){let e=i.o;null===e&&(i.o=e=new WeakMap);const n=e.get(t);void 0===n?(i=vg(),e.set(t,i)):i=n}else{let e=i.p;null===e&&(i.p=e=new Map);const n=e.get(t);void 0===n?(i=vg(),e.set(t,i)):i=n}}const u=i;let l;if(i.s===pC?l=i.v:(l=e.apply(null,arguments),a++),u.s=pC,r){const e=(null==(t=null==o?void 0:o.deref)?void 0:t.call(o))??o;null!=e&&r(e,l)&&(l=e,0!==a&&a--),o="object"==typeof l&&null!==l||"function"==typeof l?new hL(l):l}return u.v=l,l}return i.clearCache=()=>{n=vg(),i.resetResultsCount()},i.resultsCount=()=>a,i.resetResultsCount=()=>{a=0},i}function HO(e,...t){const n="function"==typeof e?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t,r=0,o=0,a={},i=e.pop();"object"==typeof i&&(a=i,i=e.pop()),lL(i,`createSelector expects an output function after the inputs, but received: [${typeof i}]`);const s={...n,...a},{memoize:u,memoizeOptions:l=[],argsMemoize:c=fv,argsMemoizeOptions:d=[],devModeChecks:f={}}=s,p=fC(l),m=fC(d),v=fL(e),h=u((function(){return r++,i.apply(null,arguments)}),...p),g=c((function(){o++;const e=pL(v,arguments);return t=h.apply(null,e),t}),...m);return Object.assign(g,{resultFunc:i,memoizedResultFunc:h,dependencies:v,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>t,recomputations:()=>r,resetRecomputations:()=>{r=0},memoize:u,argsMemoize:c})};return Object.assign(r,{withTypes:()=>r}),r}var Zn=HO(fv),gL=Object.assign(((e,t=Zn)=>{cL(e,"createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+typeof e);const n=Object.keys(e);return t(n.map((t=>e[t])),((...e)=>e.reduce(((e,t,r)=>(e[n[r]]=t,e)),{})))}),{withTypes:()=>gL}),yL=(...e)=>{const t=HO(...e),n=Object.assign(((...e)=>{const n=t(...e),r=(e,...t)=>n(gs(e)?WO(e):e,...t);return Object.assign(r,n),r}),{withTypes:()=>n});return n};yL(fv);var wL=e=>e&&"function"==typeof e.match;function Vn(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw new Error($o(0));return{type:e,payload:r.payload,..."meta"in r&&{meta:r.meta},..."error"in r&&{error:r.error}}}return{type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>BO(t)&&t.type===e,n}function mC(e){return ys(e)?Pv(e,(()=>{})):e}function $S(e,t,n){if(e.has(t)){let r=e.get(t);return n.update&&(r=n.update(r,t,e),e.set(t,r)),r}if(!n.insert)throw new Error($o(10));const r=n.insert(t,e);return e.set(t,r),r}var Yh="RTK_autoBatch",jh=()=>e=>({payload:e,meta:{[Yh]:!0}});function KO(e){const t={},n=[];let r;const o={addCase(e,n){const r="string"==typeof e?e:e.type;if(!r)throw new Error($o(28));if(r in t)throw new Error($o(29));return t[r]=n,o},addMatcher:(e,t)=>(n.push({matcher:e,reducer:t}),o),addDefaultCase:e=>(r=e,o)};return e(o),[t,n,r]}function bL(e){return"function"==typeof e}function _L(e,t){let n,[r,o,a]=KO(t);if(bL(e))n=()=>mC(e());else{const t=mC(e);n=()=>t}function i(e=n(),t){let i=[r[t.type],...o.filter((({matcher:e})=>e(t))).map((({reducer:e})=>e))];return 0===i.filter((e=>!!e)).length&&(i=[a]),i.reduce(((e,n)=>{if(n){if(gs(e)){const r=n(e,t);return void 0===r?e:r}if(ys(e))return Pv(e,(e=>n(e,t)));{const r=n(e,t);if(void 0===r){if(null===e)return e;throw new Error($o(9))}return r}}return e}),e)}return i.getInitialState=n,i}var xL="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",dy=(e=21)=>{let t="",n=e;for(;n--;)t+=xL[64*Math.random()|0];return t},YO=(e,t)=>wL(e)?e.match(t):e(t);function cd(...e){return t=>e.some((e=>YO(e,t)))}function nv(...e){return t=>e.every((e=>YO(e,t)))}function fy(e,t){if(!e||!e.meta)return!1;const n="string"==typeof e.meta.requestId,r=t.indexOf(e.meta.requestStatus)>-1;return n&&r}function Tv(e){return"function"==typeof e[0]&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function fE(...e){return 0===e.length?e=>fy(e,["pending"]):Tv(e)?t=>cd(...e.map((e=>e.pending)))(t):fE()(e[0])}function Mm(...e){return 0===e.length?e=>fy(e,["rejected"]):Tv(e)?t=>cd(...e.map((e=>e.rejected)))(t):Mm()(e[0])}function py(...e){const t=e=>e&&e.meta&&e.meta.rejectedWithValue;return 0===e.length||Tv(e)?n=>nv(Mm(...e),t)(n):py()(e[0])}function dd(...e){return 0===e.length?e=>fy(e,["fulfilled"]):Tv(e)?t=>cd(...e.map((e=>e.fulfilled)))(t):dd()(e[0])}function CS(...e){return 0===e.length?e=>fy(e,["pending","fulfilled","rejected"]):Tv(e)?t=>{const n=[];for(const t of e)n.push(t.pending,t.rejected,t.fulfilled);return cd(...n)(t)}:CS()(e[0])}var SL=["name","message","stack","code"],D1=class{constructor(e,t){P1(this,"_type"),this.payload=e,this.meta=t}},hC=class{constructor(e,t){P1(this,"_type"),this.payload=e,this.meta=t}},EL=e=>{if("object"==typeof e&&null!==e){const t={};for(const n of SL)"string"==typeof e[n]&&(t[n]=e[n]);return t}return{message:String(e)}},vC=(()=>{function e(e,t,n){const r=Vn(e+"/fulfilled",((e,t,n,r)=>({payload:e,meta:{...r||{},arg:n,requestId:t,requestStatus:"fulfilled"}}))),o=Vn(e+"/pending",((e,t,n)=>({payload:void 0,meta:{...n||{},arg:t,requestId:e,requestStatus:"pending"}}))),a=Vn(e+"/rejected",((e,t,r,o,a)=>({payload:o,error:(n&&n.serializeError||EL)(e||"Rejected"),meta:{...a||{},arg:r,requestId:t,rejectedWithValue:!!o,requestStatus:"rejected",aborted:"AbortError"===(null==e?void 0:e.name),condition:"ConditionError"===(null==e?void 0:e.name)}})));return Object.assign((function(e){return(i,s,u)=>{const l=null!=n&&n.idGenerator?n.idGenerator(e):dy(),c=new AbortController;let d,f;function p(e){f=e,c.abort()}const m=async function(){var m,v;let h;try{let a=null==(m=null==n?void 0:n.condition)?void 0:m.call(n,e,{getState:s,extra:u});if(CL(a)&&(a=await a),!1===a||c.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const g=new Promise(((e,t)=>{d=()=>{t({name:"AbortError",message:f||"Aborted"})},c.signal.addEventListener("abort",d)}));i(o(l,e,null==(v=null==n?void 0:n.getPendingMeta)?void 0:v.call(n,{requestId:l,arg:e},{getState:s,extra:u}))),h=await Promise.race([g,Promise.resolve(t(e,{dispatch:i,getState:s,extra:u,requestId:l,signal:c.signal,abort:p,rejectWithValue:(e,t)=>new D1(e,t),fulfillWithValue:(e,t)=>new hC(e,t)})).then((t=>{if(t instanceof D1)throw t;return t instanceof hC?r(t.payload,l,e,t.meta):r(t,l,e)}))])}catch(t){h=t instanceof D1?a(null,l,e,t.payload,t.meta):a(t,l,e)}finally{d&&c.signal.removeEventListener("abort",d)}return n&&!n.dispatchConditionRejection&&a.match(h)&&h.meta.condition||i(h),h}();return Object.assign(m,{abort:p,requestId:l,arg:e,unwrap:()=>m.then($L)})}}),{pending:o,rejected:a,fulfilled:r,settled:cd(a,r),typePrefix:e})}return e.withTypes=()=>e,e})();function $L(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function CL(e){return null!==e&&"object"==typeof e&&"function"==typeof e.then}var IL=Symbol.for("rtk-slice-createasyncthunk");function RL(e,t){return`${e}/${t}`}function PL({creators:e}={}){var t;const n=null==(t=null==e?void 0:e.asyncThunk)?void 0:t[IL];return function(e){const{name:t,reducerPath:r=t}=e;if(!t)throw new Error($o(11));const o=("function"==typeof e.reducers?e.reducers(OL()):e.reducers)||{},a=Object.keys(o),i={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(e,t){const n="string"==typeof e?e:e.type;if(!n)throw new Error($o(12));if(n in i.sliceCaseReducersByType)throw new Error($o(13));return i.sliceCaseReducersByType[n]=t,s},addMatcher:(e,t)=>(i.sliceMatchers.push({matcher:e,reducer:t}),s),exposeAction:(e,t)=>(i.actionCreators[e]=t,s),exposeCaseReducer:(e,t)=>(i.sliceCaseReducersByName[e]=t,s)};function u(){const[t={},n=[],r]="function"==typeof e.extraReducers?KO(e.extraReducers):[e.extraReducers],o={...t,...i.sliceCaseReducersByType};return _L(e.initialState,(e=>{for(let t in o)e.addCase(t,o[t]);for(let t of i.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of n)e.addMatcher(t.matcher,t.reducer);r&&e.addDefaultCase(r)}))}a.forEach((r=>{const a=o[r],i={reducerName:r,type:RL(t,r),createNotation:"function"==typeof e.reducers};ML(a)?NL(i,a,s,n):AL(i,a,s)}));const l=e=>e,c=new Map;let d;function f(e,t){return d||(d=u()),d(e,t)}function p(){return d||(d=u()),d.getInitialState()}function m(t,n=!1){function r(e){let r=e[t];return typeof r>"u"&&n&&(r=p()),r}function o(t=l){const r=$S(c,n,{insert:()=>new WeakMap});return $S(r,t,{insert:()=>{const r={};for(const[o,a]of Object.entries(e.selectors??{}))r[o]=TL(a,t,p,n);return r}})}return{reducerPath:t,getSelectors:o,get selectors(){return o(r)},selectSlice:r}}const v={name:t,reducer:f,actions:i.actionCreators,caseReducers:i.sliceCaseReducersByName,getInitialState:p,...m(r),injectInto(e,{reducerPath:t,...n}={}){const o=t??r;return e.inject({reducerPath:o,reducer:f},n),{...v,...m(o,!0)}}};return v}}function TL(e,t,n,r){function o(o,...a){let i=t(o);return typeof i>"u"&&r&&(i=n()),e(i,...a)}return o.unwrapped=e,o}var oo=PL();function OL(){function e(e,t){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer:e=>Object.assign({[e.name]:(...t)=>e(...t)}[e.name],{_reducerDefinitionType:"reducer"}),preparedReducer:(e,t)=>({_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:t}),asyncThunk:e}}function AL({type:e,reducerName:t,createNotation:n},r,o){let a,i;if("reducer"in r){if(n&&!DL(r))throw new Error($o(17));a=r.reducer,i=r.prepare}else a=r;o.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,i?Vn(e,i):Vn(e))}function ML(e){return"asyncThunk"===e._reducerDefinitionType}function DL(e){return"reducerWithPrepare"===e._reducerDefinitionType}function NL({type:e,reducerName:t},n,r,o){if(!o)throw new Error($o(18));const{payloadCreator:a,fulfilled:i,pending:s,rejected:u,settled:l,options:c}=n,d=o(e,a,c);r.exposeAction(t,d),i&&r.addCase(d.fulfilled,i),s&&r.addCase(d.pending,s),u&&r.addCase(d.rejected,u),l&&r.addMatcher(d.settled,l),r.exposeCaseReducer(t,{fulfilled:i||gg,pending:s||gg,rejected:u||gg,settled:l||gg})}function gg(){}var kL=(e,t)=>{if("function"!=typeof e)throw new Error($o(32))},pE="listenerMiddleware",LL=e=>{let{type:t,actionCreator:n,matcher:r,predicate:o,effect:a}=e;if(t)o=Vn(t).match;else if(n)t=n.type,o=n.match;else if(r)o=r;else if(!o)throw new Error($o(21));return kL(a),{predicate:o,type:t,effect:a}},FL=Object.assign((e=>{const{type:t,predicate:n,effect:r}=LL(e);return{id:dy(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error($o(22))}}}),{withTypes:()=>FL}),BL=Object.assign(Vn(`${pE}/add`),{withTypes:()=>BL});Vn(`${pE}/removeAll`);var jL=Object.assign(Vn(`${pE}/remove`),{withTypes:()=>jL}),zL=e=>"reducerPath"in e&&"string"==typeof e.reducerPath,VL=e=>e.flatMap((e=>zL(e)?[[e.reducerPath,e.reducer]]:Object.entries(e))),mE=Symbol.for("rtk-state-proxy-original"),UL=e=>!!e&&!!e[mE],WL=new WeakMap,qL=(e,t)=>$S(WL,e,{insert:()=>new Proxy(e,{get:(e,n,r)=>{if(n===mE)return e;const o=Reflect.get(e,n,r);if(typeof o>"u"){const e=t[n.toString()];if(e){const t=e(void 0,{type:dy()});if(typeof t>"u")throw new Error($o(24));return t}}return o}})}),GL=e=>{if(!UL(e))throw new Error($o(25));return e[mE]},HL=(e={})=>e;function KL(...e){const t=Object.fromEntries(VL(e)),n=()=>Object.keys(t).length?FO(t):HL;let r=n();function o(e,t){return r(e,t)}o.withLazyLoadedSlices=()=>o;const a=Object.assign((function(e,n){return function(r,...o){return e(qL(n?n(r,...o):r,t),...o)}}),{original:GL});return Object.assign(o,{inject:(e,a={})=>{const{reducerPath:i,reducer:s}=e,u=t[i];return!a.overrideExisting&&u&&u!==s||(t[i]=s,r=n()),o},selector:a})}function $o(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}function YL(){return!(typeof navigator<"u"&&"boolean"==typeof navigator.onLine)||navigator.onLine}const QL={isOnline:YL()},Kg=oo({name:"network",initialState:QL,reducers:{setOnline:(e,{payload:t})=>{e.isOnline=t}},selectors:{selectOnline:e=>e.isOnline}});var Da=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function my(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var gC,yC,N1={exports:{}},Tt={};
2
2
  /**
3
3
  * @license React
4
4
  * react.production.min.js
@@ -16,7 +16,7 @@ var H3=Object.defineProperty,K3=(e,t,n)=>t in e?H3(e,t,{enumerable:!0,configurab
16
16
  *
17
17
  * This source code is licensed under the MIT license found in the
18
18
  * LICENSE file in the root directory of this source tree.
19
- */function JL(){if(wC)return L1;wC=1;var e=hy();var t="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},n=e.useSyncExternalStore,r=e.useRef,o=e.useEffect,a=e.useMemo,i=e.useDebugValue;return L1.useSyncExternalStoreWithSelector=function(e,s,u,l,c){var d=r(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=a((function(){function e(e){if(!o){if(o=!0,n=e,e=l(e),void 0!==c&&f.hasValue){var a=f.value;if(c(a,e))return r=a}return r=e}if(a=r,t(n,e))return a;var i=l(e);return void 0!==c&&c(a,i)?a:(n=e,r=i)}var n,r,o=!1,a=void 0===u?null:u;return[function(){return e(s())},null===a?void 0:function(){return e(a())}]}),[s,u,l,c]);var p=n(e,d[0],d[1]);return o((function(){f.hasValue=!0,f.value=p}),[p]),i(p),p},L1}function ZL(){return bC||(bC=1,k1.exports=JL()),k1.exports}var e5=ZL(),fu="default"in Yg?Ue:Yg,_C=Symbol.for("react-redux-context"),xC=typeof globalThis<"u"?globalThis:{};function t5(){if(!fu.createContext)return{};const e=xC[_C]??(xC[_C]=new Map);let t=e.get(fu.createContext);return t||(t=fu.createContext(null),e.set(fu.createContext,t)),t}var Wf=t5(),n5=()=>{throw new Error("uSES not initialized!")};function hE(e=Wf){return function(){return fu.useContext(e)}}var Q2=hE(),X2=n5,r5=e=>{X2=e},o5=(e,t)=>e===t;function i5(e=Wf){const t=e===Wf?Q2:hE(e),n=(e,n={})=>{const{equalityFn:r=o5,devModeChecks:o={}}="function"==typeof n?{equalityFn:n}:n,{store:a,subscription:i,getServerState:s,stabilityCheck:u,identityFunctionCheck:l}=t();fu.useRef(!0);const c=fu.useCallback({[e.name]:t=>e(t)}[e.name],[e,u,o.stabilityCheck]),d=X2(i.addNestedSub,a.getState,s||a.getState,c,r);return fu.useDebugValue(d),d};return Object.assign(n,{withTypes:()=>n}),n}var vy=i5();function a5(e){e()}var s5=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function SC(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function rv(e,t){if(SC(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!SC(e[n[r]],t[n[r]]))return!1;return!0}function J2(e=Wf){const t=e===Wf?Q2:hE(e),n=()=>{const{store:e}=t();return e};return Object.assign(n,{withTypes:()=>n}),n}s5?fu.useLayoutEffect:fu.useEffect;var Z2=J2();function u5(e=Wf){const t=e===Wf?Z2:J2(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var vE=u5(),l5=a5;r5(e5.useSyncExternalStoreWithSelector);var EC,$C,F1={exports:{}},zh={};
19
+ */function JL(){if(wC)return L1;wC=1;var e=hy();var t="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},n=e.useSyncExternalStore,r=e.useRef,o=e.useEffect,a=e.useMemo,i=e.useDebugValue;return L1.useSyncExternalStoreWithSelector=function(e,s,u,l,c){var d=r(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=a((function(){function e(e){if(!o){if(o=!0,n=e,e=l(e),void 0!==c&&f.hasValue){var a=f.value;if(c(a,e))return r=a}return r=e}if(a=r,t(n,e))return a;var i=l(e);return void 0!==c&&c(a,i)?a:(n=e,r=i)}var n,r,o=!1,a=void 0===u?null:u;return[function(){return e(s())},null===a?void 0:function(){return e(a())}]}),[s,u,l,c]);var p=n(e,d[0],d[1]);return o((function(){f.hasValue=!0,f.value=p}),[p]),i(p),p},L1}function ZL(){return bC||(bC=1,k1.exports=JL()),k1.exports}var e5=ZL(),fu="default"in Yg?Ue:Yg,_C=Symbol.for("react-redux-context"),xC=typeof globalThis<"u"?globalThis:{};function t5(){if(!fu.createContext)return{};const e=xC[_C]??(xC[_C]=new Map);let t=e.get(fu.createContext);return t||(t=fu.createContext(null),e.set(fu.createContext,t)),t}var Wf=t5(),n5=()=>{throw new Error("uSES not initialized!")};function hE(e=Wf){return function(){return fu.useContext(e)}}var QO=hE(),XO=n5,r5=e=>{XO=e},o5=(e,t)=>e===t;function i5(e=Wf){const t=e===Wf?QO:hE(e),n=(e,n={})=>{const{equalityFn:r=o5,devModeChecks:o={}}="function"==typeof n?{equalityFn:n}:n,{store:a,subscription:i,getServerState:s,stabilityCheck:u,identityFunctionCheck:l}=t();fu.useRef(!0);const c=fu.useCallback({[e.name]:t=>e(t)}[e.name],[e,u,o.stabilityCheck]),d=XO(i.addNestedSub,a.getState,s||a.getState,c,r);return fu.useDebugValue(d),d};return Object.assign(n,{withTypes:()=>n}),n}var vy=i5();function a5(e){e()}var s5=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function SC(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function rv(e,t){if(SC(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!SC(e[n[r]],t[n[r]]))return!1;return!0}function JO(e=Wf){const t=e===Wf?QO:hE(e),n=()=>{const{store:e}=t();return e};return Object.assign(n,{withTypes:()=>n}),n}s5?fu.useLayoutEffect:fu.useEffect;var ZO=JO();function u5(e=Wf){const t=e===Wf?ZO:JO(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var vE=u5(),l5=a5;r5(e5.useSyncExternalStoreWithSelector);var EC,$C,F1={exports:{}},zh={};
20
20
  /**
21
21
  * @license React
22
22
  * react-jsx-runtime.production.min.js
@@ -85,7 +85,7 @@ const R5=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),rA=(...e)=>e.f
85
85
  *
86
86
  * This source code is licensed under the MIT license found in the
87
87
  * LICENSE file in the root directory of this source tree.
88
- */function K8(){if(eR)return nn;eR=1;var e,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen");function v(e){if("object"==typeof e&&null!==e){var m=e.$$typeof;switch(m){case t:switch(e=e.type){case r:case a:case o:case c:case d:return e;default:switch(e=e&&e.$$typeof){case u:case s:case l:case p:case f:case i:return e;default:return m}}case n:return m}}}return e=Symbol.for("react.module.reference"),nn.ContextConsumer=s,nn.ContextProvider=i,nn.Element=t,nn.ForwardRef=l,nn.Fragment=r,nn.Lazy=p,nn.Memo=f,nn.Portal=n,nn.Profiler=a,nn.StrictMode=o,nn.Suspense=c,nn.SuspenseList=d,nn.isAsyncMode=function(){return!1},nn.isConcurrentMode=function(){return!1},nn.isContextConsumer=function(e){return v(e)===s},nn.isContextProvider=function(e){return v(e)===i},nn.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},nn.isForwardRef=function(e){return v(e)===l},nn.isFragment=function(e){return v(e)===r},nn.isLazy=function(e){return v(e)===p},nn.isMemo=function(e){return v(e)===f},nn.isPortal=function(e){return v(e)===n},nn.isProfiler=function(e){return v(e)===a},nn.isStrictMode=function(e){return v(e)===o},nn.isSuspense=function(e){return v(e)===c},nn.isSuspenseList=function(e){return v(e)===d},nn.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===r||t===a||t===o||t===c||t===d||t===m||"object"==typeof t&&null!==t&&(t.$$typeof===p||t.$$typeof===f||t.$$typeof===i||t.$$typeof===s||t.$$typeof===l||t.$$typeof===e||void 0!==t.getModuleId)},nn.typeOf=v,nn}function Y8(){return tR||(tR=1,Jw.exports=K8()),Jw.exports}function hM(){if(nR)return Zw;nR=1;var e=Cl(),t=ta();return Zw=function(n){return"number"==typeof n||t(n)&&"[object Number]"==e(n)}}function Q8(){if(rR)return eb;rR=1;var e=hM();return eb=function(t){return e(t)&&t!=+t}}Y8(),Q8(),hM();var nb,oR,rb,iR,ob,aR,ib,sR,ab,uR,sb,lR,ub,cR,lb,dR,cb,fR,db,pR,fb,mR,pb,hR,mb,vR,hb,gR,vb,yR,gb,wR,yb,bR,wb,_R,bb,xR,_b,SR,xb,ER,Sb,$R,Eb,CR,$b,IR,Eg=function(e){return H8(e)&&e.indexOf("%")===e.length-1},X8=function(e){return"string"==typeof e?e:e?e.displayName||e.name||"Component":""},tb=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o]};function J8(){if(oR)return nb;oR=1;var e=Ty();return nb=function(){this.__data__=new e,this.size=0}}function Z8(){if(iR)return rb;return iR=1,rb=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}}function e9(){if(aR)return ob;return aR=1,ob=function(e){return this.__data__.get(e)}}function t9(){if(sR)return ib;return sR=1,ib=function(e){return this.__data__.has(e)}}function n9(){if(uR)return ab;uR=1;var e=Ty(),t=NE(),n=kE();return ab=function(r,o){var a=this.__data__;if(a instanceof e){var i=a.__data__;if(!t||i.length<199)return i.push([r,o]),this.size=++a.size,this;a=this.__data__=new n(i)}return a.set(r,o),this.size=a.size,this}}function LE(){if(lR)return sb;lR=1;var e=Ty(),t=J8(),n=Z8(),r=e9(),o=t9(),a=n9();function i(t){var n=this.__data__=new e(t);this.size=n.size}return i.prototype.clear=t,i.prototype.delete=n,i.prototype.get=r,i.prototype.has=o,i.prototype.set=a,sb=i}function r9(){if(cR)return ub;cR=1;return ub=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}}function o9(){if(dR)return lb;return dR=1,lb=function(e){return this.__data__.has(e)}}function i9(){if(fR)return cb;fR=1;var e=kE(),t=r9(),n=o9();function r(t){var n=-1,r=null==t?0:t.length;for(this.__data__=new e;++n<r;)this.add(t[n])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,cb=r}function a9(){if(pR)return db;return pR=1,db=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}}function s9(){if(mR)return fb;return mR=1,fb=function(e,t){return e.has(t)}}function vM(){if(hR)return pb;hR=1;var e=i9(),t=a9(),n=s9();return pb=function(r,o,a,i,s,u){var l=1&a,c=r.length,d=o.length;if(c!=d&&!(l&&d>c))return!1;var f=u.get(r),p=u.get(o);if(f&&p)return f==o&&p==r;var m=-1,v=!0,h=2&a?new e:void 0;for(u.set(r,o),u.set(o,r);++m<c;){var g=r[m],y=o[m];if(i)var b=l?i(y,g,m,o,r,u):i(g,y,m,r,o,u);if(void 0!==b){if(b)continue;v=!1;break}if(h){if(!t(o,(function(e,t){if(!n(h,t)&&(g===e||s(g,e,a,i,u)))return h.push(t)}))){v=!1;break}}else if(g!==y&&!s(g,y,a,i,u)){v=!1;break}}return u.delete(r),u.delete(o),v}}function gM(){if(vR)return mb;vR=1;var e=ri().Uint8Array;return mb=e}function u9(){if(gR)return hb;return gR=1,hb=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}}function l9(){if(yR)return vb;return yR=1,vb=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}}function c9(){if(wR)return gb;wR=1;var e=zm(),t=gM(),n=DE(),r=vM(),o=u9(),a=l9(),i=e?e.prototype:void 0,s=i?i.valueOf:void 0;return gb=function(e,i,u,l,c,d,f){switch(u){case"[object DataView]":if(e.byteLength!=i.byteLength||e.byteOffset!=i.byteOffset)return!1;e=e.buffer,i=i.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=i.byteLength||!d(new t(e),new t(i)));case"[object Boolean]":case"[object Date]":case"[object Number]":return n(+e,+i);case"[object Error]":return e.name==i.name&&e.message==i.message;case"[object RegExp]":case"[object String]":return e==i+"";case"[object Map]":var p=o;case"[object Set]":var m=1&l;if(p||(p=a),e.size!=i.size&&!m)return!1;var v=f.get(e);if(v)return v==i;l|=2,f.set(e,i);var h=r(p(e),p(i),l,c,d,f);return f.delete(e),h;case"[object Symbol]":if(s)return s.call(e)==s.call(i)}return!1}}function FE(){if(bR)return yb;return bR=1,yb=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}}function yM(){if(_R)return wb;_R=1;var e=FE(),t=Ei();return wb=function(n,r,o){var a=r(n);return t(n)?a:e(a,o(n))}}function d9(){if(xR)return bb;return xR=1,bb=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,a=[];++n<r;){var i=e[n];t(i,n,e)&&(a[o++]=i)}return a}}function wM(){if(SR)return _b;return SR=1,_b=function(){return[]}}function BE(){if(ER)return xb;ER=1;var e=d9(),t=wM(),n=Object.prototype.propertyIsEnumerable,r=Object.getOwnPropertySymbols;return xb=r?function(t){return null==t?[]:(t=Object(t),e(r(t),(function(e){return n.call(t,e)})))}:t}function f9(){if($R)return Sb;return $R=1,Sb=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}}function p9(){if(CR)return Eb;CR=1;var e=Cl(),t=ta();return Eb=function(n){return t(n)&&"[object Arguments]"==e(n)}}function jE(){if(IR)return $b;IR=1;var e=p9(),t=ta(),n=Object.prototype,r=n.hasOwnProperty,o=n.propertyIsEnumerable,a=e(function(){return arguments}())?e:function(e){return t(e)&&r.call(e,"callee")&&!o.call(e,"callee")};return $b=a}var Cb,RR,PR,Ib,TR,Rb,OR,Pb,AR,Tb,MR,Xh={exports:{}};function m9(){if(RR)return Cb;return RR=1,Cb=function(){return!1}}function zE(){return PR||(PR=1,e=Xh,t=Xh.exports,n=ri(),r=m9(),o=t&&!t.nodeType&&t,a=o&&e&&!e.nodeType&&e,i=a&&a.exports===o?n.Buffer:void 0,s=(i?i.isBuffer:void 0)||r,e.exports=s),Xh.exports;var e,t,n,r,o,a,i,s}function VE(){if(TR)return Ib;TR=1;var e=/^(?:0|[1-9]\d*)$/;return Ib=function(t,n){var r=typeof t;return!!(n=n??9007199254740991)&&("number"==r||"symbol"!=r&&e.test(t))&&t>-1&&t%1==0&&t<n}}function UE(){if(OR)return Rb;OR=1;return Rb=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}}function h9(){if(AR)return Pb;AR=1;var e=Cl(),t=UE(),n=ta(),r={};return r["[object Float32Array]"]=r["[object Float64Array]"]=r["[object Int8Array]"]=r["[object Int16Array]"]=r["[object Int32Array]"]=r["[object Uint8Array]"]=r["[object Uint8ClampedArray]"]=r["[object Uint16Array]"]=r["[object Uint32Array]"]=!0,r["[object Arguments]"]=r["[object Array]"]=r["[object ArrayBuffer]"]=r["[object Boolean]"]=r["[object DataView]"]=r["[object Date]"]=r["[object Error]"]=r["[object Function]"]=r["[object Map]"]=r["[object Number]"]=r["[object Object]"]=r["[object RegExp]"]=r["[object Set]"]=r["[object String]"]=r["[object WeakMap]"]=!1,Pb=function(o){return n(o)&&t(o.length)&&!!r[e(o)]}}function WE(){if(MR)return Tb;return MR=1,Tb=function(e){return function(t){return e(t)}}}Xh.exports;var DR,Ob,NR,Ab,kR,Mb,LR,Db,FR,Nb,BR,kb,jR,Lb,zR,Fb,VR,Bb,UR,jb,WR,zb,qR,Vb,GR,Ub,HR,Wb,KR,qb,YR,Gb,QR,Hb,XR,Kb,JR,Yb,ZR,Qb,eP,Xb,tP,Jb,nP,Zb,rP,e_,oP,t_,iP,n_,aP,r_,sP,o_,uP,i_,lP,a_,cP,s_,dP,u_,fP,l_,pP,c_,mP,d_,hP,f_,vP,p_,gP,m_,yP,h_,wP,v_,bP,g_,_P,y_,xP,w_,SP,b_,EP,__,$P,x_,CP,S_,IP,E_,RP,$_,PP,C_,TP,I_,OP,R_,AP,Jh={exports:{}};function qE(){return DR||(DR=1,e=Jh,t=Jh.exports,n=sM(),r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,a=o&&o.exports===r&&n.process,i=function(){try{return o&&o.require&&o.require("util").types||a&&a.binding&&a.binding("util")}catch{}}(),e.exports=i),Jh.exports;var e,t,n,r,o,a,i}function bM(){if(NR)return Ob;NR=1;var e=h9(),t=WE(),n=qE(),r=n&&n.isTypedArray,o=r?t(r):e;return Ob=o}function _M(){if(kR)return Ab;kR=1;var e=f9(),t=jE(),n=Ei(),r=zE(),o=VE(),a=bM(),i=Object.prototype.hasOwnProperty;return Ab=function(s,u){var l=n(s),c=!l&&t(s),d=!l&&!c&&r(s),f=!l&&!c&&!d&&a(s),p=l||c||d||f,m=p?e(s.length,String):[],v=m.length;for(var h in s)(u||i.call(s,h))&&(!p||!("length"==h||d&&("offset"==h||"parent"==h)||f&&("buffer"==h||"byteLength"==h||"byteOffset"==h)||o(h,v)))&&m.push(h);return m}}function GE(){if(LR)return Mb;LR=1;var e=Object.prototype;return Mb=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}}function xM(){if(FR)return Db;return FR=1,Db=function(e,t){return function(n){return e(t(n))}}}function v9(){if(BR)return Nb;BR=1;var e=xM()(Object.keys,Object);return Nb=e}function SM(){if(jR)return kb;jR=1;var e=GE(),t=v9(),n=Object.prototype.hasOwnProperty;return kb=function(r){if(!e(r))return t(r);var o=[];for(var a in Object(r))n.call(r,a)&&"constructor"!=a&&o.push(a);return o}}function EM(){if(zR)return Lb;zR=1;var e=Iy(),t=UE();return Lb=function(n){return null!=n&&t(n.length)&&!e(n)}}function Ay(){if(VR)return Fb;VR=1;var e=_M(),t=SM(),n=EM();return Fb=function(r){return n(r)?e(r):t(r)}}function $M(){if(UR)return Bb;UR=1;var e=yM(),t=BE(),n=Ay();return Bb=function(r){return e(r,n,t)}}function g9(){if(WR)return jb;WR=1;var e=$M(),t=Object.prototype.hasOwnProperty;return jb=function(n,r,o,a,i,s){var u=1&o,l=e(n),c=l.length;if(c!=e(r).length&&!u)return!1;for(var d=c;d--;){var f=l[d];if(!(u?f in r:t.call(r,f)))return!1}var p=s.get(n),m=s.get(r);if(p&&m)return p==r&&m==n;var v=!0;s.set(n,r),s.set(r,n);for(var h=u;++d<c;){var g=n[f=l[d]],y=r[f];if(a)var b=u?a(y,g,f,r,n,s):a(g,y,f,n,r,s);if(!(void 0===b?g===y||i(g,y,o,a,s):b)){v=!1;break}h||(h="constructor"==f)}if(v&&!h){var w=n.constructor,x=r.constructor;w!=x&&"constructor"in n&&"constructor"in r&&!("function"==typeof w&&w instanceof w&&"function"==typeof x&&x instanceof x)&&(v=!1)}return s.delete(n),s.delete(r),v}}function y9(){if(qR)return zb;qR=1;var e=Zf()(ri(),"DataView");return zb=e}function w9(){if(GR)return Vb;GR=1;var e=Zf()(ri(),"Promise");return Vb=e}function b9(){if(HR)return Ub;HR=1;var e=Zf()(ri(),"Set");return Ub=e}function CM(){if(KR)return Wb;KR=1;var e=Zf()(ri(),"WeakMap");return Wb=e}function kv(){if(YR)return qb;YR=1;var e=y9(),t=NE(),n=w9(),r=b9(),o=CM(),a=Cl(),i=uM(),s="[object Map]",u="[object Promise]",l="[object Set]",c="[object WeakMap]",d="[object DataView]",f=i(e),p=i(t),m=i(n),v=i(r),h=i(o),g=a;return(e&&g(new e(new ArrayBuffer(1)))!=d||t&&g(new t)!=s||n&&g(n.resolve())!=u||r&&g(new r)!=l||o&&g(new o)!=c)&&(g=function(e){var t=a(e),n="[object Object]"==t?e.constructor:void 0,r=n?i(n):"";if(r)switch(r){case f:return d;case p:return s;case m:return u;case v:return l;case h:return c}return t}),qb=g}function _9(){if(QR)return Gb;QR=1;var e=LE(),t=vM(),n=c9(),r=g9(),o=kv(),a=Ei(),i=zE(),s=bM(),u="[object Arguments]",l="[object Array]",c="[object Object]",d=Object.prototype.hasOwnProperty;return Gb=function(f,p,m,v,h,g){var y=a(f),b=a(p),w=y?l:o(f),x=b?l:o(p),_=(w=w==u?c:w)==c,E=(x=x==u?c:x)==c,S=w==x;if(S&&i(f)){if(!i(p))return!1;y=!0,_=!1}if(S&&!_)return g||(g=new e),y||s(f)?t(f,p,m,v,h,g):n(f,p,w,m,v,h,g);if(!(1&m)){var I=_&&d.call(f,"__wrapped__"),A=E&&d.call(p,"__wrapped__");if(I||A){var k=I?f.value():f,C=A?p.value():p;return g||(g=new e),h(k,C,m,v,g)}}return!!S&&(g||(g=new e),r(f,p,m,v,h,g))}}function IM(){if(XR)return Hb;XR=1;var e=_9(),t=ta();return Hb=function n(r,o,a,i,s){return r===o||(null==r||null==o||!t(r)&&!t(o)?r!=r&&o!=o:e(r,o,a,i,n,s))},Hb}function x9(){if(JR)return Kb;JR=1;var e=LE(),t=IM();return Kb=function(n,r,o,a){var i=o.length,s=i,u=!a;if(null==n)return!s;for(n=Object(n);i--;){var l=o[i];if(u&&l[2]?l[1]!==n[l[0]]:!(l[0]in n))return!1}for(;++i<s;){var c=(l=o[i])[0],d=n[c],f=l[1];if(u&&l[2]){if(void 0===d&&!(c in n))return!1}else{var p=new e;if(a)var m=a(d,f,c,n,r,p);if(!(void 0===m?t(f,d,3,a,p):m))return!1}}return!0}}function RM(){if(ZR)return Yb;ZR=1;var e=bs();return Yb=function(t){return t==t&&!e(t)}}function S9(){if(eP)return Qb;eP=1;var e=RM(),t=Ay();return Qb=function(n){for(var r=t(n),o=r.length;o--;){var a=r[o],i=n[a];r[o]=[a,i,e(i)]}return r}}function PM(){if(tP)return Xb;return tP=1,Xb=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}}function E9(){if(nP)return Jb;nP=1;var e=x9(),t=S9(),n=PM();return Jb=function(r){var o=t(r);return 1==o.length&&o[0][2]?n(o[0][0],o[0][1]):function(t){return t===r||e(t,r,o)}}}function $9(){if(rP)return Zb;return rP=1,Zb=function(e,t){return null!=e&&t in Object(e)}}function C9(){if(oP)return e_;oP=1;var e=fM(),t=jE(),n=Ei(),r=VE(),o=UE(),a=Nv();return e_=function(i,s,u){for(var l=-1,c=(s=e(s,i)).length,d=!1;++l<c;){var f=a(s[l]);if(!(d=null!=i&&u(i,f)))break;i=i[f]}return d||++l!=c?d:!!(c=null==i?0:i.length)&&o(c)&&r(f,c)&&(n(i)||t(i))}}function I9(){if(iP)return t_;iP=1;var e=$9(),t=C9();return t_=function(n,r){return null!=n&&t(n,r,e)}}function R9(){if(aP)return n_;aP=1;var e=IM(),t=mM(),n=I9(),r=ME(),o=RM(),a=PM(),i=Nv();return n_=function(s,u){return r(s)&&o(u)?a(i(s),u):function(r){var o=t(r,s);return void 0===o&&o===u?n(r,s):e(u,o,3)}}}function HE(){if(sP)return r_;return sP=1,r_=function(e){return e}}function P9(){if(uP)return o_;return uP=1,o_=function(e){return function(t){return null==t?void 0:t[e]}}}function T9(){if(lP)return i_;lP=1;var e=pM();return i_=function(t){return function(n){return e(n,t)}}}function O9(){if(cP)return a_;cP=1;var e=P9(),t=T9(),n=ME(),r=Nv();return a_=function(o){return n(o)?e(r(o)):t(o)}}function A9(){if(dP)return s_;dP=1;var e=E9(),t=R9(),n=HE(),r=Ei(),o=O9();return s_=function(a){return"function"==typeof a?a:null==a?n:"object"==typeof a?r(a)?t(a[0],a[1]):e(a):o(a)}}function M9(){if(fP)return u_;return fP=1,u_=function(e,t,n,r){for(var o=e.length,a=n+(r?1:-1);r?a--:++a<o;)if(t(e[a],a,e))return a;return-1}}function D9(){if(pP)return l_;return pP=1,l_=function(e){return e!=e}}function N9(){if(mP)return c_;return mP=1,c_=function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}}function k9(){if(hP)return d_;hP=1;var e=M9(),t=D9(),n=N9();return d_=function(r,o,a){return o==o?n(r,o,a):e(r,t,a)}}function L9(){if(vP)return f_;vP=1;var e=k9();return f_=function(t,n){return!!(null==t?0:t.length)&&e(t,n,0)>-1}}function F9(){if(gP)return p_;return gP=1,p_=function(){}}function B9(){if(yP)return m_;yP=1;var e=zm(),t=jE(),n=Ei(),r=e?e.isConcatSpreadable:void 0;return m_=function(e){return n(e)||t(e)||!!(r&&e&&e[r])}}function j9(){if(wP)return h_;wP=1;var e=FE(),t=B9();return h_=function n(r,o,a,i,s){var u=-1,l=r.length;for(a||(a=t),s||(s=[]);++u<l;){var c=r[u];o>0&&a(c)?o>1?n(c,o-1,a,i,s):e(s,c):i||(s[s.length]=c)}return s},h_}function KE(){if(bP)return v_;return bP=1,v_=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}}function z9(){if(_P)return g_;_P=1;var e=KE(),t=Math.max;return g_=function(n,r,o){return r=t(void 0===r?n.length-1:r,0),function(){for(var a=arguments,i=-1,s=t(a.length-r,0),u=Array(s);++i<s;)u[i]=a[r+i];i=-1;for(var l=Array(r+1);++i<r;)l[i]=a[i];return l[r]=o(u),e(n,this,l)}},g_}function V9(){if(xP)return y_;return xP=1,y_=function(e){return function(){return e}}}function TM(){if(SP)return w_;SP=1;var e=Zf(),t=function(){try{var t=e(Object,"defineProperty");return t({},"",{}),t}catch{}}();return w_=t}function U9(){if(EP)return b_;EP=1;var e=V9(),t=TM(),n=HE();return b_=t?function(n,r){return t(n,"toString",{configurable:!0,enumerable:!1,value:e(r),writable:!0})}:n}function OM(){if($P)return __;$P=1;var e=Date.now;return __=function(t){var n=0,r=0;return function(){var o=e(),a=16-(o-r);if(r=o,a>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}},__}function AM(){if(CP)return x_;CP=1;var e=U9(),t=OM()(e);return x_=t}function W9(){if(IP)return S_;IP=1;var e=ri();return S_=function(){return e.Date.now()}}function q9(){if(RP)return E_;RP=1;var e=/\s/;return E_=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}}function G9(){if(PP)return $_;PP=1;var e=q9(),t=/^\s+/;return $_=function(n){return n&&n.slice(0,e(n)+1).replace(t,"")}}function MM(){if(TP)return C_;TP=1;var e=G9(),t=bs(),n=Dv(),r=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,i=parseInt;return C_=function(s){if("number"==typeof s)return s;if(n(s))return NaN;if(t(s)){var u="function"==typeof s.valueOf?s.valueOf():s;s=t(u)?u+"":u}if("string"!=typeof s)return 0===s?s:+s;s=e(s);var l=o.test(s);return l||a.test(s)?i(s.slice(2),l?2:8):r.test(s)?NaN:+s}}function DM(){if(OP)return I_;OP=1;var e=bs(),t=W9(),n=MM(),r=Math.max,o=Math.min;return I_=function(a,i,s){var u,l,c,d,f,p,m=0,v=!1,h=!1,g=!0;if("function"!=typeof a)throw new TypeError("Expected a function");function y(e){var t=u,n=l;return u=l=void 0,m=e,d=a.apply(n,t)}function b(e){var t=e-p;return void 0===p||t>=i||t<0||h&&e-m>=c}function w(){var e=t();if(b(e))return x(e);f=setTimeout(w,function(e){var t=i-(e-p);return h?o(t,c-(e-m)):t}(e))}function x(e){return f=void 0,g&&u?y(e):(u=l=void 0,d)}function _(){var e=t(),n=b(e);if(u=arguments,l=this,p=e,n){if(void 0===f)return function(e){return m=e,f=setTimeout(w,i),v?y(e):d}(p);if(h)return clearTimeout(f),f=setTimeout(w,i),y(p)}return void 0===f&&(f=setTimeout(w,i)),d}return i=n(i)||0,e(s)&&(v=!!s.leading,c=(h="maxWait"in s)?r(n(s.maxWait)||0,i):c,g="trailing"in s?!!s.trailing:g),_.cancel=function(){void 0!==f&&clearTimeout(f),m=0,u=p=l=f=void 0},_.flush=function(){return void 0===f?d:x(t())},_},I_}function H9(){if(AP)return R_;AP=1;var e=DM(),t=bs();return R_=function(n,r,o){var a=!0,i=!0;if("function"!=typeof n)throw new TypeError("Expected a function");return t(o)&&(a="leading"in o?!!o.leading:a,i="trailing"in o?!!o.trailing:i),e(n,r,{leading:a,maxWait:r,trailing:i})}}Jh.exports;var K9=H9();const Y9=my(K9);function vv(e){return(vv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function MP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?MP(Object(n),!0).forEach((function(t){Q9(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):MP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Q9(e,t,n){return(t=X9(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function X9(e){var t=J9(e,"string");return"symbol"==vv(t)?t:t+""}function J9(e,t){if("object"!=vv(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=vv(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Z9(e,t){return rF(e)||nF(e,t)||tF(e,t)||eF()}function eF(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function tF(e,t){if(e){if("string"==typeof e)return DP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return DP(e,t)}}function DP(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function nF(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,s=[],u=!0,l=!1;try{if(a=(n=n.call(e)).next,0!==t)for(;!(u=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){l=!0,o=e}finally{try{if(!u&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(l)throw o}}return s}}function rF(e){if(Array.isArray(e))return e}var P_,NP,T_,kP,O_,LP,A_,FP,M_,BP,D_,jP,N_,zP,k_,VP,L_,UP,F_,WP,B_,qP,j_,GP,z_,HP,oF=v.forwardRef((function(e,t){var n=e.aspect,r=e.initialDimension,o=void 0===r?{width:-1,height:-1}:r,a=e.width,i=void 0===a?"100%":a,s=e.height,u=void 0===s?"100%":s,l=e.minWidth,c=void 0===l?0:l,d=e.minHeight,f=e.maxHeight,p=e.children,m=e.debounce,h=void 0===m?0:m,g=e.id,y=e.className,b=e.onResize,w=e.style,x=void 0===w?{}:w,_=v.useRef(null),E=v.useRef();E.current=b,v.useImperativeHandle(t,(function(){return Object.defineProperty(_.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),_.current},configurable:!0})}));var S=Z9(v.useState({containerWidth:o.width,containerHeight:o.height}),2),I=S[0],A=S[1],k=v.useCallback((function(e,t){A((function(n){var r=Math.round(e),o=Math.round(t);return n.containerWidth===r&&n.containerHeight===o?n:{containerWidth:r,containerHeight:o}}))}),[]);v.useEffect((function(){var e=function(e){var t,n=e[0].contentRect,r=n.width,o=n.height;k(r,o),null===(t=E.current)||void 0===t||t.call(E,r,o)};h>0&&(e=Y9(e,h,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),n=_.current.getBoundingClientRect(),r=n.width,o=n.height;return k(r,o),t.observe(_.current),function(){t.disconnect()}}),[k,h]);var C=v.useMemo((function(){var e=I.containerWidth,t=I.containerHeight;if(e<0||t<0)return null;tb(Eg(i)||Eg(u),"The width(%s) and height(%s) are both fixed numbers,\n maybe you don't need to use a ResponsiveContainer.",i,u),tb(!n||n>0,"The aspect(%s) must be greater than zero.",n);var r=Eg(i)?e:i,o=Eg(u)?t:u;n&&n>0&&(r?o=r/n:o&&(r=o*n),f&&o>f&&(o=f)),tb(r>0||o>0,"The width(%s) and height(%s) of chart should be greater than 0,\n please check the style of container, or the props width(%s) and height(%s),\n or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the\n height and width.",r,o,i,u,c,d,n);var a=!Array.isArray(p)&&X8(p.type).endsWith("Chart");return Ue.Children.map(p,(function(e){return Ue.isValidElement(e)?v.cloneElement(e,$g({width:r,height:o},a?{style:$g({height:"100%",width:"100%",maxHeight:o,maxWidth:r},e.props.style)}:{})):e}))}),[n,p,u,f,d,c,I,i]);return Ue.createElement("div",{id:g?"".concat(g):void 0,className:cA("recharts-responsive-container",y),style:$g($g({},x),{},{width:i,height:u,minWidth:c,minHeight:d,maxHeight:f}),ref:_},C)}));function YE(){if(NP)return P_;NP=1;var e=xM()(Object.getPrototypeOf,Object);return P_=e}function iF(){if(kP)return T_;kP=1;var e=Cl(),t=YE(),n=ta(),r=Function.prototype,o=Object.prototype,a=r.toString,i=o.hasOwnProperty,s=a.call(Object);return T_=function(r){if(!n(r)||"[object Object]"!=e(r))return!1;var o=t(r);if(null===o)return!0;var u=i.call(o,"constructor")&&o.constructor;return"function"==typeof u&&u instanceof u&&a.call(u)==s}}function aF(){if(LP)return O_;LP=1;var e=MM(),t=1/0;return O_=function(n){return n?(n=e(n))===t||n===-t?17976931348623157e292*(n<0?-1:1):n==n?n:0:0===n?n:0}}function NM(){if(FP)return A_;FP=1;var e=TM();return A_=function(t,n,r){"__proto__"==n&&e?e(t,n,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[n]=r}}function kM(){if(BP)return M_;BP=1;var e=aF();return M_=function(t){var n=e(t),r=n%1;return n==n?r?n-r:n:0}}function QE(){if(jP)return D_;return jP=1,D_=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}}function LM(){if(zP)return N_;zP=1;var e=NM(),t=DE(),n=Object.prototype.hasOwnProperty;return N_=function(r,o,a){var i=r[o];(!n.call(r,o)||!t(i,a)||void 0===a&&!(o in r))&&e(r,o,a)}}function My(){if(VP)return k_;VP=1;var e=LM(),t=NM();return k_=function(n,r,o,a){var i=!o;o||(o={});for(var s=-1,u=r.length;++s<u;){var l=r[s],c=a?a(o[l],n[l],l,o,n):void 0;void 0===c&&(c=n[l]),i?t(o,l,c):e(o,l,c)}return o}}function FM(){if(UP)return L_;UP=1;var e=My(),t=Ay();return L_=function(n,r){return n&&e(r,t(r),n)}}function sF(){if(WP)return F_;return WP=1,F_=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}}function uF(){if(qP)return B_;qP=1;var e=bs(),t=GE(),n=sF(),r=Object.prototype.hasOwnProperty;return B_=function(o){if(!e(o))return n(o);var a=t(o),i=[];for(var s in o)"constructor"==s&&(a||!r.call(o,s))||i.push(s);return i}}function XE(){if(GP)return j_;GP=1;var e=_M(),t=uF(),n=EM();return j_=function(r){return n(r)?e(r,!0):t(r)}}function lF(){if(HP)return z_;HP=1;var e=My(),t=XE();return z_=function(n,r){return n&&e(r,t(r),n)}}var KP,V_,YP,U_,QP,W_,XP,q_,JP,G_,ZP,H_,eT,K_,tT,Y_,nT,Q_,rT,X_,oT,J_,iT,Z_,aT,ex,sT,tx,uT,nx,lT,rx,cT,ox,dT,ix,fT,ax,pT,sx,mT,ux,hT,Zh={exports:{}};function cF(){return KP||(KP=1,e=Zh,t=Zh.exports,n=ri(),r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,a=o&&o.exports===r?n.Buffer:void 0,i=a?a.allocUnsafe:void 0,e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=i?i(n):new e.constructor(n);return e.copy(r),r}),Zh.exports;var e,t,n,r,o,a,i}function Dy(){if(YP)return V_;return YP=1,V_=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}}function dF(){if(QP)return U_;QP=1;var e=My(),t=BE();return U_=function(n,r){return e(n,t(n),r)}}function BM(){if(XP)return W_;XP=1;var e=FE(),t=YE(),n=BE(),r=wM(),o=Object.getOwnPropertySymbols;return W_=o?function(r){for(var o=[];r;)e(o,n(r)),r=t(r);return o}:r}function fF(){if(JP)return q_;JP=1;var e=My(),t=BM();return q_=function(n,r){return e(n,t(n),r)}}function pF(){if(ZP)return G_;ZP=1;var e=yM(),t=BM(),n=XE();return G_=function(r){return e(r,n,t)}}function mF(){if(eT)return H_;eT=1;var e=Object.prototype.hasOwnProperty;return H_=function(t){var n=t.length,r=new t.constructor(n);return n&&"string"==typeof t[0]&&e.call(t,"index")&&(r.index=t.index,r.input=t.input),r}}function JE(){if(tT)return K_;tT=1;var e=gM();return K_=function(t){var n=new t.constructor(t.byteLength);return new e(n).set(new e(t)),n}}function hF(){if(nT)return Y_;nT=1;var e=JE();return Y_=function(t,n){var r=n?e(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}}function vF(){if(rT)return Q_;rT=1;var e=/\w*$/;return Q_=function(t){var n=new t.constructor(t.source,e.exec(t));return n.lastIndex=t.lastIndex,n}}function gF(){if(oT)return X_;oT=1;var e=zm(),t=e?e.prototype:void 0,n=t?t.valueOf:void 0;return X_=function(e){return n?Object(n.call(e)):{}}}function yF(){if(iT)return J_;iT=1;var e=JE();return J_=function(t,n){var r=n?e(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}}function wF(){if(aT)return Z_;aT=1;var e=JE(),t=hF(),n=vF(),r=gF(),o=yF();return Z_=function(a,i,s){var u=a.constructor;switch(i){case"[object ArrayBuffer]":return e(a);case"[object Boolean]":case"[object Date]":return new u(+a);case"[object DataView]":return t(a,s);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return o(a,s);case"[object Map]":case"[object Set]":return new u;case"[object Number]":case"[object String]":return new u(a);case"[object RegExp]":return n(a);case"[object Symbol]":return r(a)}}}function Ny(){if(sT)return ex;sT=1;var e=bs(),t=Object.create;return ex=function(){function n(){}return function(r){if(!e(r))return{};if(t)return t(r);n.prototype=r;var o=new n;return n.prototype=void 0,o}}()}function bF(){if(uT)return tx;uT=1;var e=Ny(),t=YE(),n=GE();return tx=function(r){return"function"!=typeof r.constructor||n(r)?{}:e(t(r))}}function _F(){if(lT)return nx;lT=1;var e=kv(),t=ta();return nx=function(n){return t(n)&&"[object Map]"==e(n)}}function xF(){if(cT)return rx;cT=1;var e=_F(),t=WE(),n=qE(),r=n&&n.isMap,o=r?t(r):e;return rx=o}function SF(){if(dT)return ox;dT=1;var e=kv(),t=ta();return ox=function(n){return t(n)&&"[object Set]"==e(n)}}function EF(){if(fT)return ix;fT=1;var e=SF(),t=WE(),n=qE(),r=n&&n.isSet,o=r?t(r):e;return ix=o}function jM(){if(pT)return ax;pT=1;var e=LE(),t=QE(),n=LM(),r=FM(),o=lF(),a=cF(),i=Dy(),s=dF(),u=fF(),l=$M(),c=pF(),d=kv(),f=mF(),p=wF(),m=bF(),v=Ei(),h=zE(),g=xF(),y=bs(),b=EF(),w=Ay(),x=XE(),_="[object Arguments]",E="[object Function]",S="[object Object]",I={};return I[_]=I["[object Array]"]=I["[object ArrayBuffer]"]=I["[object DataView]"]=I["[object Boolean]"]=I["[object Date]"]=I["[object Float32Array]"]=I["[object Float64Array]"]=I["[object Int8Array]"]=I["[object Int16Array]"]=I["[object Int32Array]"]=I["[object Map]"]=I["[object Number]"]=I[S]=I["[object RegExp]"]=I["[object Set]"]=I["[object String]"]=I["[object Symbol]"]=I["[object Uint8Array]"]=I["[object Uint8ClampedArray]"]=I["[object Uint16Array]"]=I["[object Uint32Array]"]=!0,I["[object Error]"]=I[E]=I["[object WeakMap]"]=!1,ax=function A(k,C,P,R,O,T){var N,M=1&C,j=2&C,D=4&C;if(P&&(N=O?P(k,R,O,T):P(k)),void 0!==N)return N;if(!y(k))return k;var q=v(k);if(q){if(N=f(k),!M)return i(k,N)}else{var z=d(k),L=z==E||"[object GeneratorFunction]"==z;if(h(k))return a(k,M);if(z==S||z==_||L&&!O){if(N=j||L?{}:m(k),!M)return j?u(k,o(N,k)):s(k,r(N,k))}else{if(!I[z])return O?k:{};N=p(k,z,M)}}T||(T=new e);var $=T.get(k);if($)return $;T.set(k,N),b(k)?k.forEach((function(e){N.add(A(e,C,P,e,k,T))})):g(k)&&k.forEach((function(e,t){N.set(t,A(e,C,P,t,k,T))}));var V=q?void 0:(D?j?c:l:j?x:w)(k);return t(V||k,(function(e,t){V&&(e=k[t=e]),n(N,t,A(e,C,P,t,k,T))})),N},ax}function $F(){if(mT)return sx;mT=1;var e=j9();return sx=function(t){return(null==t?0:t.length)?e(t,1):[]}}function CF(){if(hT)return ux;hT=1;var e=$F(),t=z9(),n=AM();return ux=function(r){return n(t(r,void 0,e),r+"")}}Zh.exports;const IF={light:"",dark:".dark"},zM=v.createContext(null);function VM(){const e=v.useContext(zM);if(!e)throw new Error("useChart must be used within a <ChartContainer />");return e}const RF=v.forwardRef((({id:e,className:t,children:n,config:r,...o},a)=>{const i=v.useId(),s=`chart-${e||i.replace(/:/g,"")}`;return G.jsx(zM.Provider,{value:{config:r},children:G.jsxs("div",{"data-chart":s,ref:a,className:_e("flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none",t),...o,children:[G.jsx(PF,{id:s,config:r}),G.jsx(oF,{children:n})]})})}));RF.displayName="Chart";const PF=({id:e,config:t})=>{const n=Object.entries(t).filter((([,e])=>e.theme||e.color));return n.length?G.jsx("style",{dangerouslySetInnerHTML:{__html:Object.entries(IF).map((([t,r])=>`\n${r} [data-chart=${e}] {\n${n.map((([e,n])=>{var r;const o=(null==(r=n.theme)?void 0:r[t])||n.color;return o?` --color-${e}: ${o};`:null})).join("\n")}\n}\n`)).join("\n")}}):null},TF=v.forwardRef((({active:e,payload:t,className:n,indicator:r="dot",hideLabel:o=!1,hideIndicator:a=!1,label:i,labelFormatter:s,labelClassName:u,formatter:l,color:c,nameKey:d,labelKey:f,hoveredItem:p,onItemHover:m},h)=>{const{config:g}=VM(),y=v.useMemo((()=>{var e;if(o||null==t||!t.length)return null;const[n]=t,r=`${f||(null==n?void 0:n.dataKey)||(null==n?void 0:n.name)||"value"}`,a=kS(g,n,r),l=f||"string"!=typeof i?null==a?void 0:a.label:(null==(e=g[i])?void 0:e.label)||i;return s?G.jsx("div",{className:_e("font-medium",u),children:s(l,t)}):l?G.jsx("div",{className:_e("font-medium",u),children:l}):null}),[i,s,t,o,u,g,f]);if(!e||null==t||!t.length)return null;const b=1===t.length&&"dot"!==r,w=t.length>10;return G.jsxs("div",{ref:h,className:_e("grid min-w-[8rem] items-start gap-xxs rounded-sm border border-border/50 bg-background px-xs py-xxs text-xs shadow-xl",w&&"min-w-[16rem]",n),children:[b?null:y,G.jsx("div",{className:_e("grid gap-xxs",w&&"grid-cols-2 gap-x-s"),children:t.map(((e,t)=>{var n;const o=`${d||e.name||e.dataKey||"value"}`,i=kS(g,e,o),s=c||(null==(n=e.payload)?void 0:n.fill)||e.color||"",u=o===p;return G.jsx("div",{className:_e("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground","dot"===r&&"items-center",u?"":p?"opacity-40":""),onMouseEnter:()=>null==m?void 0:m(o),onMouseLeave:()=>null==m?void 0:m(null),children:l&&void 0!==(null==e?void 0:e.value)&&void 0!==(null==e?void 0:e.payload)&&e.name?l(e.value,e.name,e,t,[e.payload]):G.jsxs(G.Fragment,{children:[null!=i&&i.icon?G.jsx(i.icon,{}):!a&&G.jsx("div",{className:_e("shrink-0 rounded-full border-[--color-border] bg-[--color-bg]",{"h-2.5 w-2.5":"dot"===r,"w-1":"line"===r,"w-0 border border-dashed bg-transparent":"dashed"===r,"my-0.5":b&&"dashed"===r}),style:{"--color-bg":s,"--color-border":s}}),G.jsxs("div",{className:_e("flex flex-1 justify-between leading-none",b?"items-end":"items-center"),children:[G.jsxs("div",{className:"grid gap-xxs",children:[b?y:null,G.jsx("span",{className:_e("text-muted-foreground",u&&"font-medium text-foreground"),children:(null==i?void 0:i.label)||e.name})]}),e.value&&G.jsx("span",{className:_e("font-mono font-medium tabular-nums text-foreground",u&&"font-bold"),children:e.value.toLocaleString()})]})]})},e.dataKey)}))})]})}));TF.displayName="ChartTooltip";const OF=v.forwardRef((({className:e,hideIcon:t=!1,payload:n,nameKey:r,onItemHover:o,hoveredItem:a},i)=>{const{config:s}=VM(),u=v.useRef({});return v.useEffect((()=>{if(a&&u.current[a]){const e=u.current[a];e&&e.scrollIntoView({behavior:"smooth",block:"nearest"})}}),[a]),null!=n&&n.length?G.jsx("div",{ref:i,className:_e("flex h-[150px] w-full flex-wrap items-center justify-center gap-l overflow-y-auto pb-xl",e),children:n.map((e=>{var n;const i=`${r||e.dataKey||"value"}`,l=kS(s,e,i),c=!!o&&i===a;return G.jsxs("div",{ref:e=>{e?u.current[i]=e:delete u.current[i]},className:_e("group flex cursor-pointer select-none items-center gap-xs text-base transition-all duration-150",c?"scale-105 text-black":a?"text-gray-700 opacity-40":"text-gray-700"),onMouseEnter:()=>null==o?void 0:o(e.dataKey),onMouseLeave:()=>null==o?void 0:o(null),children:[null!=l&&l.icon&&!t?G.jsx(l.icon,{}):G.jsx("div",{className:"h-2 w-2 shrink-0 rounded-full",style:{backgroundColor:e.color||""}}),G.jsx("span",{className:"min-w-[max-content]",children:(null==l?void 0:l.label)||e.name})]},(null==(n=e.value)?void 0:n.toString())||i)}))}):null}));function kS(e,t,n){if("object"!=typeof t||null===t)return;const r="payload"in t&&"object"==typeof t.payload&&null!==t.payload?t.payload:void 0;let o=n;return n in t&&"string"==typeof t[n]?o=t[n]:r&&n in r&&"string"==typeof r[n]&&(o=r[n]),o in e?e[o]:e[n]}OF.displayName="ChartLegend";const AF=({children:e,className:t})=>G.jsx("div",{className:_e("flex flex-wrap gap-xxxs",t),children:e}),UM=({text:e,icon:t,disabled:n,isLoading:r,avatarSrc:o,onClick:a,onRemove:i,className:s})=>G.jsxs("div",{onClick:n?void 0:a,className:_e("flex cursor-pointer items-center gap-xxxs rounded-sm bg-gray-100 p-xxs text-sm font-medium text-gray-900 transition-all hover:bg-gray-200 [&_svg]:size-4",n&&"cursor-not-allowed bg-gray-100 text-gray-300",s),children:[o&&G.jsxs(JA,{className:_e("size-6 text-[10px]"),children:[G.jsx(ZA,{src:o,alt:e}),G.jsx(eM,{className:"text-xs",children:e.charAt(0).toUpperCase()})]}),t,G.jsx("span",{children:e}),i&&!r&&G.jsx("span",{role:"button",tabIndex:-1,onClick:e=>{e.stopPropagation(),e.preventDefault(),!n&&(null==i||i())},onPointerDown:e=>{e.stopPropagation(),e.preventDefault()},className:_e("pointer-events-auto cursor-pointer",n&&"pointer-events-none cursor-not-allowed opacity-50"),children:G.jsx(gy,{size:16})}),r&&G.jsx(sA,{size:16,className:"animate-spin"})]});function ky(e){const t=v.useRef({value:e,previous:e});return v.useMemo((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}function Ly(e){const[t,n]=v.useState(void 0);return Vo((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t)||!t.length)return;const r=t[0];let o,a;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,a=t.blockSize}else o=e.offsetWidth,a=e.offsetHeight;n({width:o,height:a})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}const WM="Checkbox",[MF,eZ]=ni(WM),[DF,NF]=MF(WM),kF=v.forwardRef(((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:a,required:i,disabled:s,value:u="on",onCheckedChange:l,...c}=e,[d,f]=v.useState(null),p=Vt(t,(e=>f(e))),m=v.useRef(!1),h=!d||!!d.closest("form"),[g=!1,y]=fd({prop:o,defaultProp:a,onChange:l}),b=v.useRef(g);return v.useEffect((()=>{const e=null==d?void 0:d.form;if(e){const t=()=>y(b.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}}),[d,y]),v.createElement(DF,{scope:n,state:g,disabled:s},v.createElement(lt.button,Pe({type:"button",role:"checkbox","aria-checked":Bf(g)?"mixed":g,"aria-required":i,"data-state":qM(g),"data-disabled":s?"":void 0,disabled:s,value:u},c,{ref:p,onKeyDown:et(e.onKeyDown,(e=>{"Enter"===e.key&&e.preventDefault()})),onClick:et(e.onClick,(e=>{y((e=>!!Bf(e)||!e)),h&&(m.current=e.isPropagationStopped(),m.current||e.stopPropagation())}))})),h&&v.createElement(BF,{control:d,bubbles:!m.current,name:r,value:u,checked:g,required:i,disabled:s,style:{transform:"translateX(-100%)"}}))})),LF="CheckboxIndicator",FF=v.forwardRef(((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,a=NF(LF,n);return v.createElement(ea,{present:r||Bf(a.state)||!0===a.state},v.createElement(lt.span,Pe({"data-state":qM(a.state),"data-disabled":a.disabled?"":void 0},o,{ref:t,style:{pointerEvents:"none",...e.style}})))})),BF=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,a=v.useRef(null),i=ky(n),s=Ly(t);return v.useEffect((()=>{const e=a.current,t=window.HTMLInputElement.prototype,o=Object.getOwnPropertyDescriptor(t,"checked").set;if(i!==n&&o){const t=new Event("click",{bubbles:r});e.indeterminate=Bf(n),o.call(e,!Bf(n)&&n),e.dispatchEvent(t)}}),[i,n,r]),v.createElement("input",Pe({type:"checkbox","aria-hidden":!0,defaultChecked:!Bf(n)&&n},o,{tabIndex:-1,ref:a,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function Bf(e){return"indeterminate"===e}function qM(e){return Bf(e)?"indeterminate":e?"checked":"unchecked"}const GM=kF,jF=FF,zF=gu("relative overflow-hidden ",{variants:{size:{default:"size-xs"},variant:{default:"peer shrink-0 rounded-sm border disabled:cursor-not-allowed disabled:!border-0 disabled:!bg-gray-100"}},defaultVariants:{size:"default",variant:"default"}}),ZE=v.forwardRef((({className:e,size:t,variant:n,iconType:r,...o},a)=>{const i=o.checked,[s]=v.useState(i),[u,l]=v.useState(!1);v.useEffect((()=>{s!==i&&l(!0)}),[i]);const c=e=>"minus"===r?G.jsx(q5,{...e}):G.jsx(gE,{...e});return G.jsxs(GM,{ref:a,className:_e(zF({size:t,variant:n}),"transition-[border] duration-100 ease-linear",i?"border-0":"border-gray-300 hover:border-2",e),...o,children:[G.jsx("div",{className:_e("transform-origin-center absolute left-0 top-0 size-full rounded-full bg-blue_100",i?"scale-[1.2]":"scale-0",{"animate-fill-in":i&&u,"animate-fill-out":!i&&u})}),G.jsx(jF,{className:"relative flex items-center justify-center text-current",children:G.jsx(c,{className:"size-xxxs",color:o.disabled?"var(--gray-300)":"white"})})]})}));ZE.displayName=GM.displayName;var vT=1,VF=.9,UF=.8,WF=.17,lx=.1,cx=.999,qF=.9999,GF=.99,HF=/[\\\/_+.#"@\[\(\{&]/,KF=/[\\\/_+.#"@\[\(\{&]/g,YF=/[\s-]/,HM=/[\s-]/g;function LS(e,t,n,r,o,a,i){if(a===t.length)return o===e.length?vT:GF;var s=`${o},${a}`;if(void 0!==i[s])return i[s];for(var u,l,c,d,f=r.charAt(a),p=n.indexOf(f,o),m=0;p>=0;)(u=LS(e,t,n,r,p+1,a+1,i))>m&&(p===o?u*=vT:HF.test(e.charAt(p-1))?(u*=UF,(c=e.slice(o,p-1).match(KF))&&o>0&&(u*=Math.pow(cx,c.length))):YF.test(e.charAt(p-1))?(u*=VF,(d=e.slice(o,p-1).match(HM))&&o>0&&(u*=Math.pow(cx,d.length))):(u*=WF,o>0&&(u*=Math.pow(cx,p-o))),e.charAt(p)!==t.charAt(a)&&(u*=qF)),(u<lx&&n.charAt(p-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(p-1)!==r.charAt(a))&&((l=LS(e,t,n,r,p+1,a+2,i))*lx>u&&(u=l*lx)),u>m&&(m=u),p=n.indexOf(f,p+1);return i[s]=m,m}function gT(e){return e.toLowerCase().replace(HM," ")}function QF(e,t,n){return LS(e=n&&n.length>0?""+(e+" "+n.join(" ")):e,t,gT(e),gT(t),0,0,{})}var Wh='[cmdk-group=""]',dx='[cmdk-group-items=""]',XF='[cmdk-group-heading=""]',e$='[cmdk-item=""]',yT=`${e$}:not([aria-disabled="true"])`,FS="cmdk-item-select",Nf="data-value",JF=(e,t,n)=>QF(e,t,n),KM=v.createContext(void 0),Lv=()=>v.useContext(KM),YM=v.createContext(void 0),t$=()=>v.useContext(YM),QM=v.createContext(void 0),XM=v.forwardRef(((e,t)=>{let n=$m((()=>{var t,n;return{search:"",value:null!=(n=null!=(t=e.value)?t:e.defaultValue)?n:"",filtered:{count:0,items:new Map,groups:new Set}}})),r=$m((()=>new Set)),o=$m((()=>new Map)),a=$m((()=>new Map)),i=$m((()=>new Set)),s=JM(e),{label:u,children:l,value:c,onValueChange:d,filter:f,shouldFilter:p,loop:m,disablePointerSelection:h=!1,vimBindings:g=!0,...y}=e,b=v.useId(),w=v.useId(),x=v.useId(),_=v.useRef(null),E=lB();Hf((()=>{if(void 0!==c){let e=c.trim();n.current.value=e,S.emit()}}),[c]),Hf((()=>{E(6,R)}),[]);let S=v.useMemo((()=>({subscribe:e=>(i.current.add(e),()=>i.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var o,a,i;if(!Object.is(n.current[e],t)){if(n.current[e]=t,"search"===e)P(),k(),E(1,C);else if("value"===e&&(r||E(5,R),void 0!==(null==(o=s.current)?void 0:o.value))){let e=t??"";return void(null==(i=(a=s.current).onValueChange)||i.call(a,e))}S.emit()}},emit:()=>{i.current.forEach((e=>e()))}})),[]),I=v.useMemo((()=>({value:(e,t,r)=>{var o;t!==(null==(o=a.current.get(e))?void 0:o.value)&&(a.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,A(t,r)),E(2,(()=>{k(),S.emit()})))},item:(e,t)=>(r.current.add(e),t&&(o.current.has(t)?o.current.get(t).add(e):o.current.set(t,new Set([e]))),E(3,(()=>{P(),k(),n.current.value||C(),S.emit()})),()=>{a.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=O();E(4,(()=>{P(),(null==t?void 0:t.getAttribute("id"))===e&&C(),S.emit()}))}),group:e=>(o.current.has(e)||o.current.set(e,new Set),()=>{a.current.delete(e),o.current.delete(e)}),filter:()=>s.current.shouldFilter,label:u||e["aria-label"],disablePointerSelection:h,listId:b,inputId:x,labelId:w,listInnerRef:_})),[]);function A(e,t){var r,o;let a=null!=(o=null==(r=s.current)?void 0:r.filter)?o:JF;return e?a(e,n.current.search,t):0}function k(){if(!n.current.search||!1===s.current.shouldFilter)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach((n=>{let r=o.current.get(n),a=0;r.forEach((t=>{let n=e.get(t);a=Math.max(n,a)})),t.push([n,a])}));let r=_.current;T().sort(((t,n)=>{var r,o;let a=t.getAttribute("id"),i=n.getAttribute("id");return(null!=(r=e.get(i))?r:0)-(null!=(o=e.get(a))?o:0)})).forEach((e=>{let t=e.closest(dx);t?t.appendChild(e.parentElement===t?e:e.closest(`${dx} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${dx} > *`))})),t.sort(((e,t)=>t[1]-e[1])).forEach((e=>{let t=_.current.querySelector(`${Wh}[${Nf}="${encodeURIComponent(e[0])}"]`);null==t||t.parentElement.appendChild(t)}))}function C(){let e=T().find((e=>"true"!==e.getAttribute("aria-disabled"))),t=null==e?void 0:e.getAttribute(Nf);S.setState("value",t||void 0)}function P(){var e,t,i,u;if(!n.current.search||!1===s.current.shouldFilter)return void(n.current.filtered.count=r.current.size);n.current.filtered.groups=new Set;let l=0;for(let o of r.current){let r=A(null!=(t=null==(e=a.current.get(o))?void 0:e.value)?t:"",null!=(u=null==(i=a.current.get(o))?void 0:i.keywords)?u:[]);n.current.filtered.items.set(o,r),r>0&&l++}for(let[e,t]of o.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=l}function R(){var e,t,n;let r=O();r&&((null==(e=r.parentElement)?void 0:e.firstChild)===r&&(null==(n=null==(t=r.closest(Wh))?void 0:t.querySelector(XF))||n.scrollIntoView({block:"nearest"})),r.scrollIntoView({block:"nearest"}))}function O(){var e;return null==(e=_.current)?void 0:e.querySelector(`${e$}[aria-selected="true"]`)}function T(){var e;return Array.from(null==(e=_.current)?void 0:e.querySelectorAll(yT))}function N(e){let t=T()[e];t&&S.setState("value",t.getAttribute(Nf))}function M(e){var t;let n=O(),r=T(),o=r.findIndex((e=>e===n)),a=r[o+e];null!=(t=s.current)&&t.loop&&(a=o+e<0?r[r.length-1]:o+e===r.length?r[0]:r[o+e]),a&&S.setState("value",a.getAttribute(Nf))}function j(e){let t,n=O(),r=null==n?void 0:n.closest(Wh);for(;r&&!t;)r=e>0?sB(r,Wh):uB(r,Wh),t=null==r?void 0:r.querySelector(yT);t?S.setState("value",t.getAttribute(Nf)):M(e)}let D=()=>N(T().length-1),q=e=>{e.preventDefault(),e.metaKey?D():e.altKey?j(1):M(1)},z=e=>{e.preventDefault(),e.metaKey?N(0):e.altKey?j(-1):M(-1)};return v.createElement(lt.div,{ref:t,tabIndex:-1,...y,"cmdk-root":"",onKeyDown:e=>{var t;if(null==(t=y.onKeyDown)||t.call(y,e),!e.defaultPrevented)switch(e.key){case"n":case"j":g&&e.ctrlKey&&q(e);break;case"ArrowDown":q(e);break;case"p":case"k":g&&e.ctrlKey&&z(e);break;case"ArrowUp":z(e);break;case"Home":e.preventDefault(),N(0);break;case"End":e.preventDefault(),D();break;case"Enter":if(!e.nativeEvent.isComposing&&229!==e.keyCode){e.preventDefault();let t=O();if(t){let e=new Event(FS);t.dispatchEvent(e)}}}}},v.createElement("label",{"cmdk-label":"",htmlFor:I.inputId,id:I.labelId,style:dB},u),Fy(e,(e=>v.createElement(YM.Provider,{value:S},v.createElement(KM.Provider,{value:I},e)))))})),ZF=v.forwardRef(((e,t)=>{var n,r;let o=v.useId(),a=v.useRef(null),i=v.useContext(QM),s=Lv(),u=JM(e),l=null!=(r=null==(n=u.current)?void 0:n.forceMount)?r:null==i?void 0:i.forceMount;Hf((()=>{if(!l)return s.item(o,null==i?void 0:i.id)}),[l]);let c=ZM(o,a,[e.value,e.children,a],e.keywords),d=t$(),f=Kf((e=>e.value&&e.value===c.current)),p=Kf((e=>!(!l&&!1!==s.filter())||(!e.search||e.filtered.items.get(o)>0)));function m(){var e,t;h(),null==(t=(e=u.current).onSelect)||t.call(e,c.current)}function h(){d.setState("value",c.current,!0)}if(v.useEffect((()=>{let t=a.current;if(t&&!e.disabled)return t.addEventListener(FS,m),()=>t.removeEventListener(FS,m)}),[p,e.onSelect,e.disabled]),!p)return null;let{disabled:g,value:y,onSelect:b,forceMount:w,keywords:x,..._}=e;return v.createElement(lt.div,{ref:gv([a,t]),..._,id:o,"cmdk-item":"",role:"option","aria-disabled":!!g,"aria-selected":!!f,"data-disabled":!!g,"data-selected":!!f,onPointerMove:g||s.disablePointerSelection?void 0:h,onClick:g?void 0:m},e.children)})),eB=v.forwardRef(((e,t)=>{let{heading:n,children:r,forceMount:o,...a}=e,i=v.useId(),s=v.useRef(null),u=v.useRef(null),l=v.useId(),c=Lv(),d=Kf((e=>!(!o&&!1!==c.filter())||(!e.search||e.filtered.groups.has(i))));Hf((()=>c.group(i)),[]),ZM(i,s,[e.value,e.heading,u]);let f=v.useMemo((()=>({id:i,forceMount:o})),[o]);return v.createElement(lt.div,{ref:gv([s,t]),...a,"cmdk-group":"",role:"presentation",hidden:!d||void 0},n&&v.createElement("div",{ref:u,"cmdk-group-heading":"","aria-hidden":!0,id:l},n),Fy(e,(e=>v.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?l:void 0},v.createElement(QM.Provider,{value:f},e)))))})),tB=v.forwardRef(((e,t)=>{let{alwaysRender:n,...r}=e,o=v.useRef(null),a=Kf((e=>!e.search));return n||a?v.createElement(lt.div,{ref:gv([o,t]),...r,"cmdk-separator":"",role:"separator"}):null})),nB=v.forwardRef(((e,t)=>{let{onValueChange:n,...r}=e,o=null!=e.value,a=t$(),i=Kf((e=>e.search)),s=Kf((e=>e.value)),u=Lv(),l=v.useMemo((()=>{var e;let t=null==(e=u.listInnerRef.current)?void 0:e.querySelector(`${e$}[${Nf}="${encodeURIComponent(s)}"]`);return null==t?void 0:t.getAttribute("id")}),[]);return v.useEffect((()=>{null!=e.value&&a.setState("search",e.value)}),[e.value]),v.createElement(lt.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":u.listId,"aria-labelledby":u.labelId,"aria-activedescendant":l,id:u.inputId,type:"text",value:o?e.value:i,onChange:e=>{o||a.setState("search",e.target.value),null==n||n(e.target.value)}})})),rB=v.forwardRef(((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,a=v.useRef(null),i=v.useRef(null),s=Lv();return v.useEffect((()=>{if(i.current&&a.current){let e,t=i.current,n=a.current,r=new ResizeObserver((()=>{e=requestAnimationFrame((()=>{let e=t.offsetHeight;n.style.setProperty("--cmdk-list-height",e.toFixed(1)+"px")}))}));return r.observe(t),()=>{cancelAnimationFrame(e),r.unobserve(t)}}}),[]),v.createElement(lt.div,{ref:gv([a,t]),...o,"cmdk-list":"",role:"listbox","aria-label":r,id:s.listId},Fy(e,(e=>v.createElement("div",{ref:gv([i,s.listInnerRef]),"cmdk-list-sizer":""},e))))})),oB=v.forwardRef(((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:a,container:i,...s}=e;return v.createElement(FA,{open:n,onOpenChange:r},v.createElement(Ey,{container:i},v.createElement(Bm,{"cmdk-overlay":"",className:o}),v.createElement(jm,{"aria-label":e.label,"cmdk-dialog":"",className:a},v.createElement(XM,{ref:t,...s}))))})),iB=v.forwardRef(((e,t)=>Kf((e=>0===e.filtered.count))?v.createElement(lt.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null)),aB=v.forwardRef(((e,t)=>{let{progress:n,children:r,label:o="Loading...",...a}=e;return v.createElement(lt.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},Fy(e,(e=>v.createElement("div",{"aria-hidden":!0},e))))})),$i=Object.assign(XM,{List:rB,Item:ZF,Input:nB,Group:eB,Separator:tB,Dialog:oB,Empty:iB,Loading:aB});function sB(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function uB(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function JM(e){let t=v.useRef(e);return Hf((()=>{t.current=e})),t}var Hf=typeof window>"u"?v.useEffect:v.useLayoutEffect;function $m(e){let t=v.useRef();return void 0===t.current&&(t.current=e()),t}function gv(e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}function Kf(e){let t=t$(),n=()=>e(t.snapshot());return v.useSyncExternalStore(t.subscribe,n,n)}function ZM(e,t,n,r=[]){let o=v.useRef(),a=Lv();return Hf((()=>{var i;let s=(()=>{var e;for(let t of n){if("string"==typeof t)return t.trim();if("object"==typeof t&&"current"in t)return t.current?null==(e=t.current.textContent)?void 0:e.trim():o.current}})(),u=r.map((e=>e.trim()));a.value(e,s,u),null==(i=t.current)||i.setAttribute(Nf,s),o.current=s})),o}var lB=()=>{let[e,t]=v.useState(),n=$m((()=>new Map));return Hf((()=>{n.current.forEach((e=>e())),n.current=new Map}),[e]),(e,r)=>{n.current.set(e,r),t({})}};function cB(e){let t=e.type;return"function"==typeof t?t(e.props):"render"in t?t.render(e.props):e}function Fy({asChild:e,children:t},n){return e&&v.isValidElement(t)?v.cloneElement(cB(t),{ref:t.ref},n(t.props.children)):n(t)}var dB={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const fB=Ey,eD=v.forwardRef((({className:e,...t},n)=>(v.useEffect((()=>{const e=document.querySelectorAll(".blured-modal-overlay");return e.forEach((e=>e&&(e.style.filter="blur(5px)"))),()=>{0===Array.from(document.querySelectorAll('[role="dialog"]')).length&&e.forEach((e=>e&&(e.style.filter="none")))}}),[]),G.jsx(Bm,{ref:n,"data-testid":"dialog_overlay",className:_e("fixed inset-0 z-dialog bg-black opacity-[0.8] data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}))));eD.displayName=Bm.displayName;const pB=gu("",{variants:{closeVariant:{none:"",insideCard:"absolute right-m top-m rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground text-gray-400",outsideCard:"fixed right-[30px] top-[30px] z-100 text-gray-400",mobileGallery:"fixed right-m top-[62px] text-white z-[110]"}},defaultVariants:{closeVariant:"outsideCard"}}),mB=gu("",{variants:{closeSize:{small:"size-6",big:"size-[42px]","18x18":"size-[18px]"}},defaultVariants:{closeSize:"small"}}),hB=v.forwardRef((({title:e,titleIcon:t,className:n,dialogName:r,showClose:o=!0,closeVariant:a="outsideCard",closeSize:i="big",children:s,titleClassName:u,overlayClassName:l,childrenClassName:c,footerClassName:d,onBack:f,onCloseModal:p,renderFooter:m,onScroll:v,...h},g)=>{const y=G.jsxs($y,{className:_e(pB({closeVariant:a})),children:[G.jsx(gy,{onClick:p,fill:"currentColor",className:_e(mB({closeSize:i}))}),G.jsx("span",{className:"sr-only",children:"Close"})]});return G.jsxs(fB,{children:[G.jsx(eD,{className:l,onClick:p}),o&&"insideCard"!==a&&y,G.jsxs(jm,{ref:g,className:_e("fixed left-[50%] top-[50%] z-[101] grid max-w-[600px] translate-x-[-50%] translate-y-[-50%] !overflow-visible rounded-sm bg-background shadow-lg outline-none duration-200 data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] max-md:w-[calc(100vw-32px)] md:w-full [&>div]:min-w-0",n),...h,children:[e&&G.jsxs("h3",{className:_e("flex items-center justify-center gap-xxs border-b border-gray-200 p-m text-center text-lg font-semibold text-gray-700",u),children:[t,e]}),G.jsx("div",{id:r||"dialog-content",className:_e("p-m",c),onScroll:v,children:s}),o&&"insideCard"===a&&y,f&&G.jsx("button",{"data-testid":"dialog-back-button","aria-label":"Back",onClick:f,className:"absolute left-m top-m",children:G.jsx(iA,{color:"var(--gray-400)",size:24})}),G.jsx(tD,{className:_e("empty:hidden",d),children:null==m?void 0:m()})]})]})}));hB.displayName=jm.displayName;const tD=({className:e,...t})=>G.jsx("div",{className:_e("flex border-t border-gray-200 p-m",e),...t});tD.displayName="DialogFooter";const vB=v.forwardRef((({className:e,...t},n)=>G.jsx(Ov,{ref:n,className:_e("text-lg font-semibold leading-none tracking-tight",e),...t})));vB.displayName=Ov.displayName;const gB=v.forwardRef((({className:e,...t},n)=>G.jsx(Av,{ref:n,className:_e("text-sm text-muted-foreground",e),...t})));gB.displayName=Av.displayName;const yB=v.forwardRef((({className:e,...t},n)=>G.jsx($i,{ref:n,className:_e("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t})));yB.displayName=$i.displayName;const wB=v.forwardRef((({className:e,...t},n)=>G.jsx("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:G.jsx($i.Input,{ref:n,className:_e("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})})));wB.displayName=$i.Input.displayName;const bB=v.forwardRef((({className:e,...t},n)=>G.jsx($i.List,{ref:n,className:_e("mt-2 max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t})));bB.displayName=$i.List.displayName;const _B=v.forwardRef(((e,t)=>G.jsx($i.Empty,{ref:t,className:"py-6 text-center text-sm",...e})));_B.displayName=$i.Empty.displayName;const xB=v.forwardRef((({className:e,...t},n)=>G.jsx($i.Group,{ref:n,className:_e("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t})));xB.displayName=$i.Group.displayName;const SB=v.forwardRef((({className:e,...t},n)=>G.jsx($i.Separator,{ref:n,className:_e("-mx-1 h-px bg-border",e),...t})));SB.displayName=$i.Separator.displayName;const EB=v.forwardRef((({className:e,...t},n)=>G.jsx($i.Item,{ref:n,className:_e("relative flex max-w-[215px] cursor-default select-none items-center rounded-xs px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50",e),...t})));function sd(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function wT(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function nD(...e){return t=>{let n=!1;const r=e.map((e=>{const r=wT(e,t);return!n&&"function"==typeof r&&(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():wT(e[t],null)}}}}function ep(...e){return v.useCallback(nD(...e),e)}function $B(e,t){const n=v.createContext(t),r=e=>{const{children:t,...r}=e,o=v.useMemo((()=>r),Object.values(r));return G.jsx(n.Provider,{value:o,children:t})};return r.displayName=e+"Provider",[r,function(r){const o=v.useContext(n);if(o)return o;if(void 0!==t)return t;throw new Error(`\`${r}\` must be used within \`${e}\``)}]}function CB(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>v.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return v.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=v.createContext(r),a=n.length;n=[...n,r];const i=t=>{var n;const{scope:r,children:i,...s}=t,u=(null==(n=null==r?void 0:r[e])?void 0:n[a])||o,l=v.useMemo((()=>s),Object.values(s));return G.jsx(u.Provider,{value:l,children:i})};return i.displayName=t+"Provider",[i,function(n,i){var s;const u=(null==(s=null==i?void 0:i[e])?void 0:s[a])||o,l=v.useContext(u);if(l)return l;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},IB(r,...t)]}function IB(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return v.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}EB.displayName=$i.Item.displayName;var Xg=null!=globalThis&&globalThis.document?v.useLayoutEffect:()=>{},RB=Yg[" useId ".trim().toString()]||(()=>{}),PB=0;function fx(e){const[t,n]=v.useState(RB());return Xg((()=>{e||n((e=>e??String(PB++)))}),[e]),e||(t?`radix-${t}`:"")}function Yf(e){const t=v.useRef(e);return v.useEffect((()=>{t.current=e})),v.useMemo((()=>(...e)=>{var n;return null==(n=t.current)?void 0:n.call(t,...e)}),[])}function TB({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=OB({defaultProp:t,onChange:n}),a=void 0!==e,i=a?e:r,s=Yf(n);return[i,v.useCallback((t=>{if(a){const n="function"==typeof t?t(e):t;n!==e&&s(n)}else o(t)}),[a,e,o,s])]}function OB({defaultProp:e,onChange:t}){const n=v.useState(e),[r]=n,o=v.useRef(r),a=Yf(t);return v.useEffect((()=>{o.current!==r&&(a(r),o.current=r)}),[r,o,a]),n}function rD(e){const t=AB(e),n=v.forwardRef(((e,n)=>{const{children:r,...o}=e,a=v.Children.toArray(r),i=a.find(DB);if(i){const e=i.props.children,r=a.map((t=>t===i?v.Children.count(e)>1?v.Children.only(null):v.isValidElement(e)?e.props.children:null:t));return G.jsx(t,{...o,ref:n,children:v.isValidElement(e)?v.cloneElement(e,void 0,r):null})}return G.jsx(t,{...o,ref:n,children:r})}));return n.displayName=`${e}.Slot`,n}function AB(e){const t=v.forwardRef(((e,t)=>{const{children:n,...r}=e;if(v.isValidElement(n)){const e=kB(n),o=NB(r,n.props);return n.type!==v.Fragment&&(o.ref=t?nD(t,e):e),v.cloneElement(n,o)}return v.Children.count(n)>1?v.Children.only(null):null}));return t.displayName=`${e}.SlotClone`,t}var MB=Symbol("radix.slottable");function DB(e){return v.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===MB}function NB(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{a(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function kB(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?e.ref:(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var LB=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Il=LB.reduce(((e,t)=>{const n=rD(`Primitive.${t}`),r=v.forwardRef(((e,r)=>{const{asChild:o,...a}=e,i=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),G.jsx(i,{...a,ref:r})}));return r.displayName=`Primitive.${t}`,{...e,[t]:r}}),{});function FB(e,t){e&&vu.flushSync((()=>e.dispatchEvent(t)))}function BB(e,t=(null==globalThis?void 0:globalThis.document)){const n=Yf(e);v.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})}),[n,t])}var bT,jB="DismissableLayer",BS="dismissableLayer.update",zB="dismissableLayer.pointerDownOutside",VB="dismissableLayer.focusOutside",oD=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),iD=v.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...u}=e,l=v.useContext(oD),[c,d]=v.useState(null),f=(null==c?void 0:c.ownerDocument)??(null==globalThis?void 0:globalThis.document),[,p]=v.useState({}),m=ep(t,(e=>d(e))),h=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),y=h.indexOf(g),b=c?h.indexOf(c):-1,w=l.layersWithOutsidePointerEventsDisabled.size>0,x=b>=y,_=qB((e=>{const t=e.target,n=[...l.branches].some((e=>e.contains(t)));!x||n||(null==o||o(e),null==i||i(e),e.defaultPrevented||null==s||s())}),f),E=GB((e=>{const t=e.target;[...l.branches].some((e=>e.contains(t)))||(null==a||a(e),null==i||i(e),e.defaultPrevented||null==s||s())}),f);return BB((e=>{b===l.layers.size-1&&(null==r||r(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))}),f),v.useEffect((()=>{if(c)return n&&(0===l.layersWithOutsidePointerEventsDisabled.size&&(bT=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(c)),l.layers.add(c),_T(),()=>{n&&1===l.layersWithOutsidePointerEventsDisabled.size&&(f.body.style.pointerEvents=bT)}}),[c,f,n,l]),v.useEffect((()=>()=>{c&&(l.layers.delete(c),l.layersWithOutsidePointerEventsDisabled.delete(c),_T())}),[c,l]),v.useEffect((()=>{const e=()=>p({});return document.addEventListener(BS,e),()=>document.removeEventListener(BS,e)}),[]),G.jsx(Il.div,{...u,ref:m,style:{pointerEvents:w?x?"auto":"none":void 0,...e.style},onFocusCapture:sd(e.onFocusCapture,E.onFocusCapture),onBlurCapture:sd(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:sd(e.onPointerDownCapture,_.onPointerDownCapture)})}));iD.displayName=jB;var UB="DismissableLayerBranch",WB=v.forwardRef(((e,t)=>{const n=v.useContext(oD),r=v.useRef(null),o=ep(t,r);return v.useEffect((()=>{const e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),G.jsx(Il.div,{...e,ref:o})}));function qB(e,t=(null==globalThis?void 0:globalThis.document)){const n=Yf(e),r=v.useRef(!1),o=v.useRef((()=>{}));return v.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){aD(zB,n,a,{discrete:!0})};const a={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}function GB(e,t=(null==globalThis?void 0:globalThis.document)){const n=Yf(e),r=v.useRef(!1);return v.useEffect((()=>{const e=e=>{e.target&&!r.current&&aD(VB,n,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function _T(){const e=new CustomEvent(BS);document.dispatchEvent(e)}function aD(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?FB(o,a):o.dispatchEvent(a)}WB.displayName=UB;var px="focusScope.autoFocusOnMount",mx="focusScope.autoFocusOnUnmount",xT={bubbles:!1,cancelable:!0},HB="FocusScope",sD=v.forwardRef(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[s,u]=v.useState(null),l=Yf(o),c=Yf(a),d=v.useRef(null),f=ep(t,(e=>u(e))),p=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect((()=>{if(r){let e=function(e){if(p.paused||!s)return;const t=e.target;s.contains(t)?d.current=t:id(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;const t=e.relatedTarget;null!==t&&(s.contains(t)||id(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&id(s)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}}),[r,s,p.paused]),v.useEffect((()=>{if(s){ET.add(p);const e=document.activeElement;if(!s.contains(e)){const t=new CustomEvent(px,xT);s.addEventListener(px,l),s.dispatchEvent(t),t.defaultPrevented||(KB(ZB(uD(s)),{select:!0}),document.activeElement===e&&id(s))}return()=>{s.removeEventListener(px,l),setTimeout((()=>{const t=new CustomEvent(mx,xT);s.addEventListener(mx,c),s.dispatchEvent(t),t.defaultPrevented||id(e??document.body,{select:!0}),s.removeEventListener(mx,c),ET.remove(p)}),0)}}}),[s,l,c,p]);const m=v.useCallback((e=>{if(!n&&!r||p.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){const t=e.currentTarget,[r,a]=YB(t);r&&a?e.shiftKey||o!==a?e.shiftKey&&o===r&&(e.preventDefault(),n&&id(a,{select:!0})):(e.preventDefault(),n&&id(r,{select:!0})):o===t&&e.preventDefault()}}),[n,r,p.paused]);return G.jsx(Il.div,{tabIndex:-1,...i,ref:f,onKeyDown:m})}));function KB(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(id(r,{select:t}),document.activeElement!==n)return}function YB(e){const t=uD(e);return[ST(t,e),ST(t.reverse(),e)]}function uD(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ST(e,t){for(const n of e)if(!QB(n,{upTo:t}))return n}function QB(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function XB(e){return e instanceof HTMLInputElement&&"select"in e}function id(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&XB(e)&&t&&e.select()}}sD.displayName=HB;var ET=JB();function JB(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=$T(e,t),e.unshift(t)},remove(t){var n;e=$T(e,t),null==(n=e[0])||n.resume()}}}function $T(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}function ZB(e){return e.filter((e=>"A"!==e.tagName))}var ej="Portal",lD=v.forwardRef(((e,t)=>{var n;const{container:r,...o}=e,[a,i]=v.useState(!1);Xg((()=>i(!0)),[]);const s=r||a&&(null==(n=null==globalThis?void 0:globalThis.document)?void 0:n.body);return s?eA.createPortal(G.jsx(Il.div,{...o,ref:t}),s):null}));function tj(e,t){return v.useReducer(((e,n)=>t[e][n]??e),e)}lD.displayName=ej;var By=e=>{const{present:t,children:n}=e,r=nj(t),o="function"==typeof n?n({present:r.isPresent}):v.Children.only(n),a=ep(r.ref,rj(o));return"function"==typeof n||r.isPresent?v.cloneElement(o,{ref:a}):null};function nj(e){const[t,n]=v.useState(),r=v.useRef({}),o=v.useRef(e),a=v.useRef("none"),i=e?"mounted":"unmounted",[s,u]=tj(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect((()=>{const e=Cg(r.current);a.current="mounted"===s?e:"none"}),[s]),Xg((()=>{const t=r.current,n=o.current;if(n!==e){const r=a.current,i=Cg(t);e?u("MOUNT"):"none"===i||"none"===(null==t?void 0:t.display)?u("UNMOUNT"):u(n&&r!==i?"ANIMATION_OUT":"UNMOUNT"),o.current=e}}),[e,u]),Xg((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,i=a=>{const i=Cg(r.current).includes(a.animationName);if(a.target===t&&i&&(u("ANIMATION_END"),!o.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout((()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)}))}},s=e=>{e.target===t&&(a.current=Cg(r.current))};return t.addEventListener("animationstart",s),t.addEventListener("animationcancel",i),t.addEventListener("animationend",i),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",s),t.removeEventListener("animationcancel",i),t.removeEventListener("animationend",i)}}u("ANIMATION_END")}),[t,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:v.useCallback((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}function Cg(e){return(null==e?void 0:e.animationName)||"none"}function rj(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?e.ref:(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}By.displayName="Presence";var hx=0;function oj(){v.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??CT()),document.body.insertAdjacentElement("beforeend",e[1]??CT()),hx++,()=>{1===hx&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),hx--}}),[])}function CT(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var cD=_A(),vx=function(){},jy=v.forwardRef((function(e,t){var n=v.useRef(null),r=v.useState({onScrollCapture:vx,onWheelCapture:vx,onTouchMoveCapture:vx}),o=r[0],a=r[1],i=e.forwardProps,s=e.children,u=e.className,l=e.removeScrollBar,c=e.enabled,d=e.shards,f=e.sideCar,p=e.noIsolation,m=e.inert,h=e.allowPinchZoom,g=e.as,y=void 0===g?"div":g,b=e.gapMode,w=$E(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),x=f,_=bA([n,t]),E=zo(zo({},w),o);return v.createElement(v.Fragment,null,c&&v.createElement(x,{sideCar:cD,removeScrollBar:l,shards:d,noIsolation:p,inert:m,setCallbacks:a,allowPinchZoom:!!h,lockRef:n,gapMode:b}),i?v.cloneElement(v.Children.only(s),zo(zo({},E),{ref:_})):v.createElement(y,zo({},E,{className:u,ref:_}),s))}));jy.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},jy.classNames={fullWidth:iv,zeroRight:ov};var jS=!1;if(typeof window<"u")try{var Ig=Object.defineProperty({},"passive",{get:function(){return jS=!0,!0}});window.addEventListener("test",Ig,Ig),window.removeEventListener("test",Ig,Ig)}catch{jS=!1}var _m=!!jS&&{passive:!1},ij=function(e){return"TEXTAREA"===e.tagName},dD=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!ij(e)&&"visible"===n[t])},aj=function(e){return dD(e,"overflowY")},sj=function(e){return dD(e,"overflowX")},IT=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host),fD(e,r)){var o=pD(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},uj=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},lj=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},fD=function(e,t){return"v"===e?aj(t):sj(t)},pD=function(e,t){return"v"===e?uj(t):lj(t)},cj=function(e,t){return"h"===e&&"rtl"===t?-1:1},dj=function(e,t,n,r,o){var a=cj(e,window.getComputedStyle(t).direction),i=a*r,s=n.target,u=t.contains(s),l=!1,c=i>0,d=0,f=0;do{var p=pD(e,s),m=p[0],v=p[1]-p[2]-a*m;(m||v)&&fD(e,s)&&(d+=v,f+=m),s=s instanceof ShadowRoot?s.host:s.parentNode}while(!u&&s!==document.body||u&&(t.contains(s)||t===s));return(c&&(Math.abs(d)<1||!o)||!c&&(Math.abs(f)<1||!o))&&(l=!0),l},Rg=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},RT=function(e){return[e.deltaX,e.deltaY]},PT=function(e){return e&&"current"in e?e.current:e},fj=function(e,t){return e[0]===t[0]&&e[1]===t[1]},pj=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},mj=0,xm=[];function hj(e){var t=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),o=v.useState(mj++)[0],a=v.useState(CE)[0],i=v.useRef(e);v.useEffect((function(){i.current=e}),[e]),v.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=wA([e.lockRef.current],(e.shards||[]).map(PT),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(o))})),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(o))}))}}}),[e.inert,e.lockRef.current,e.shards]);var s=v.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var o,a=Rg(e),s=n.current,u="deltaX"in e?e.deltaX:s[0]-a[0],l="deltaY"in e?e.deltaY:s[1]-a[1],c=e.target,d=Math.abs(u)>Math.abs(l)?"h":"v";if("touches"in e&&"h"===d&&"range"===c.type)return!1;var f=IT(d,c);if(!f)return!0;if(f?o=d:(o="v"===d?"h":"v",f=IT(d,c)),!f)return!1;if(!r.current&&"changedTouches"in e&&(u||l)&&(r.current=o),!o)return!0;var p=r.current||o;return dj(p,t,e,"h"===p?u:l,!0)}),[]),u=v.useCallback((function(e){var n=e;if(xm.length&&xm[xm.length-1]===a){var r="deltaY"in n?RT(n):Rg(n),o=t.current.filter((function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&fj(e.delta,r)}))[0];if(o&&o.should)return void(n.cancelable&&n.preventDefault());if(!o){var u=(i.current.shards||[]).map(PT).filter(Boolean).filter((function(e){return e.contains(n.target)}));(u.length>0?s(n,u[0]):!i.current.noIsolation)&&n.cancelable&&n.preventDefault()}}}),[]),l=v.useCallback((function(e,n,r,o){var a={name:e,delta:n,target:r,should:o,shadowParent:vj(r)};t.current.push(a),setTimeout((function(){t.current=t.current.filter((function(e){return e!==a}))}),1)}),[]),c=v.useCallback((function(e){n.current=Rg(e),r.current=void 0}),[]),d=v.useCallback((function(t){l(t.type,RT(t),t.target,s(t,e.lockRef.current))}),[]),f=v.useCallback((function(t){l(t.type,Rg(t),t.target,s(t,e.lockRef.current))}),[]);v.useEffect((function(){return xm.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",u,_m),document.addEventListener("touchmove",u,_m),document.addEventListener("touchstart",c,_m),function(){xm=xm.filter((function(e){return e!==a})),document.removeEventListener("wheel",u,_m),document.removeEventListener("touchmove",u,_m),document.removeEventListener("touchstart",c,_m)}}),[]);var p=e.removeScrollBar,m=e.inert;return v.createElement(v.Fragment,null,m?v.createElement(a,{styles:pj(o)}):null,p?v.createElement($A,{gapMode:e.gapMode}):null)}function vj(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const gj=SA(cD,hj);var mD=v.forwardRef((function(e,t){return v.createElement(jy,zo({},e,{ref:t,sideCar:gj}))}));mD.classNames=jy.classNames;var n$="Dialog",[hD,tZ]=CB(n$),[yj,_s]=hD(n$),vD=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!0}=e,s=v.useRef(null),u=v.useRef(null),[l=!1,c]=TB({prop:r,defaultProp:o,onChange:a});return G.jsx(yj,{scope:t,triggerRef:s,contentRef:u,contentId:fx(),titleId:fx(),descriptionId:fx(),open:l,onOpenChange:c,onOpenToggle:v.useCallback((()=>c((e=>!e))),[c]),modal:i,children:n})};vD.displayName=n$;var gD="DialogTrigger",yD=v.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=_s(gD,n),a=ep(t,o.triggerRef);return G.jsx(Il.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":i$(o.open),...r,ref:a,onClick:sd(e.onClick,o.onOpenToggle)})}));yD.displayName=gD;var r$="DialogPortal",[wj,wD]=hD(r$,{forceMount:void 0}),bD=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=_s(r$,t);return G.jsx(wj,{scope:t,forceMount:n,children:v.Children.map(r,(e=>G.jsx(By,{present:n||a.open,children:G.jsx(lD,{asChild:!0,container:o,children:e})})))})};bD.displayName=r$;var Jg="DialogOverlay",_D=v.forwardRef(((e,t)=>{const n=wD(Jg,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=_s(Jg,e.__scopeDialog);return a.modal?G.jsx(By,{present:r||a.open,children:G.jsx(_j,{...o,ref:t})}):null}));_D.displayName=Jg;var bj=rD("DialogOverlay.RemoveScroll"),_j=v.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=_s(Jg,n);return G.jsx(mD,{as:bj,allowPinchZoom:!0,shards:[o.contentRef],children:G.jsx(Il.div,{"data-state":i$(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})})),Qf="DialogContent",xD=v.forwardRef(((e,t)=>{const n=wD(Qf,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=_s(Qf,e.__scopeDialog);return G.jsx(By,{present:r||a.open,children:a.modal?G.jsx(xj,{...o,ref:t}):G.jsx(Sj,{...o,ref:t})})}));xD.displayName=Qf;var xj=v.forwardRef(((e,t)=>{const n=_s(Qf,e.__scopeDialog),r=v.useRef(null),o=ep(t,n.contentRef,r);return v.useEffect((()=>{const e=r.current;if(e)return Sy(e)}),[]),G.jsx(SD,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:sd(e.onCloseAutoFocus,(e=>{var t;e.preventDefault(),null==(t=n.triggerRef.current)||t.focus()})),onPointerDownOutside:sd(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()})),onFocusOutside:sd(e.onFocusOutside,(e=>e.preventDefault()))})})),Sj=v.forwardRef(((e,t)=>{const n=_s(Qf,e.__scopeDialog),r=v.useRef(!1),o=v.useRef(!1);return G.jsx(SD,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var a,i;null==(a=e.onCloseAutoFocus)||a.call(e,t),t.defaultPrevented||(r.current||null==(i=n.triggerRef.current)||i.focus(),t.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:t=>{var a,i;null==(a=e.onInteractOutside)||a.call(e,t),t.defaultPrevented||(r.current=!0,"pointerdown"===t.detail.originalEvent.type&&(o.current=!0));const s=t.target;(null==(i=n.triggerRef.current)?void 0:i.contains(s))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}})})),SD=v.forwardRef(((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...i}=e,s=_s(Qf,n),u=v.useRef(null),l=ep(t,u);return oj(),G.jsxs(G.Fragment,{children:[G.jsx(sD,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:G.jsx(iD,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":i$(s.open),...i,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),G.jsxs(G.Fragment,{children:[G.jsx(Ej,{titleId:s.titleId}),G.jsx(Cj,{contentRef:u,descriptionId:s.descriptionId})]})]})})),o$="DialogTitle",ED=v.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=_s(o$,n);return G.jsx(Il.h2,{id:o.titleId,...r,ref:t})}));ED.displayName=o$;var $D="DialogDescription",CD=v.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=_s($D,n);return G.jsx(Il.p,{id:o.descriptionId,...r,ref:t})}));CD.displayName=$D;var ID="DialogClose",RD=v.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=_s(ID,n);return G.jsx(Il.button,{type:"button",...r,ref:t,onClick:sd(e.onClick,(()=>o.onOpenChange(!1)))})}));function i$(e){return e?"open":"closed"}RD.displayName=ID;var PD="DialogTitleWarning",[nZ,TD]=$B(PD,{contentName:Qf,titleName:o$,docsSlug:"dialog"}),Ej=({titleId:e})=>{const t=TD(PD),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return v.useEffect((()=>{e&&(document.getElementById(e)||console.error(n))}),[n,e]),null},$j="DialogDescriptionWarning",Cj=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${TD($j).contentName}}.`;return v.useEffect((()=>{var r;const o=null==(r=e.current)?void 0:r.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(n))}),[n,e,t]),null},Ij=vD,Rj=yD,Pj=bD,Tj=_D,Oj=xD,Aj=ED,Mj=CD,Dj=RD;function Nj(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const OD=Ue.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),Vm=()=>{const e=Ue.useContext(OD);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};Nj("[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,100%,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,-100%,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(-100%,0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(100%,0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(\n[data-state=closed]\n){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,100%,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,100%,0)}}@keyframes slideFromTop{from{transform:translate3d(0,-100%,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,-100%,0)}}@keyframes slideFromLeft{from{transform:translate3d(-100%,0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(-100%,0,0)}}@keyframes slideFromRight{from{transform:translate3d(100%,0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(100%,0,0)}}");const kj=24,Lj=typeof window<"u"?v.useLayoutEffect:v.useEffect;function TT(...e){return(...t)=>{for(let n of e)"function"==typeof n&&n(...t)}}function Fj(){return a$(/^Mac/)}function Bj(){return a$(/^iPhone/)}function OT(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function jj(){return a$(/^iPad/)||Fj()&&navigator.maxTouchPoints>1}function AD(){return Bj()||jj()}function a$(e){return typeof window<"u"&&null!=window.navigator?e.test(window.navigator.platform):void 0}const gx=typeof document<"u"&&window.visualViewport;function AT(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function MD(e){for(AT(e)&&(e=e.parentElement);e&&!AT(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const zj=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let yx,Pg=0;function Vj(e={}){let{isDisabled:t}=e;Lj((()=>{if(!t)return Pg++,1===Pg&&AD()&&(yx=Uj()),()=>{Pg--,0===Pg&&(null==yx||yx())}}),[t])}function Uj(){let e,t=0,n=window.pageXOffset,r=window.pageYOffset,o=TT(Wj(document.documentElement,"paddingRight",window.innerWidth-document.documentElement.clientWidth+"px"));window.scrollTo(0,0);let a=TT(qh(document,"touchstart",(n=>{e=MD(n.target),(e!==document.documentElement||e!==document.body)&&(t=n.changedTouches[0].pageY)}),{passive:!1,capture:!0}),qh(document,"touchmove",(n=>{if(!e||e===document.documentElement||e===document.body)return void n.preventDefault();let r=n.changedTouches[0].pageY,o=e.scrollTop,a=e.scrollHeight-e.clientHeight;0!==a&&((o<=0&&r>t||o>=a&&r<t)&&n.preventDefault(),t=r)}),{passive:!1,capture:!0}),qh(document,"touchend",(e=>{let t=e.target;zS(t)&&t!==document.activeElement&&(e.preventDefault(),t.style.transform="translateY(-2000px)",t.focus(),requestAnimationFrame((()=>{t.style.transform=""})))}),{passive:!1,capture:!0}),qh(document,"focus",(e=>{let t=e.target;zS(t)&&(t.style.transform="translateY(-2000px)",requestAnimationFrame((()=>{t.style.transform="",gx&&(gx.height<window.innerHeight?requestAnimationFrame((()=>{MT(t)})):gx.addEventListener("resize",(()=>MT(t)),{once:!0}))})))}),!0),qh(window,"scroll",(()=>{window.scrollTo(0,0)})));return()=>{o(),a(),window.scrollTo(n,r)}}function Wj(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function qh(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function MT(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let t=MD(e);if(t!==document.documentElement&&t!==document.body&&t!==e){let n=t.getBoundingClientRect().top,r=e.getBoundingClientRect().top;e.getBoundingClientRect().bottom>t.getBoundingClientRect().bottom+24&&(t.scrollTop+=r-n)}e=t.parentElement}}function zS(e){return e instanceof HTMLInputElement&&!zj.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function qj(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function Gj(...e){return t=>e.forEach((e=>qj(e,t)))}function DD(...e){return v.useCallback(Gj(...e),e)}const ND=new WeakMap;function Ur(e,t,n=!1){if(!(e&&e instanceof HTMLElement))return;let r={};Object.entries(t).forEach((([t,n])=>{t.startsWith("--")?e.style.setProperty(t,n):(r[t]=e.style[t],e.style[t]=n)})),!n&&ND.set(e,r)}function Hj(e,t){if(!(e&&e instanceof HTMLElement))return;let n=ND.get(e);n&&(e.style[t]=n[t])}const Wr=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function Tg(e,t){if(!e)return null;const n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform;let o=r.match(/^matrix3d\((.+)\)$/);return o?parseFloat(o[1].split(", ")[Wr(t)?13:12]):(o=r.match(/^matrix\((.+)\)$/),o?parseFloat(o[1].split(", ")[Wr(t)?5:4]):null)}function Kj(e){return 8*(Math.log(e+1)-2)}function wx(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function Yj(...e){return(...t)=>{for(const n of e)"function"==typeof n&&n(...t)}}const zn={DURATION:.5,EASE:[.32,.72,0,1]},kD=.4,Qj=.25,Xj=100,LD=8,Af=16,VS=26,bx="vaul-dragging";function FD(e){const t=Ue.useRef(e);return Ue.useEffect((()=>{t.current=e})),Ue.useMemo((()=>(...e)=>null==t.current?void 0:t.current.call(t,...e)),[])}function Jj({defaultProp:e,onChange:t}){const n=Ue.useState(e),[r]=n,o=Ue.useRef(r),a=FD(t);return Ue.useEffect((()=>{o.current!==r&&(a(r),o.current=r)}),[r,o,a]),n}function BD({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=Jj({defaultProp:t,onChange:n}),a=void 0!==e,i=a?e:r,s=FD(n);return[i,Ue.useCallback((t=>{if(a){const n="function"==typeof t?t(e):t;n!==e&&s(n)}else o(t)}),[a,e,o,s])]}function Zj({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:o,fadeFromIndex:a,onSnapPointChange:i,direction:s="bottom",container:u,snapToSequentialPoint:l}){const[c,d]=BD({prop:e,defaultProp:null==n?void 0:n[0],onChange:t}),[f,p]=Ue.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);Ue.useEffect((()=>{function e(){p({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]);const m=Ue.useMemo((()=>c===(null==n?void 0:n[n.length-1])||null),[n,c]),v=Ue.useMemo((()=>null==n?void 0:n.findIndex((e=>e===c))),[n,c]),h=n&&n.length>0&&(a||0===a)&&!Number.isNaN(a)&&n[a]===c||!n,g=Ue.useMemo((()=>{const e=u?{width:u.getBoundingClientRect().width,height:u.getBoundingClientRect().height}:typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var t;return null!=(t=null==n?void 0:n.map((t=>{const n="string"==typeof t;let r=0;if(n&&(r=parseInt(t,10)),Wr(s)){const o=n?r:f?t*e.height:0;return f?"bottom"===s?e.height-o:-e.height+o:o}const o=n?r:f?t*e.width:0;return f?"right"===s?e.width-o:-e.width+o:o})))?t:[]}),[n,f,u]),y=Ue.useMemo((()=>null!==v?null==g?void 0:g[v]:null),[g,v]),b=Ue.useCallback((e=>{var t;const u=null!=(t=null==g?void 0:g.findIndex((t=>t===e)))?t:null;i(u),Ur(r.current,{transition:`transform ${zn.DURATION}s cubic-bezier(${zn.EASE.join(",")})`,transform:Wr(s)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`}),g&&u!==g.length-1&&u!==a&&u<a?Ur(o.current,{transition:`opacity ${zn.DURATION}s cubic-bezier(${zn.EASE.join(",")})`,opacity:"0"}):Ur(o.current,{transition:`opacity ${zn.DURATION}s cubic-bezier(${zn.EASE.join(",")})`,opacity:"1"}),d(null==n?void 0:n[Math.max(u,0)])}),[r.current,n,g,a,o,d]);return Ue.useEffect((()=>{if(c||e){var t;const r=null!=(t=null==n?void 0:n.findIndex((t=>t===e||t===c)))?t:-1;g&&-1!==r&&"number"==typeof g[r]&&b(g[r])}}),[c,e,n,g,b]),{isLastSnapPoint:m,activeSnapPoint:c,shouldFade:h,getPercentageDragged:function(e,t){if(!n||"number"!=typeof v||!g||void 0===a)return null;const r=v===a-1;if(v>=a&&t)return 0;if(r&&!t)return 1;if(!h&&!r)return null;const o=r?v+1:v-1,i=r?g[o]-g[o-1]:g[o+1]-g[o],s=e/Math.abs(i);return r?1-s:s},setActiveSnapPoint:d,activeSnapPointIndex:v,onRelease:function({draggedDistance:e,closeDrawer:t,velocity:r,dismissible:i}){if(void 0===a)return;const u="bottom"===s||"right"===s?(y??0)-e:(y??0)+e,c=0===v,d=e>0;if(v===a-1&&Ur(o.current,{transition:`opacity ${zn.DURATION}s cubic-bezier(${zn.EASE.join(",")})`}),!l&&r>2&&!d)return void(i?t():b(g[0]));if(!l&&r>2&&d&&g&&n)return void b(g[n.length-1]);const f=null==g?void 0:g.reduce(((e,t)=>"number"!=typeof e||"number"!=typeof t?e:Math.abs(t-u)<Math.abs(e-u)?t:e)),p=Wr(s)?window.innerHeight:window.innerWidth;if(r>kD&&Math.abs(e)<.4*p){const e=d?1:-1;if(e>0&&m)return void b(g[n.length-1]);if(c&&e<0&&i&&t(),null===v)return;b(g[v+e])}else b(f)},onDrag:function({draggedDistance:e}){if(null===y)return;const t="bottom"===s||"right"===s?y-e:y+e;("bottom"===s||"right"===s)&&t<g[g.length-1]||("top"===s||"left"===s)&&t>g[g.length-1]||Ur(r.current,{transform:Wr(s)?`translate3d(0, ${t}px, 0)`:`translate3d(${t}px, 0, 0)`})},snapPointsOffset:g}}const ez=()=>()=>{};function tz(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:o}=Vm(),a=Ue.useRef(null),i=v.useMemo((()=>document.body.style.backgroundColor),[]);function s(){return(window.innerWidth-26)/window.innerWidth}Ue.useEffect((()=>{if(t&&n){a.current&&clearTimeout(a.current);const t=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!t)return;Yj(r&&!o?wx(document.body,{background:"black"}):ez,wx(t,{transformOrigin:Wr(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${zn.DURATION}s`,transitionTimingFunction:`cubic-bezier(${zn.EASE.join(",")})`}));const n=wx(t,{borderRadius:"8px",overflow:"hidden",...Wr(e)?{transform:`scale(${s()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${s()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{n(),a.current=window.setTimeout((()=>{i?document.body.style.background=i:document.body.style.removeProperty("background")}),1e3*zn.DURATION)}}}),[t,n,i])}let Gh=null;function nz({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:o,noBodyStyles:a}){const[i,s]=Ue.useState((()=>typeof window<"u"?window.location.href:"")),u=Ue.useRef(0),l=Ue.useCallback((()=>{if(OT()&&null===Gh&&e&&!a){Gh={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:e,innerHeight:t}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:-u.current+"px",left:-e+"px",right:"0px",height:"auto"}),window.setTimeout((()=>window.requestAnimationFrame((()=>{const e=t-window.innerHeight;e&&u.current>=t&&(document.body.style.top=-(u.current+e)+"px")}))),300)}}),[e]),c=Ue.useCallback((()=>{if(OT()&&null!==Gh&&!a){const e=-parseInt(document.body.style.top,10),t=-parseInt(document.body.style.left,10);Object.assign(document.body.style,Gh),window.requestAnimationFrame((()=>{o&&i!==window.location.href?s(window.location.href):window.scrollTo(t,e)})),Gh=null}}),[i]);return Ue.useEffect((()=>{function e(){u.current=window.scrollY}return e(),window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}}),[]),Ue.useEffect((()=>{n||!r||(e?(!window.matchMedia("(display-mode: standalone)").matches&&l(),t||window.setTimeout((()=>{c()}),500)):c())}),[e,r,i,t,n,l,c]),{restorePositionSetting:c}}function jD({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:o,snapPoints:a,shouldScaleBackground:i=!1,setBackgroundColorOnScale:s=!0,closeThreshold:u=Qj,scrollLockTimeout:l=Xj,dismissible:c=!0,handleOnly:d=!1,fadeFromIndex:f=a&&a.length-1,activeSnapPoint:p,setActiveSnapPoint:m,fixed:v,modal:h=!0,onClose:g,nested:y,noBodyStyles:b,direction:w="bottom",defaultOpen:x=!1,disablePreventScroll:_=!0,snapToSequentialPoint:E=!1,preventScrollRestoration:S=!1,repositionInputs:I=!0,onAnimationEnd:A,container:k,autoFocus:C=!1}){var P,R;const[O=!1,T]=BD({defaultProp:x,prop:e,onChange:e=>{null==t||t(e),!e&&!y&&ue(),setTimeout((()=>{null==A||A(e)}),1e3*zn.DURATION),e&&!h&&typeof window<"u"&&window.requestAnimationFrame((()=>{document.body.style.pointerEvents="auto"})),e||(document.body.style.pointerEvents="auto")}}),[N,M]=Ue.useState(!1),[j,D]=Ue.useState(!1),[q,z]=Ue.useState(!1),L=Ue.useRef(null),$=Ue.useRef(null),V=Ue.useRef(null),B=Ue.useRef(null),F=Ue.useRef(null),U=Ue.useRef(!1),G=Ue.useRef(null),W=Ue.useRef(0),H=Ue.useRef(!1),Q=Ue.useRef(0),K=Ue.useRef(null),Y=Ue.useRef((null==(P=K.current)?void 0:P.getBoundingClientRect().height)||0),J=Ue.useRef((null==(R=K.current)?void 0:R.getBoundingClientRect().width)||0),X=Ue.useRef(0),Z=Ue.useCallback((e=>{a&&e===oe.length-1&&($.current=new Date)}),[]),{activeSnapPoint:ee,activeSnapPointIndex:te,setActiveSnapPoint:ne,onRelease:re,snapPointsOffset:oe,onDrag:ae,shouldFade:ie,getPercentageDragged:se}=Zj({snapPoints:a,activeSnapPointProp:p,setActiveSnapPointProp:m,drawerRef:K,fadeFromIndex:f,overlayRef:L,onSnapPointChange:Z,direction:w,container:k,snapToSequentialPoint:E});Vj({isDisabled:!O||j||!h||q||!N||!I||!_});const{restorePositionSetting:ue}=nz({isOpen:O,modal:h,nested:y,hasBeenOpened:N,preventScrollRestoration:S,noBodyStyles:b});function le(){return(window.innerWidth-26)/window.innerWidth}function ce(e,t){var n,r;let o=e;const a=null==(n=window.getSelection())?void 0:n.toString(),i=K.current?Tg(K.current,w):null,s=new Date;if(o.hasAttribute("data-vaul-no-drag")||o.closest("[data-vaul-no-drag]"))return!1;if("right"===w||"left"===w)return!0;if($.current&&s.getTime()-$.current.getTime()<500)return!1;if(null!==i&&("bottom"===w?i>0:i<0))return!0;if(a&&a.length>0)return!1;if(s.getTime()-(null==(r=F.current)?void 0:r.getTime())<l&&0===i||t)return F.current=s,!1;for(;o;){if(o.scrollHeight>o.clientHeight){if(0!==o.scrollTop)return F.current=new Date,!1;if("dialog"===o.getAttribute("role"))return!0}o=o.parentNode}return!0}function de(e){!j||!K.current||(K.current.classList.remove(bx),U.current=!1,D(!1),B.current=new Date),null==g||g(),e||T(!1),setTimeout((()=>{a&&ne(a[0])}),1e3*zn.DURATION)}function fe(){if(!K.current)return;const e=document.querySelector("[data-vaul-drawer-wrapper]"),t=Tg(K.current,w);Ur(K.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${zn.DURATION}s cubic-bezier(${zn.EASE.join(",")})`}),Ur(L.current,{transition:`opacity ${zn.DURATION}s cubic-bezier(${zn.EASE.join(",")})`,opacity:"1"}),i&&t&&t>0&&O&&Ur(e,{borderRadius:"8px",overflow:"hidden",...Wr(w)?{transform:`scale(${le()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${le()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${zn.DURATION}s`,transitionTimingFunction:`cubic-bezier(${zn.EASE.join(",")})`},!0)}return Ue.useEffect((()=>{var e;function t(){if(!K.current||!I)return;if(zS(document.activeElement)||H.current){var e;const t=(null==(e=window.visualViewport)?void 0:e.height)||0,n=window.innerHeight;let r=n-t;const o=K.current.getBoundingClientRect().height||0,i=o>.8*n;X.current||(X.current=o);const s=K.current.getBoundingClientRect().top;if(Math.abs(Q.current-r)>60&&(H.current=!H.current),a&&a.length>0&&oe&&te){r+=oe[te]||0}if(Q.current=r,o>t||H.current){const e=K.current.getBoundingClientRect().height;let n=e;e>t&&(n=t-(i?s:26)),K.current.style.height=v?e-Math.max(r,0)+"px":`${Math.max(n,t-s)}px`}else K.current.style.height=`${X.current}px`;a&&a.length>0&&!H.current?K.current.style.bottom="0px":K.current.style.bottom=`${Math.max(r,0)}px`}}return null==(e=window.visualViewport)||e.addEventListener("resize",t),()=>{var e;return null==(e=window.visualViewport)?void 0:e.removeEventListener("resize",t)}}),[te,a,oe]),Ue.useEffect((()=>(O&&(Ur(document.documentElement,{scrollBehavior:"auto"}),$.current=new Date),()=>{Hj(document.documentElement,"scrollBehavior")})),[O]),Ue.createElement(Ij,{defaultOpen:x,onOpenChange:e=>{!c&&!e||(e?M(!0):de(!0),T(e))},open:O},Ue.createElement(OD.Provider,{value:{activeSnapPoint:ee,snapPoints:a,setActiveSnapPoint:ne,drawerRef:K,overlayRef:L,onOpenChange:t,onPress:function(e){var t,n;!c&&!a||K.current&&!K.current.contains(e.target)||(Y.current=(null==(t=K.current)?void 0:t.getBoundingClientRect().height)||0,J.current=(null==(n=K.current)?void 0:n.getBoundingClientRect().width)||0,D(!0),V.current=new Date,AD()&&window.addEventListener("touchend",(()=>U.current=!1),{once:!0}),e.target.setPointerCapture(e.pointerId),W.current=Wr(w)?e.pageY:e.pageX)},onRelease:function(e){if(!j||!K.current)return;K.current.classList.remove(bx),U.current=!1,D(!1),B.current=new Date;const t=Tg(K.current,w);if(!ce(e.target,!1)||!t||Number.isNaN(t)||null===V.current)return;const n=B.current.getTime()-V.current.getTime(),r=W.current-(Wr(w)?e.pageY:e.pageX),i=Math.abs(r)/n;if(i>.05&&(z(!0),setTimeout((()=>{z(!1)}),200)),a)return re({draggedDistance:r*("bottom"===w||"right"===w?1:-1),closeDrawer:de,velocity:i,dismissible:c}),void(null==o||o(e,!0));if("bottom"===w||"right"===w?r>0:r<0)return fe(),void(null==o||o(e,!0));if(i>kD)return de(),void(null==o||o(e,!1));var s;const l=Math.min(null!=(s=K.current.getBoundingClientRect().height)?s:0,window.innerHeight);var d;const f=Math.min(null!=(d=K.current.getBoundingClientRect().width)?d:0,window.innerWidth),p="left"===w||"right"===w;if(Math.abs(t)>=(p?f:l)*u)return de(),void(null==o||o(e,!1));null==o||o(e,!0),fe()},onDrag:function(e){if(K.current&&j){const t="bottom"===w||"right"===w?1:-1,n=(W.current-(Wr(w)?e.pageY:e.pageX))*t,o=n>0,s=a&&!c&&!o;if(s&&0===te)return;const u=Math.abs(n),l=document.querySelector("[data-vaul-drawer-wrapper]");let d=u/("bottom"===w||"top"===w?Y.current:J.current);const p=se(u,o);if(null!==p&&(d=p),s&&d>=1||!U.current&&!ce(e.target,o))return;if(K.current.classList.add(bx),U.current=!0,Ur(K.current,{transition:"none"}),Ur(L.current,{transition:"none"}),a&&ae({draggedDistance:n}),o&&!a){const e=Kj(n),r=Math.min(-1*e,0)*t;return void Ur(K.current,{transform:Wr(w)?`translate3d(0, ${r}px, 0)`:`translate3d(${r}px, 0, 0)`})}const m=1-d;if((ie||f&&te===f-1)&&(null==r||r(e,d),Ur(L.current,{opacity:`${m}`,transition:"none"},!0)),l&&L.current&&i){const e=Math.min(le()+d*(1-le()),1),t=8-8*d,n=Math.max(0,14-14*d);Ur(l,{borderRadius:`${t}px`,transform:Wr(w)?`scale(${e}) translate3d(0, ${n}px, 0)`:`scale(${e}) translate3d(${n}px, 0, 0)`,transition:"none"},!0)}if(!a){const e=u*t;Ur(K.current,{transform:Wr(w)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}}},dismissible:c,handleOnly:d,isOpen:O,isDragging:j,shouldFade:ie,closeDrawer:de,onNestedDrag:function(e,t){if(t<0)return;const n=(window.innerWidth-16)/window.innerWidth,r=n+t*(1-n),o=16*t-16;Ur(K.current,{transform:Wr(w)?`scale(${r}) translate3d(0, ${o}px, 0)`:`scale(${r}) translate3d(${o}px, 0, 0)`,transition:"none"})},onNestedOpenChange:function(e){const t=e?(window.innerWidth-16)/window.innerWidth:1,n=e?-16:0;G.current&&window.clearTimeout(G.current),Ur(K.current,{transition:`transform ${zn.DURATION}s cubic-bezier(${zn.EASE.join(",")})`,transform:`scale(${t}) translate3d(0, ${n}px, 0)`}),!e&&K.current&&(G.current=setTimeout((()=>{const e=Tg(K.current,w);Ur(K.current,{transition:"none",transform:Wr(w)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}),500))},onNestedRelease:function(e,t){const n=Wr(w)?window.innerHeight:window.innerWidth,r=t?(n-16)/n:1,o=t?-16:0;t&&Ur(K.current,{transition:`transform ${zn.DURATION}s cubic-bezier(${zn.EASE.join(",")})`,transform:Wr(w)?`scale(${r}) translate3d(0, ${o}px, 0)`:`scale(${r}) translate3d(${o}px, 0, 0)`})},keyboardIsOpen:H,modal:h,snapPointsOffset:oe,direction:w,shouldScaleBackground:i,setBackgroundColorOnScale:s,noBodyStyles:b,container:k,autoFocus:C}},n))}const zD=Ue.forwardRef((function({...e},t){const{overlayRef:n,snapPoints:r,onRelease:o,shouldFade:a,isOpen:i,modal:s}=Vm(),u=DD(t,n),l=r&&r.length>0;return s?Ue.createElement(Tj,{onMouseUp:o,ref:u,"data-vaul-overlay":"","data-vaul-snap-points":i&&l?"true":"false","data-vaul-snap-points-overlay":i&&a?"true":"false",...e}):(typeof window<"u"&&window.requestAnimationFrame((()=>{document.body.style.pointerEvents="auto"})),null)}));zD.displayName="Drawer.Overlay";const VD=Ue.forwardRef((function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},o){const{drawerRef:a,onPress:i,onRelease:s,onDrag:u,keyboardIsOpen:l,snapPointsOffset:c,modal:d,isOpen:f,direction:p,snapPoints:m,container:v,handleOnly:h,autoFocus:g}=Vm(),[y,b]=Ue.useState(!1),w=DD(o,a),x=Ue.useRef(null),_=Ue.useRef(null),E=Ue.useRef(!1),S=m&&m.length>0;tz();function I(e){x.current=null,E.current=!1,s(e)}return Ue.useEffect((()=>{S&&window.requestAnimationFrame((()=>{b(!0)}))}),[]),Ue.createElement(Oj,{"data-vaul-drawer-direction":p,"data-vaul-drawer":"","data-vaul-delayed-snap-points":y?"true":"false","data-vaul-snap-points":f&&S?"true":"false","data-vaul-custom-container":v?"true":"false",...r,ref:w,style:c&&c.length>0?{"--snap-point-height":`${c[0]}px`,...t}:t,onPointerDown:e=>{h||(null==r.onPointerDown||r.onPointerDown.call(r,e),x.current={x:e.pageX,y:e.pageY},i(e))},onOpenAutoFocus:e=>{null==n||n(e),g||e.preventDefault()},onPointerDownOutside:t=>{null==e||e(t),d&&!t.defaultPrevented?l.current&&(l.current=!1):t.preventDefault()},onFocusOutside:e=>{d||e.preventDefault()},onPointerMove:e=>{if(_.current=e,h||(null==r.onPointerMove||r.onPointerMove.call(r,e),!x.current))return;const t=e.pageY-x.current.y,n=e.pageX-x.current.x,o="touch"===e.pointerType?10:2;((e,t,n=0)=>{if(E.current)return!0;const r=Math.abs(e.y),o=Math.abs(e.x),a=o>r,i=["bottom","right"].includes(t)?1:-1;if("left"===t||"right"===t){if(!(e.x*i<0)&&o>=0&&o<=n)return a}else if(!(e.y*i<0)&&r>=0&&r<=n)return!a;return E.current=!0,!0})({x:n,y:t},p,o)?u(e):(Math.abs(n)>o||Math.abs(t)>o)&&(x.current=null)},onPointerUp:e=>{null==r.onPointerUp||r.onPointerUp.call(r,e),x.current=null,E.current=!1,s(e)},onPointerOut:e=>{null==r.onPointerOut||r.onPointerOut.call(r,e),I(_.current)},onContextMenu:e=>{null==r.onContextMenu||r.onContextMenu.call(r,e),I(_.current)}})}));VD.displayName="Drawer.Content";const rz=250,oz=120,UD=Ue.forwardRef((function({preventCycle:e=!1,children:t,...n},r){const{closeDrawer:o,isDragging:a,snapPoints:i,activeSnapPoint:s,setActiveSnapPoint:u,dismissible:l,handleOnly:c,isOpen:d,onPress:f,onDrag:p}=Vm(),m=Ue.useRef(null),v=Ue.useRef(!1);function h(){window.clearTimeout(m.current),v.current=!1}return Ue.createElement("div",{onClick:function(){v.current?h():window.setTimeout((()=>{!function(){if(a||e||v.current)return void h();if(h(),(!i||0===i.length)&&l)return void o();if(s===i[i.length-1]&&l)return void o();const t=i.findIndex((e=>e===s));if(-1===t)return;const n=i[t+1];u(n)}()}),oz)},onPointerCancel:h,onPointerDown:e=>{c&&f(e),m.current=window.setTimeout((()=>{v.current=!0}),rz)},onPointerMove:e=>{c&&p(e)},ref:r,"data-vaul-drawer-visible":d?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},Ue.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))}));function iz({onDrag:e,onOpenChange:t,...n}){const{onNestedDrag:r,onNestedOpenChange:o,onNestedRelease:a}=Vm();if(!r)throw new Error("Drawer.NestedRoot must be placed in another drawer");return Ue.createElement(jD,{nested:!0,onClose:()=>{o(!1)},onDrag:(t,n)=>{r(t,n),null==e||e(t,n)},onOpenChange:e=>{e&&o(e)},onRelease:a,...n})}function az(e){const t=Vm(),{container:n=t.container,...r}=e;return Ue.createElement(Pj,{container:n,...r})}UD.displayName="Drawer.Handle";const wd={Root:jD,NestedRoot:iz,Content:VD,Overlay:zD,Trigger:Rj,Portal:az,Handle:UD,Close:Dj,Title:Aj,Description:Mj},sz=wd.Portal,WD=v.forwardRef((({className:e,...t},n)=>G.jsx(wd.Overlay,{ref:n,className:_e("fixed inset-0 z-50 bg-black/5",e),...t})));WD.displayName=wd.Overlay.displayName;const uz=v.forwardRef((({className:e,children:t,direction:n="bottom",...r},o)=>G.jsxs(sz,{children:[G.jsx(WD,{}),G.jsxs(wd.Content,{ref:o,className:_e("fixed z-50 border bg-background shadow-lg","bottom"===n&&"inset-x-0 bottom-0 mt-24 flex h-auto flex-col rounded-t-sm","top"===n&&"inset-x-0 top-0 mb-24 flex h-auto flex-col rounded-b-sm","left"===n&&"inset-y-0 left-0 flex h-full flex-col","right"===n&&"inset-y-0 right-0 flex h-full w-[346px] flex-col sm:w-[435px]",e),...r,children:["bottom"===n&&G.jsx("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),t]})]})));uz.displayName="DrawerContent";const lz=v.forwardRef((({className:e,...t},n)=>G.jsx(wd.Title,{ref:n,className:_e("text-lg font-semibold leading-none tracking-tight",e),...t})));lz.displayName=wd.Title.displayName;const cz=v.forwardRef((({className:e,...t},n)=>G.jsx(wd.Description,{ref:n,className:_e("text-sm text-muted-foreground",e),...t})));function s$(e){const t=e+"CollectionProvider",[n,r]=ni(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=e+"CollectionSlot",s=e+"CollectionItemSlot",u="data-radix-collection-item";return[{Provider:e=>{const{scope:t,children:n}=e,r=Ue.useRef(null),a=Ue.useRef(new Map).current;return Ue.createElement(o,{scope:t,itemMap:a,collectionRef:r},n)},Slot:Ue.forwardRef(((e,t)=>{const{scope:n,children:r}=e,o=Vt(t,a(i,n).collectionRef);return Ue.createElement(qf,{ref:o},r)})),ItemSlot:Ue.forwardRef(((e,t)=>{const{scope:n,children:r,...o}=e,i=Ue.useRef(null),l=Vt(t,i),c=a(s,n);return Ue.useEffect((()=>(c.itemMap.set(i,{ref:i,...o}),()=>{c.itemMap.delete(i)}))),Ue.createElement(qf,{[u]:"",ref:l},r)}))},function(t){const n=a(e+"CollectionConsumer",t);return Ue.useCallback((()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${u}]`));return Array.from(n.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)))}),[n.collectionRef,n.itemMap])},r]}cz.displayName=wd.Description.displayName;const dz=v.createContext(void 0);function u$(e){const t=v.useContext(dz);return e||t||"ltr"}const fz=["top","right","bottom","left"],pd=Math.min,Xi=Math.max,Zg=Math.round,Og=Math.floor,md=e=>({x:e,y:e}),pz={left:"right",right:"left",bottom:"top",top:"bottom"},mz={start:"end",end:"start"};function US(e,t,n){return Xi(e,pd(t,n))}function Sl(e,t){return"function"==typeof e?e(t):e}function El(e){return e.split("-")[0]}function Um(e){return e.split("-")[1]}function l$(e){return"x"===e?"y":"x"}function c$(e){return"y"===e?"height":"width"}function hd(e){return["top","bottom"].includes(El(e))?"y":"x"}function d$(e){return l$(hd(e))}function hz(e,t,n){void 0===n&&(n=!1);const r=Um(e),o=d$(e),a=c$(o);let i="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=ey(i)),[i,ey(i)]}function vz(e){const t=ey(e);return[WS(e),t,WS(t)]}function WS(e){return e.replace(/start|end/g,(e=>mz[e]))}function gz(e,t,n){const r=["left","right"],o=["right","left"],a=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?a:i;default:return[]}}function yz(e,t,n,r){const o=Um(e);let a=gz(El(e),"start"===n,r);return o&&(a=a.map((e=>e+"-"+o)),t&&(a=a.concat(a.map(WS)))),a}function ey(e){return e.replace(/left|right|bottom|top/g,(e=>pz[e]))}function wz(e){return{top:0,right:0,bottom:0,left:0,...e}}function qD(e){return"number"!=typeof e?wz(e):{top:e,right:e,bottom:e,left:e}}function ty(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function DT(e,t,n){let{reference:r,floating:o}=e;const a=hd(t),i=d$(t),s=c$(i),u=El(t),l="y"===a,c=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[s]/2-o[s]/2;let p;switch(u){case"top":p={x:c,y:r.y-o.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Um(t)){case"start":p[i]-=f*(n&&l?-1:1);break;case"end":p[i]+=f*(n&&l?-1:1)}return p}const bz=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:i}=n,s=a.filter(Boolean),u=await(null==i.isRTL?void 0:i.isRTL(t));let l=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:d}=DT(l,r,u),f=r,p={},m=0;for(let n=0;n<s.length;n++){const{name:a,fn:v}=s[n],{x:h,y:g,data:y,reset:b}=await v({x:c,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:l,platform:i,elements:{reference:e,floating:t}});c=h??c,d=g??d,p={...p,[a]:{...p[a],...y}},b&&m<=50&&(m++,"object"==typeof b&&(b.placement&&(f=b.placement),b.rects&&(l=!0===b.rects?await i.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:c,y:d}=DT(l,f,u))),n=-1)}return{x:c,y:d,placement:f,strategy:o,middlewareData:p}};async function yv(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:a,rects:i,elements:s,strategy:u}=e,{boundary:l="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Sl(t,e),m=qD(p),v=s[f?"floating"===d?"reference":"floating":d],h=ty(await a.getClippingRect({element:null==(n=await(null==a.isElement?void 0:a.isElement(v)))||n?v:v.contextElement||await(null==a.getDocumentElement?void 0:a.getDocumentElement(s.floating)),boundary:l,rootBoundary:c,strategy:u})),g="floating"===d?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,y=await(null==a.getOffsetParent?void 0:a.getOffsetParent(s.floating)),b=await(null==a.isElement?void 0:a.isElement(y))&&await(null==a.getScale?void 0:a.getScale(y))||{x:1,y:1},w=ty(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:g,offsetParent:y,strategy:u}):g);return{top:(h.top-w.top+m.top)/b.y,bottom:(w.bottom-h.bottom+m.bottom)/b.y,left:(h.left-w.left+m.left)/b.x,right:(w.right-h.right+m.right)/b.x}}const _z=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:i,elements:s,middlewareData:u}=t,{element:l,padding:c=0}=Sl(e,t)||{};if(null==l)return{};const d=qD(c),f={x:n,y:r},p=d$(o),m=c$(p),v=await i.getDimensions(l),h="y"===p,g=h?"top":"left",y=h?"bottom":"right",b=h?"clientHeight":"clientWidth",w=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],_=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l));let E=_?_[b]:0;(!E||!await(null==i.isElement?void 0:i.isElement(_)))&&(E=s.floating[b]||a.floating[m]);const S=w/2-x/2,I=E/2-v[m]/2-1,A=pd(d[g],I),k=pd(d[y],I),C=A,P=E-v[m]-k,R=E/2-v[m]/2+S,O=US(C,R,P),T=!u.arrow&&null!=Um(o)&&R!==O&&a.reference[m]/2-(R<C?A:k)-v[m]/2<0,N=T?R<C?R-C:R-P:0;return{[p]:f[p]+N,data:{[p]:O,centerOffset:R-O-N,...T&&{alignmentOffset:N}},reset:T}}}),xz=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:i,initialPlacement:s,platform:u,elements:l}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:v=!0,...h}=Sl(e,t);if(null!=(n=a.arrow)&&n.alignmentOffset)return{};const g=El(o),y=hd(s),b=El(s)===s,w=await(null==u.isRTL?void 0:u.isRTL(l.floating)),x=f||(b||!v?[ey(s)]:vz(s)),_="none"!==m;!f&&_&&x.push(...yz(s,v,m,w));const E=[s,...x],S=await yv(t,h),I=[];let A=(null==(r=a.flip)?void 0:r.overflows)||[];if(c&&I.push(S[g]),d){const e=hz(o,i,w);I.push(S[e[0]],S[e[1]])}if(A=[...A,{placement:o,overflows:I}],!I.every((e=>e<=0))){var k,C;const e=((null==(k=a.flip)?void 0:k.index)||0)+1,t=E[e];if(t)return{data:{index:e,overflows:A},reset:{placement:t}};let n=null==(C=A.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:C.placement;if(!n)switch(p){case"bestFit":{var P;const e=null==(P=A.filter((e=>{if(_){const t=hd(e.placement);return t===y||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:P[0];e&&(n=e);break}case"initialPlacement":n=s}if(o!==n)return{reset:{placement:n}}}return{}}}};function NT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function kT(e){return fz.some((t=>e[t]>=0))}const Sz=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Sl(e,t);switch(r){case"referenceHidden":{const e=NT(await yv(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:kT(e)}}}case"escaped":{const e=NT(await yv(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:kT(e)}}}default:return{}}}}};async function Ez(e,t){const{placement:n,platform:r,elements:o}=e,a=await(null==r.isRTL?void 0:r.isRTL(o.floating)),i=El(n),s=Um(n),u="y"===hd(n),l=["left","top"].includes(i)?-1:1,c=a&&u?-1:1,d=Sl(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof m&&(p="end"===s?-1*m:m),u?{x:p*c,y:f*l}:{x:f*l,y:p*c}}const $z=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:i,middlewareData:s}=t,u=await Ez(t,e);return i===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:o+u.x,y:a+u.y,data:{...u,placement:i}}}}},Cz=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...u}=Sl(e,t),l={x:n,y:r},c=await yv(t,u),d=hd(El(o)),f=l$(d);let p=l[f],m=l[d];if(a){const e="y"===f?"bottom":"right";p=US(p+c["y"===f?"top":"left"],p,p-c[e])}if(i){const e="y"===d?"bottom":"right";m=US(m+c["y"===d?"top":"left"],m,m-c[e])}const v=s.fn({...t,[f]:p,[d]:m});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[f]:a,[d]:i}}}}}},Iz=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:i}=t,{offset:s=0,mainAxis:u=!0,crossAxis:l=!0}=Sl(e,t),c={x:n,y:r},d=hd(o),f=l$(d);let p=c[f],m=c[d];const v=Sl(s,t),h="number"==typeof v?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(u){const e="y"===f?"height":"width",t=a.reference[f]-a.floating[e]+h.mainAxis,n=a.reference[f]+a.reference[e]-h.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){var g,y;const e="y"===f?"width":"height",t=["top","left"].includes(El(o)),n=a.reference[d]-a.floating[e]+(t&&(null==(g=i.offset)?void 0:g[d])||0)+(t?0:h.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:(null==(y=i.offset)?void 0:y[d])||0)-(t?h.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Rz=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:i,elements:s}=t,{apply:u=()=>{},...l}=Sl(e,t),c=await yv(t,l),d=El(o),f=Um(o),p="y"===hd(o),{width:m,height:v}=a.floating;let h,g;"top"===d||"bottom"===d?(h=d,g=f===(await(null==i.isRTL?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(g=d,h="end"===f?"top":"bottom");const y=v-c.top-c.bottom,b=m-c.left-c.right,w=pd(v-c[h],y),x=pd(m-c[g],b),_=!t.middlewareData.shift;let E=w,S=x;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(S=b),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(E=y),_&&!f){const e=Xi(c.left,0),t=Xi(c.right,0),n=Xi(c.top,0),r=Xi(c.bottom,0);p?S=m-2*(0!==e||0!==t?e+t:Xi(c.left,c.right)):E=v-2*(0!==n||0!==r?n+r:Xi(c.top,c.bottom))}await u({...t,availableWidth:S,availableHeight:E});const I=await i.getDimensions(s.floating);return m!==I.width||v!==I.height?{reset:{rects:!0}}:{}}}};function zy(){return typeof window<"u"}function vd(e){return GD(e)?(e.nodeName||"").toLowerCase():"#document"}function Ji(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Rl(e){var t;return null==(t=(GD(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function GD(e){return!!zy()&&(e instanceof Node||e instanceof Ji(e).Node)}function pu(e){return!!zy()&&(e instanceof Element||e instanceof Ji(e).Element)}function mu(e){return!!zy()&&(e instanceof HTMLElement||e instanceof Ji(e).HTMLElement)}function LT(e){return!(!zy()||typeof ShadowRoot>"u")&&(e instanceof ShadowRoot||e instanceof Ji(e).ShadowRoot)}function Fv(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Na(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Pz(e){return["table","td","th"].includes(vd(e))}function Tz(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch{return!1}}))}function f$(e){const t=p$(),n=pu(e)?Na(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function HD(e){let t=Nm(e);for(;mu(t)&&!Vy(t);){if(f$(t))return t;if(Tz(t))return null;t=Nm(t)}return null}function p$(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Vy(e){return["html","body","#document"].includes(vd(e))}function Na(e){return Ji(e).getComputedStyle(e)}function Uy(e){return pu(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Nm(e){if("html"===vd(e))return e;const t=e.assignedSlot||e.parentNode||LT(e)&&e.host||Rl(e);return LT(t)?t.host:t}function KD(e){const t=Nm(e);return Vy(t)?e.ownerDocument?e.ownerDocument.body:e.body:mu(t)&&Fv(t)?t:KD(t)}function wv(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=KD(e),a=o===(null==(r=e.ownerDocument)?void 0:r.body),i=Ji(o);if(a){const e=Oz(i);return t.concat(i,i.visualViewport||[],Fv(o)?o:[],e&&n?wv(e):[])}return t.concat(o,wv(o,[],n))}function Oz(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function YD(e){const t=Na(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=mu(e),a=o?e.offsetWidth:n,i=o?e.offsetHeight:r,s=Zg(n)!==a||Zg(r)!==i;return s&&(n=a,r=i),{width:n,height:r,$:s}}function m$(e){return pu(e)?e:e.contextElement}function Pm(e){const t=m$(e);if(!mu(t))return md(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=YD(t);let i=(a?Zg(n.width):n.width)/r,s=(a?Zg(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}const Az=md(0);function QD(e){const t=Ji(e);return p$()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Az}function Mz(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Ji(e))&&t}function Xf(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),a=m$(e);let i=md(1);t&&(r?pu(r)&&(i=Pm(r)):i=Pm(e));const s=Mz(a,n,r)?QD(a):md(0);let u=(o.left+s.x)/i.x,l=(o.top+s.y)/i.y,c=o.width/i.x,d=o.height/i.y;if(a){const e=Ji(a),t=r&&pu(r)?Ji(r):r;let n=e.frameElement;for(;n&&r&&t!==e;){const e=Pm(n),t=n.getBoundingClientRect(),r=Na(n),o=t.left+(n.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(n.clientTop+parseFloat(r.paddingTop))*e.y;u*=e.x,l*=e.y,c*=e.x,d*=e.y,u+=o,l+=a,n=Ji(n).frameElement}}return ty({width:c,height:d,x:u,y:l})}const Dz=[":popover-open",":modal"];function XD(e){let t=!1,n=0,r=0;if(Dz.forEach((n=>{!function(n){try{t=t||e.matches(n)}catch{}}(n)})),t){const t=HD(e);if(t){const e=t.getBoundingClientRect();n=e.x,r=e.y}}return[t,n,r]}function Nz(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=Rl(r),[i]=t?XD(t.floating):[!1];if(r===a||i)return n;let s={scrollLeft:0,scrollTop:0},u=md(1);const l=md(0),c=mu(r);if((c||!c&&"fixed"!==o)&&(("body"!==vd(r)||Fv(a))&&(s=Uy(r)),mu(r))){const e=Xf(r);u=Pm(r),l.x=e.x+r.clientLeft,l.y=e.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-s.scrollLeft*u.x+l.x,y:n.y*u.y-s.scrollTop*u.y+l.y}}function kz(e){return Array.from(e.getClientRects())}function JD(e){return Xf(Rl(e)).left+Uy(e).scrollLeft}function Lz(e){const t=Rl(e),n=Uy(e),r=e.ownerDocument.body,o=Xi(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Xi(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+JD(e);const s=-n.scrollTop;return"rtl"===Na(r).direction&&(i+=Xi(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:i,y:s}}function Fz(e,t){const n=Ji(e),r=Rl(e),o=n.visualViewport;let a=r.clientWidth,i=r.clientHeight,s=0,u=0;if(o){a=o.width,i=o.height;const e=p$();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,u=o.offsetTop)}return{width:a,height:i,x:s,y:u}}function Bz(e,t){const n=Xf(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=mu(e)?Pm(e):md(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:o*a.x,y:r*a.y}}function FT(e,t,n){let r;if("viewport"===t)r=Fz(e,n);else if("document"===t)r=Lz(Rl(e));else if(pu(t))r=Bz(t,n);else{const n=QD(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return ty(r)}function ZD(e,t){const n=Nm(e);return!(n===t||!pu(n)||Vy(n))&&("fixed"===Na(n).position||ZD(n,t))}function jz(e,t){const n=t.get(e);if(n)return n;let r=wv(e,[],!1).filter((e=>pu(e)&&"body"!==vd(e))),o=null;const a="fixed"===Na(e).position;let i=a?Nm(e):e;for(;pu(i)&&!Vy(i);){const t=Na(i),n=f$(i);!n&&"fixed"===t.position&&(o=null),(a?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||Fv(i)&&!n&&ZD(e,i))?r=r.filter((e=>e!==i)):o=t,i=Nm(i)}return t.set(e,r),r}function zz(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[..."clippingAncestors"===n?jz(t,this._c):[].concat(n),r],i=a[0],s=a.reduce(((e,n)=>{const r=FT(t,n,o);return e.top=Xi(r.top,e.top),e.right=pd(r.right,e.right),e.bottom=pd(r.bottom,e.bottom),e.left=Xi(r.left,e.left),e}),FT(t,i,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function Vz(e){const{width:t,height:n}=YD(e);return{width:t,height:n}}function Uz(e,t,n,r){const o=mu(t),a=Rl(t),i="fixed"===n,s=Xf(e,!0,i,t);let u={scrollLeft:0,scrollTop:0};const l=md(0);if(o||!o&&!i)if(("body"!==vd(t)||Fv(a))&&(u=Uy(t)),o){const e=Xf(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else a&&(l.x=JD(a));let c=s.left+u.scrollLeft-l.x,d=s.top+u.scrollTop-l.y;const[f,p,m]=XD(r);return f&&(c+=p,d+=m,o&&(c+=t.clientLeft,d+=t.clientTop)),{x:c,y:d,width:s.width,height:s.height}}function BT(e,t){return mu(e)&&"fixed"!==Na(e).position?t?t(e):e.offsetParent:null}function eN(e,t){const n=Ji(e);if(!mu(e))return n;let r=BT(e,t);for(;r&&Pz(r)&&"static"===Na(r).position;)r=BT(r,t);return r&&("html"===vd(r)||"body"===vd(r)&&"static"===Na(r).position&&!f$(r))?n:r||HD(e)||n}const Wz=async function(e){const t=this.getOffsetParent||eN,n=this.getDimensions;return{reference:Uz(e.reference,await t(e.floating),e.strategy,e.floating),floating:{x:0,y:0,...await n(e.floating)}}};function qz(e){return"rtl"===Na(e).direction}const Gz={convertOffsetParentRelativeRectToViewportRelativeRect:Nz,getDocumentElement:Rl,getClippingRect:zz,getOffsetParent:eN,getElementRects:Wz,getClientRects:kz,getDimensions:Vz,getScale:Pm,isElement:pu,isRTL:qz};function Hz(e,t){let n,r=null;const o=Rl(e);function a(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function i(s,u){void 0===s&&(s=!1),void 0===u&&(u=1),a();const{left:l,top:c,width:d,height:f}=e.getBoundingClientRect();if(s||t(),!d||!f)return;const p={rootMargin:-Og(c)+"px "+-Og(o.clientWidth-(l+d))+"px "+-Og(o.clientHeight-(c+f))+"px "+-Og(l)+"px",threshold:Xi(0,pd(1,u))||1};let m=!0;function v(e){const t=e[0].intersectionRatio;if(t!==u){if(!m)return i();t?i(!1,t):n=setTimeout((()=>{i(!1,1e-7)}),100)}m=!1}try{r=new IntersectionObserver(v,{...p,root:o.ownerDocument})}catch{r=new IntersectionObserver(v,p)}r.observe(e)}(!0),a}function Kz(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:u=!1}=r,l=m$(e),c=o||a?[...l?wv(l):[],...wv(t)]:[];c.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),a&&e.addEventListener("resize",n)}));const d=l&&s?Hz(l,n):null;let f=-1,p=null;i&&(p=new ResizeObserver((e=>{let[r]=e;r&&r.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame((()=>{var e;null==(e=p)||e.observe(t)}))),n()})),l&&!u&&p.observe(l),p.observe(t));let m,v=u?Xf(e):null;return u&&function t(){const r=Xf(e);v&&(r.x!==v.x||r.y!==v.y||r.width!==v.width||r.height!==v.height)&&n(),v=r,m=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach((e=>{o&&e.removeEventListener("scroll",n),a&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=p)||e.disconnect(),p=null,u&&cancelAnimationFrame(m)}}const Yz=Cz,Qz=xz,Xz=Rz,Jz=Sz,jT=_z,Zz=Iz,eV=(e,t,n)=>{const r=new Map,o={platform:Gz,...n},a={...o.platform,_c:r};return bz(e,t,{...o,platform:a})};var Vg=typeof document<"u"?v.useLayoutEffect:v.useEffect;function ny(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!ny(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||ny(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function tN(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function zT(e,t){const n=tN(e);return Math.round(t*n)/n}function _x(e){const t=v.useRef(e);return Vg((()=>{t.current=e})),t}function tV(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:i}={},transform:s=!0,whileElementsMounted:u,open:l}=e,[c,d]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=v.useState(r);ny(f,r)||p(r);const[m,h]=v.useState(null),[g,y]=v.useState(null),b=v.useCallback((e=>{e!==E.current&&(E.current=e,h(e))}),[]),w=v.useCallback((e=>{e!==S.current&&(S.current=e,y(e))}),[]),x=a||m,_=i||g,E=v.useRef(null),S=v.useRef(null),I=v.useRef(c),A=null!=u,k=_x(u),C=_x(o),P=_x(l),R=v.useCallback((()=>{if(!E.current||!S.current)return;const e={placement:t,strategy:n,middleware:f};C.current&&(e.platform=C.current),eV(E.current,S.current,e).then((e=>{const t={...e,isPositioned:!1!==P.current};O.current&&!ny(I.current,t)&&(I.current=t,vu.flushSync((()=>{d(t)})))}))}),[f,t,n,C,P]);Vg((()=>{!1===l&&I.current.isPositioned&&(I.current.isPositioned=!1,d((e=>({...e,isPositioned:!1}))))}),[l]);const O=v.useRef(!1);Vg((()=>(O.current=!0,()=>{O.current=!1})),[]),Vg((()=>{if(x&&(E.current=x),_&&(S.current=_),x&&_){if(k.current)return k.current(x,_,R);R()}}),[x,_,R,k,A]);const T=v.useMemo((()=>({reference:E,floating:S,setReference:b,setFloating:w})),[b,w]),N=v.useMemo((()=>({reference:x,floating:_})),[x,_]),M=v.useMemo((()=>{const e={position:n,left:0,top:0};if(!N.floating)return e;const t=zT(N.floating,c.x),r=zT(N.floating,c.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...tN(N.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,s,N.floating,c.x,c.y]);return v.useMemo((()=>({...c,update:R,refs:T,elements:N,floatingStyles:M})),[c,R,T,N,M])}const nV=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&function(e){return{}.hasOwnProperty.call(e,"current")}(n)?null!=n.current?jT({element:n.current,padding:r}).fn(t):{}:n?jT({element:n,padding:r}).fn(t):{}}}),rV=(e,t)=>({...$z(e),options:[e,t]}),oV=(e,t)=>({...Yz(e),options:[e,t]}),iV=(e,t)=>({...Zz(e),options:[e,t]}),aV=(e,t)=>({...Qz(e),options:[e,t]}),sV=(e,t)=>({...Xz(e),options:[e,t]}),uV=(e,t)=>({...Jz(e),options:[e,t]}),lV=(e,t)=>({...nV(e),options:[e,t]}),cV=v.forwardRef(((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return v.createElement(lt.svg,Pe({},a,{ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?n:v.createElement("polygon",{points:"0,0 30,0 15,10"}))})),dV=cV,nN="Popper",[rN,Wm]=ni(nN),[fV,oN]=rN(nN),pV=e=>{const{__scopePopper:t,children:n}=e,[r,o]=v.useState(null);return v.createElement(fV,{scope:t,anchor:r,onAnchorChange:o},n)},mV="PopperAnchor",hV=v.forwardRef(((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=oN(mV,n),i=v.useRef(null),s=Vt(t,i);return v.useEffect((()=>{a.onAnchorChange((null==r?void 0:r.current)||i.current)})),r?null:v.createElement(lt.div,Pe({},o,{ref:s}))})),iN="PopperContent",[vV,gV]=rN(iN),yV=v.forwardRef(((e,t)=>{var n,r,o,a,i,s,u,l;const{__scopePopper:c,side:d="bottom",sideOffset:f=0,align:p="center",alignOffset:m=0,arrowPadding:h=0,avoidCollisions:g=!0,collisionBoundary:y=[],collisionPadding:b=0,sticky:w="partial",hideWhenDetached:x=!1,updatePositionStrategy:_="optimized",onPlaced:E,...S}=e,I=oN(iN,c),[A,k]=v.useState(null),C=Vt(t,(e=>k(e))),[P,R]=v.useState(null),O=Ly(P),T=null!==(n=null==O?void 0:O.width)&&void 0!==n?n:0,N=null!==(r=null==O?void 0:O.height)&&void 0!==r?r:0,M=d+("center"!==p?"-"+p:""),j="number"==typeof b?b:{top:0,right:0,bottom:0,left:0,...b},D=Array.isArray(y)?y:[y],q=D.length>0,z={padding:j,boundary:D.filter(xV),altBoundary:q},{refs:L,floatingStyles:$,placement:V,isPositioned:B,middlewareData:F}=tV({strategy:"fixed",placement:M,whileElementsMounted:(...e)=>Kz(...e,{animationFrame:"always"===_}),elements:{reference:I.anchor},middleware:[rV({mainAxis:f+N,alignmentAxis:m}),g&&oV({mainAxis:!0,crossAxis:!1,limiter:"partial"===w?iV():void 0,...z}),g&&aV({...z}),sV({...z,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:o,height:a}=t.reference,i=e.floating.style;i.setProperty("--radix-popper-available-width",`${n}px`),i.setProperty("--radix-popper-available-height",`${r}px`),i.setProperty("--radix-popper-anchor-width",`${o}px`),i.setProperty("--radix-popper-anchor-height",`${a}px`)}}),P&&lV({element:P,padding:h}),SV({arrowWidth:T,arrowHeight:N}),x&&uV({strategy:"referenceHidden",...z})]}),[U,G]=aN(V),W=ws(E);Vo((()=>{B&&(null==W||W())}),[B,W]);const H=null===(o=F.arrow)||void 0===o?void 0:o.x,Q=null===(a=F.arrow)||void 0===a?void 0:a.y,K=0!==(null===(i=F.arrow)||void 0===i?void 0:i.centerOffset),[Y,J]=v.useState();return Vo((()=>{A&&J(window.getComputedStyle(A).zIndex)}),[A]),v.createElement("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:B?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Y,"--radix-popper-transform-origin":[null===(s=F.transformOrigin)||void 0===s?void 0:s.x,null===(u=F.transformOrigin)||void 0===u?void 0:u.y].join(" ")},dir:e.dir},v.createElement(vV,{scope:c,placedSide:U,onArrowChange:R,arrowX:H,arrowY:Q,shouldHideArrow:K},v.createElement(lt.div,Pe({"data-side":U,"data-align":G},S,{ref:C,style:{...S.style,animation:B?void 0:"none",opacity:null!==(l=F.hide)&&void 0!==l&&l.referenceHidden?0:void 0}}))))})),wV="PopperArrow",bV={top:"bottom",right:"left",bottom:"top",left:"right"},_V=v.forwardRef((function(e,t){const{__scopePopper:n,...r}=e,o=gV(wV,n),a=bV[o.placedSide];return v.createElement("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0}},v.createElement(dV,Pe({},r,{ref:t,style:{...r.style,display:"block"}})))}));function xV(e){return null!==e}const SV=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,a,i;const{placement:s,rects:u,middlewareData:l}=t,c=0!==(null===(n=l.arrow)||void 0===n?void 0:n.centerOffset),d=c?0:e.arrowWidth,f=c?0:e.arrowHeight,[p,m]=aN(s),v={start:"0%",center:"50%",end:"100%"}[m],h=(null!==(r=null===(o=l.arrow)||void 0===o?void 0:o.x)&&void 0!==r?r:0)+d/2,g=(null!==(a=null===(i=l.arrow)||void 0===i?void 0:i.y)&&void 0!==a?a:0)+f/2;let y="",b="";return"bottom"===p?(y=c?v:`${h}px`,b=-f+"px"):"top"===p?(y=c?v:`${h}px`,b=`${u.floating.height+f}px`):"right"===p?(y=-f+"px",b=c?v:`${g}px`):"left"===p&&(y=`${u.floating.width+f}px`,b=c?v:`${g}px`),{data:{x:y,y:b}}}});function aN(e){const[t,n="center"]=e.split("-");return[t,n]}const sN=pV,h$=hV,v$=yV,EV=_V,xx="rovingFocusGroup.onEntryFocus",$V={bubbles:!1,cancelable:!0},g$="RovingFocusGroup",[qS,uN,CV]=s$(g$),[IV,qm]=ni(g$,[CV]),[RV,PV]=IV(g$),TV=v.forwardRef(((e,t)=>v.createElement(qS.Provider,{scope:e.__scopeRovingFocusGroup},v.createElement(qS.Slot,{scope:e.__scopeRovingFocusGroup},v.createElement(OV,Pe({},e,{ref:t})))))),OV=v.forwardRef(((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:u,onEntryFocus:l,...c}=e,d=v.useRef(null),f=Vt(t,d),p=u$(a),[m=null,h]=fd({prop:i,defaultProp:s,onChange:u}),[g,y]=v.useState(!1),b=ws(l),w=uN(n),x=v.useRef(!1),[_,E]=v.useState(0);return v.useEffect((()=>{const e=d.current;if(e)return e.addEventListener(xx,b),()=>e.removeEventListener(xx,b)}),[b]),v.createElement(RV,{scope:n,orientation:r,dir:p,loop:o,currentTabStopId:m,onItemFocus:v.useCallback((e=>h(e)),[h]),onItemShiftTab:v.useCallback((()=>y(!0)),[]),onFocusableItemAdd:v.useCallback((()=>E((e=>e+1))),[]),onFocusableItemRemove:v.useCallback((()=>E((e=>e-1))),[])},v.createElement(lt.div,Pe({tabIndex:g||0===_?-1:0,"data-orientation":r},c,{ref:f,style:{outline:"none",...e.style},onMouseDown:et(e.onMouseDown,(()=>{x.current=!0})),onFocus:et(e.onFocus,(e=>{const t=!x.current;if(e.target===e.currentTarget&&t&&!g){const t=new CustomEvent(xx,$V);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=w().filter((e=>e.focusable));lN([e.find((e=>e.active)),e.find((e=>e.id===m)),...e].filter(Boolean).map((e=>e.ref.current)))}}x.current=!1})),onBlur:et(e.onBlur,(()=>y(!1)))})))})),AV="RovingFocusGroupItem",MV=v.forwardRef(((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,...i}=e,s=ad(),u=a||s,l=PV(AV,n),c=l.currentTabStopId===u,d=uN(n),{onFocusableItemAdd:f,onFocusableItemRemove:p}=l;return v.useEffect((()=>{if(r)return f(),()=>p()}),[r,f,p]),v.createElement(qS.ItemSlot,{scope:n,id:u,focusable:r,active:o},v.createElement(lt.span,Pe({tabIndex:c?0:-1,"data-orientation":l.orientation},i,{ref:t,onMouseDown:et(e.onMouseDown,(e=>{r?l.onItemFocus(u):e.preventDefault()})),onFocus:et(e.onFocus,(()=>l.onItemFocus(u))),onKeyDown:et(e.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void l.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=kV(e,l.orientation,l.dir);if(void 0!==t){e.preventDefault();let n=d().filter((e=>e.focusable)).map((e=>e.ref.current));if("last"===t)n.reverse();else if("prev"===t||"next"===t){"prev"===t&&n.reverse();const r=n.indexOf(e.currentTarget);n=l.loop?LV(n,r+1):n.slice(r+1)}setTimeout((()=>lN(n)))}}))})))})),DV={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function NV(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}function kV(e,t,n){const r=NV(e.key,n);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)))return DV[r]}function lN(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function LV(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}const y$=TV,w$=MV,GS=["Enter"," "],FV=["ArrowDown","PageUp","Home"],cN=["ArrowUp","PageDown","End"],BV=[...FV,...cN],jV={ltr:[...GS,"ArrowRight"],rtl:[...GS,"ArrowLeft"]},zV={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Wy="Menu",[bv,VV,UV]=s$(Wy),[tp,dN]=ni(Wy,[UV,Wm,qm]),fN=Wm(),pN=qm(),[rZ,np]=tp(Wy),[oZ,Bv]=tp(Wy),WV=v.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e,o=fN(n);return v.createElement(h$,Pe({},o,r,{ref:t}))})),mN="MenuPortal",[qV,hN]=tp(mN,{forceMount:void 0}),GV=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=np(mN,t);return v.createElement(qV,{scope:t,forceMount:n},v.createElement(ea,{present:n||a.open},v.createElement(by,{asChild:!0,container:o},r)))},vs="MenuContent",[HV,b$]=tp(vs),KV=v.forwardRef(((e,t)=>{const n=hN(vs,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=np(vs,e.__scopeMenu),i=Bv(vs,e.__scopeMenu);return v.createElement(bv.Provider,{scope:e.__scopeMenu},v.createElement(ea,{present:r||a.open},v.createElement(bv.Slot,{scope:e.__scopeMenu},i.modal?v.createElement(YV,Pe({},o,{ref:t})):v.createElement(QV,Pe({},o,{ref:t})))))})),YV=v.forwardRef(((e,t)=>{const n=np(vs,e.__scopeMenu),r=v.useRef(null),o=Vt(t,r);return v.useEffect((()=>{const e=r.current;if(e)return Sy(e)}),[]),v.createElement(_$,Pe({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:et(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))})),QV=v.forwardRef(((e,t)=>{const n=np(vs,e.__scopeMenu);return v.createElement(_$,Pe({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))})),_$=v.forwardRef(((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:s,onEntryFocus:u,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...h}=e,g=np(vs,n),y=Bv(vs,n),b=fN(n),w=pN(n),x=VV(n),[_,E]=v.useState(null),S=v.useRef(null),I=Vt(t,S,g.onContentChange),A=v.useRef(0),k=v.useRef(""),C=v.useRef(0),P=v.useRef(null),R=v.useRef("right"),O=v.useRef(0),T=m?xy:v.Fragment,N=m?{as:qf,allowPinchZoom:!0}:void 0;v.useEffect((()=>()=>window.clearTimeout(A.current)),[]),EE();const M=v.useCallback((e=>{var t,n;return R.current===(null===(t=P.current)||void 0===t?void 0:t.side)&&mU(e,null===(n=P.current)||void 0===n?void 0:n.area)}),[]);return v.createElement(HV,{scope:n,searchRef:k,onItemEnter:v.useCallback((e=>{M(e)&&e.preventDefault()}),[M]),onItemLeave:v.useCallback((e=>{var t;M(e)||(null===(t=S.current)||void 0===t||t.focus(),E(null))}),[M]),onTriggerLeave:v.useCallback((e=>{M(e)&&e.preventDefault()}),[M]),pointerGraceTimerRef:C,onPointerGraceIntentChange:v.useCallback((e=>{P.current=e}),[])},v.createElement(T,N,v.createElement(SE,{asChild:!0,trapped:o,onMountAutoFocus:et(a,(e=>{var t;e.preventDefault(),null===(t=S.current)||void 0===t||t.focus()})),onUnmountAutoFocus:i},v.createElement(wy,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:p},v.createElement(y$,Pe({asChild:!0},w,{dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:_,onCurrentTabStopIdChange:E,onEntryFocus:et(u,(e=>{y.isUsingKeyboardRef.current||e.preventDefault()}))}),v.createElement(v$,Pe({role:"menu","aria-orientation":"vertical","data-state":bN(g.open),"data-radix-menu-content":"",dir:y.dir},b,h,{ref:I,style:{outline:"none",...h.style},onKeyDown:et(h.onKeyDown,(e=>{const t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=1===e.key.length;t&&("Tab"===e.key&&e.preventDefault(),!n&&r&&(e=>{var t,n;const r=k.current+e,o=x().filter((e=>!e.disabled)),a=document.activeElement,i=null===(t=o.find((e=>e.ref.current===a)))||void 0===t?void 0:t.textValue,s=fU(o.map((e=>e.textValue)),r,i),u=null===(n=o.find((e=>e.textValue===s)))||void 0===n?void 0:n.ref.current;(function e(t){k.current=t,window.clearTimeout(A.current),""!==t&&(A.current=window.setTimeout((()=>e("")),1e3))})(r),u&&setTimeout((()=>u.focus()))})(e.key));const o=S.current;if(e.target!==o||!BV.includes(e.key))return;e.preventDefault();const a=x().filter((e=>!e.disabled)).map((e=>e.ref.current));cN.includes(e.key)&&a.reverse(),cU(a)})),onBlur:et(e.onBlur,(e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(A.current),k.current="")})),onPointerMove:et(e.onPointerMove,_v((e=>{const t=e.target,n=O.current!==e.clientX;if(e.currentTarget.contains(t)&&n){const t=e.clientX>O.current?"right":"left";R.current=t,O.current=e.clientX}})))})))))))})),XV=v.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e;return v.createElement(lt.div,Pe({},r,{ref:t}))})),HS="MenuItem",VT="menu.itemSelect",x$=v.forwardRef(((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,a=v.useRef(null),i=Bv(HS,e.__scopeMenu),s=b$(HS,e.__scopeMenu),u=Vt(t,a),l=v.useRef(!1);return v.createElement(vN,Pe({},o,{ref:u,disabled:n,onClick:et(e.onClick,(()=>{const e=a.current;if(!n&&e){const t=new CustomEvent(VT,{bubbles:!0,cancelable:!0});e.addEventListener(VT,(e=>null==r?void 0:r(e)),{once:!0}),vA(e,t),t.defaultPrevented?l.current=!1:i.onClose()}})),onPointerDown:t=>{var n;null===(n=e.onPointerDown)||void 0===n||n.call(e,t),l.current=!0},onPointerUp:et(e.onPointerUp,(e=>{var t;l.current||null===(t=e.currentTarget)||void 0===t||t.click()})),onKeyDown:et(e.onKeyDown,(e=>{const t=""!==s.searchRef.current;n||t&&" "===e.key||GS.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())}))}))})),vN=v.forwardRef(((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,i=b$(HS,n),s=pN(n),u=v.useRef(null),l=Vt(t,u),[c,d]=v.useState(!1),[f,p]=v.useState("");return v.useEffect((()=>{const e=u.current;var t;e&&p((null!==(t=e.textContent)&&void 0!==t?t:"").trim())}),[a.children]),v.createElement(bv.ItemSlot,{scope:n,disabled:r,textValue:o??f},v.createElement(w$,Pe({asChild:!0},s,{focusable:!r}),v.createElement(lt.div,Pe({role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},a,{ref:l,onPointerMove:et(e.onPointerMove,_v((e=>{r?i.onItemLeave(e):(i.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus())}))),onPointerLeave:et(e.onPointerLeave,_v((e=>i.onItemLeave(e)))),onFocus:et(e.onFocus,(()=>d(!0))),onBlur:et(e.onBlur,(()=>d(!1)))}))))})),JV=v.forwardRef(((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return v.createElement(yN,{scope:e.__scopeMenu,checked:n},v.createElement(x$,Pe({role:"menuitemcheckbox","aria-checked":ry(n)?"mixed":n},o,{ref:t,"data-state":S$(n),onSelect:et(o.onSelect,(()=>null==r?void 0:r(!!ry(n)||!n)),{checkForDefaultPrevented:!1})})))})),ZV="MenuRadioGroup",[iZ,eU]=tp(ZV,{value:void 0,onValueChange:()=>{}}),tU="MenuRadioItem",nU=v.forwardRef(((e,t)=>{const{value:n,...r}=e,o=eU(tU,e.__scopeMenu),a=n===o.value;return v.createElement(yN,{scope:e.__scopeMenu,checked:a},v.createElement(x$,Pe({role:"menuitemradio","aria-checked":a},r,{ref:t,"data-state":S$(a),onSelect:et(r.onSelect,(()=>{var e;return null===(e=o.onValueChange)||void 0===e?void 0:e.call(o,n)}),{checkForDefaultPrevented:!1})})))})),gN="MenuItemIndicator",[yN,rU]=tp(gN,{checked:!1}),oU=v.forwardRef(((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=rU(gN,n);return v.createElement(ea,{present:r||ry(a.checked)||!0===a.checked},v.createElement(lt.span,Pe({},o,{ref:t,"data-state":S$(a.checked)})))})),iU=v.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e;return v.createElement(lt.div,Pe({role:"separator","aria-orientation":"horizontal"},r,{ref:t}))})),aU="MenuSub",[aZ,wN]=tp(aU),Ag="MenuSubTrigger",sU=v.forwardRef(((e,t)=>{const n=np(Ag,e.__scopeMenu),r=Bv(Ag,e.__scopeMenu),o=wN(Ag,e.__scopeMenu),a=b$(Ag,e.__scopeMenu),i=v.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:u}=a,l={__scopeMenu:e.__scopeMenu},c=v.useCallback((()=>{i.current&&window.clearTimeout(i.current),i.current=null}),[]);return v.useEffect((()=>c),[c]),v.useEffect((()=>{const e=s.current;return()=>{window.clearTimeout(e),u(null)}}),[s,u]),v.createElement(WV,Pe({asChild:!0},l),v.createElement(vN,Pe({id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":bN(n.open)},e,{ref:_E(t,o.onTriggerChange),onClick:t=>{var r;null===(r=e.onClick)||void 0===r||r.call(e,t),!e.disabled&&!t.defaultPrevented&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:et(e.onPointerMove,_v((t=>{a.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(a.onPointerGraceIntentChange(null),i.current=window.setTimeout((()=>{n.onOpenChange(!0),c()}),100))}))),onPointerLeave:et(e.onPointerLeave,_v((e=>{var t;c();const r=null===(t=n.content)||void 0===t?void 0:t.getBoundingClientRect();if(r){var o;const t=null===(o=n.content)||void 0===o?void 0:o.dataset.side,i="right"===t,u=i?-5:5,l=r[i?"left":"right"],c=r[i?"right":"left"];a.onPointerGraceIntentChange({area:[{x:e.clientX+u,y:e.clientY},{x:l,y:r.top},{x:c,y:r.top},{x:c,y:r.bottom},{x:l,y:r.bottom}],side:t}),window.clearTimeout(s.current),s.current=window.setTimeout((()=>a.onPointerGraceIntentChange(null)),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}}))),onKeyDown:et(e.onKeyDown,(t=>{const o=""!==a.searchRef.current;var i;e.disabled||o&&" "===t.key||!jV[r.dir].includes(t.key)||(n.onOpenChange(!0),null===(i=n.content)||void 0===i||i.focus(),t.preventDefault())}))})))})),uU="MenuSubContent",lU=v.forwardRef(((e,t)=>{const n=hN(vs,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=np(vs,e.__scopeMenu),i=Bv(vs,e.__scopeMenu),s=wN(uU,e.__scopeMenu),u=v.useRef(null),l=Vt(t,u);return v.createElement(bv.Provider,{scope:e.__scopeMenu},v.createElement(ea,{present:r||a.open},v.createElement(bv.Slot,{scope:e.__scopeMenu},v.createElement(_$,Pe({id:s.contentId,"aria-labelledby":s.triggerId},o,{ref:l,align:"start",side:"rtl"===i.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{var t;i.isUsingKeyboardRef.current&&(null===(t=u.current)||void 0===t||t.focus()),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:et(e.onFocusOutside,(e=>{e.target!==s.trigger&&a.onOpenChange(!1)})),onEscapeKeyDown:et(e.onEscapeKeyDown,(e=>{i.onClose(),e.preventDefault()})),onKeyDown:et(e.onKeyDown,(e=>{const t=e.currentTarget.contains(e.target),n=zV[i.dir].includes(e.key);var r;t&&n&&(a.onOpenChange(!1),null===(r=s.trigger)||void 0===r||r.focus(),e.preventDefault())}))})))))}));function bN(e){return e?"open":"closed"}function ry(e){return"indeterminate"===e}function S$(e){return ry(e)?"indeterminate":e?"checked":"unchecked"}function cU(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function dU(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}function fU(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,o=n?e.indexOf(n):-1;let a=dU(e,Math.max(o,0));1===r.length&&(a=a.filter((e=>e!==n)));const i=a.find((e=>e.toLowerCase().startsWith(r.toLowerCase())));return i!==n?i:void 0}function pU(e,t){const{x:n,y:r}=e;let o=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){const i=t[e].x,s=t[e].y,u=t[a].x,l=t[a].y;s>r!=l>r&&n<(u-i)*(r-s)/(l-s)+i&&(o=!o)}return o}function mU(e,t){if(!t)return!1;return pU({x:e.clientX,y:e.clientY},t)}function _v(e){return t=>"mouse"===t.pointerType?e(t):void 0}const hU=GV,vU=KV,gU=XV,yU=x$,wU=JV,bU=nU,_U=oU,xU=iU,SU=sU,EU=lU,_N="DropdownMenu",[$U,sZ]=ni(_N,[dN]),wu=dN(),[uZ,CU]=$U(_N),IU=e=>{const{__scopeDropdownMenu:t,...n}=e,r=wu(t);return v.createElement(hU,Pe({},r,n))},RU="DropdownMenuContent",PU=v.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=CU(RU,n),a=wu(n),i=v.useRef(!1);return v.createElement(vU,Pe({id:o.contentId,"aria-labelledby":o.triggerId},a,r,{ref:t,onCloseAutoFocus:et(e.onCloseAutoFocus,(e=>{var t;i.current||null===(t=o.triggerRef.current)||void 0===t||t.focus(),i.current=!1,e.preventDefault()})),onInteractOutside:et(e.onInteractOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;(!o.modal||r)&&(i.current=!0)})),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))})),TU=v.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=wu(n);return v.createElement(gU,Pe({},o,r,{ref:t}))})),OU=v.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=wu(n);return v.createElement(yU,Pe({},o,r,{ref:t}))})),AU=v.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=wu(n);return v.createElement(wU,Pe({},o,r,{ref:t}))})),MU=v.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=wu(n);return v.createElement(bU,Pe({},o,r,{ref:t}))})),DU=v.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=wu(n);return v.createElement(_U,Pe({},o,r,{ref:t}))})),NU=v.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=wu(n);return v.createElement(xU,Pe({},o,r,{ref:t}))})),kU=v.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=wu(n);return v.createElement(SU,Pe({},o,r,{ref:t}))})),LU=v.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=wu(n);return v.createElement(EU,Pe({},o,r,{ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))})),FU=IU,xN=PU,SN=TU,EN=OU,$N=AU,CN=MU,BU=DU,E$=NU,IN=kU,RN=LU,jU=v.forwardRef((({className:e,inset:t,children:n,...r},o)=>G.jsxs(IN,{ref:o,className:_e("flex cursor-default select-none items-center rounded-xs px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...r,children:[n,G.jsx(aA,{className:"ml-auto h-4 w-4"})]})));jU.displayName=IN.displayName;const zU=v.forwardRef((({className:e,...t},n)=>G.jsx(RN,{ref:n,className:_e("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t})));zU.displayName=RN.displayName;const UT=e=>{e.preventDefault()},VU=v.forwardRef((({className:e,sideOffset:t=4,isPortal:n,...r},o)=>{const a=G.jsx(xN,{ref:o,sideOffset:t,onOpenAutoFocus:UT,onCloseAutoFocus:UT,className:_e("z-[101] flex max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] flex-col gap-xxxs overflow-y-auto rounded-lg border border-gray-200 bg-white p-xxs text-popover-foreground ","shadow-[0px_0px_12px_0px_rgba(0,0,0,0.08)] ","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=open]:fade-in data-[state=open]:slide-in-from-top-2","data-[state=closed]:fade-out data-[state=closed]:slide-out-to-top-2","data-[state=closed]:duration-150 data-[state=open]:duration-150","data-[state=closed]:[animation-timing-function:ease-in] data-[state=open]:[animation-timing-function:ease-out]",e),...r});return n?G.jsx(FU,{children:a}):a}));VU.displayName=xN.displayName;const UU=v.forwardRef((({className:e,inset:t,...n},r)=>G.jsx(EN,{ref:r,className:_e("relative flex cursor-default select-none items-center gap-xxs rounded-m p-xxs text-base font-medium text-gray-900 outline-none transition-colors hover:bg-gray-100 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-xl",e),...n})));UU.displayName=EN.displayName;const WU=v.forwardRef((({className:e,children:t,checked:n,checkboxPosition:r="right",...o},a)=>{const i=G.jsx(ZE,{size:"default",variant:"default",checked:n});return G.jsxs($N,{ref:a,className:_e("relative flex cursor-default select-none items-center gap-xxs rounded-m p-xxs text-base font-medium text-gray-900"," outline-none transition-colors hover:bg-gray-100 focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,onSelect:e=>e.preventDefault(),...o,children:["left"===r&&i,G.jsx("div",{className:"flex flex-1 items-center gap-xxs",children:t}),"right"===r&&i]})}));WU.displayName=$N.displayName;const qU=v.forwardRef((({className:e,children:t,radioPosition:n="right",...r},o)=>{const a=G.jsx("div",{className:"flex h-xxs items-center justify-center",children:G.jsx(BU,{children:G.jsx(gE,{size:20})})});return G.jsxs(CN,{ref:o,className:_e("relative flex cursor-default select-none items-center gap-xxs rounded-m p-xxs text-base font-medium text-gray-900"," outline-none transition-colors hover:bg-gray-100 focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),onSelect:e=>e.preventDefault(),...r,children:["left"===n&&a,G.jsx("div",{className:"flex flex-1 items-center gap-xxs",children:t}),"right"===n&&a]})}));qU.displayName=CN.displayName;const GU=v.forwardRef((({className:e,inset:t,...n},r)=>G.jsx(SN,{ref:r,className:_e("text-sm font-semibold",t&&"pl-xl",e),...n})));GU.displayName=SN.displayName;const HU=v.forwardRef((({className:e,...t},n)=>G.jsx(E$,{ref:n,className:_e("-mx-1 my-1 h-px bg-muted",e),...t})));HU.displayName=E$.displayName;const KU=Ue.createContext(null),YU=()=>Ue.useContext(KU),QU=v.forwardRef(((e,t)=>v.createElement(lt.label,Pe({},e,{ref:t,onMouseDown:t=>{var n;null===(n=e.onMouseDown)||void 0===n||n.call(e,t),!t.defaultPrevented&&t.detail>1&&t.preventDefault()}})))),PN=QU,XU=gu("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),TN=v.forwardRef((({className:e,...t},n)=>G.jsx(PN,{ref:n,className:_e(XU(),e),...t})));function WT(e,[t,n]){return Math.min(n,Math.max(t,e))}TN.displayName=PN.displayName;const ON=v.forwardRef(((e,t)=>v.createElement(lt.span,Pe({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}})))),JU=ON,ZU=[" ","Enter","ArrowUp","ArrowDown"],eW=[" ","Enter"],qy="Select",[Gy,Hy,tW]=s$(qy),[Gm,lZ]=ni(qy,[tW,Wm]),$$=Wm(),[nW,rp]=Gm(qy),[rW,oW]=Gm(qy),iW=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:i,defaultValue:s,onValueChange:u,dir:l,name:c,autoComplete:d,disabled:f,required:p}=e,m=$$(t),[h,g]=v.useState(null),[y,b]=v.useState(null),[w,x]=v.useState(!1),_=u$(l),[E=!1,S]=fd({prop:r,defaultProp:o,onChange:a}),[I,A]=fd({prop:i,defaultProp:s,onChange:u}),k=v.useRef(null),C=!h||!!h.closest("form"),[P,R]=v.useState(new Set),O=Array.from(P).map((e=>e.props.value)).join(";");return v.createElement(sN,m,v.createElement(nW,{required:p,scope:t,trigger:h,onTriggerChange:g,valueNode:y,onValueNodeChange:b,valueNodeHasChildren:w,onValueNodeHasChildrenChange:x,contentId:ad(),value:I,onValueChange:A,open:E,onOpenChange:S,dir:_,triggerPointerDownPosRef:k,disabled:f},v.createElement(Gy.Provider,{scope:t},v.createElement(rW,{scope:e.__scopeSelect,onNativeOptionAdd:v.useCallback((e=>{R((t=>new Set(t).add(e)))}),[]),onNativeOptionRemove:v.useCallback((e=>{R((t=>{const n=new Set(t);return n.delete(e),n}))}),[])},n)),C?v.createElement(kN,{key:O,"aria-hidden":!0,required:p,tabIndex:-1,name:c,autoComplete:d,value:I,onChange:e=>A(e.target.value),disabled:f},void 0===I?v.createElement("option",{value:""}):null,Array.from(P)):null))},aW="SelectTrigger",sW=v.forwardRef(((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=$$(n),i=rp(aW,n),s=i.disabled||r,u=Vt(t,i.onTriggerChange),l=Hy(n),[c,d,f]=LN((e=>{const t=l().filter((e=>!e.disabled)),n=t.find((e=>e.value===i.value)),r=FN(t,e,n);void 0!==r&&i.onValueChange(r.value)})),p=()=>{s||(i.onOpenChange(!0),f())};return v.createElement(h$,Pe({asChild:!0},a),v.createElement(lt.button,Pe({type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":NN(i.value)?"":void 0},o,{ref:u,onClick:et(o.onClick,(e=>{e.currentTarget.focus()})),onPointerDown:et(o.onPointerDown,(e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&(p(),i.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)},e.preventDefault())})),onKeyDown:et(o.onKeyDown,(e=>{const t=""!==c.current;!(e.ctrlKey||e.altKey||e.metaKey)&&1===e.key.length&&d(e.key),(!t||" "!==e.key)&&ZU.includes(e.key)&&(p(),e.preventDefault())}))})))})),uW="SelectValue",lW=v.forwardRef(((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:i="",...s}=e,u=rp(uW,n),{onValueNodeHasChildrenChange:l}=u,c=void 0!==a,d=Vt(t,u.onValueNodeChange);return Vo((()=>{l(c)}),[l,c]),v.createElement(lt.span,Pe({},s,{ref:d,style:{pointerEvents:"none"}}),NN(u.value)?v.createElement(v.Fragment,null,i):a)})),cW=v.forwardRef(((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return v.createElement(lt.span,Pe({"aria-hidden":!0},o,{ref:t}),r||"▼")})),dW=e=>v.createElement(by,Pe({asChild:!0},e)),km="SelectContent",fW=v.forwardRef(((e,t)=>{const n=rp(km,e.__scopeSelect),[r,o]=v.useState();if(Vo((()=>{o(new DocumentFragment)}),[]),!n.open){const t=r;return t?vu.createPortal(v.createElement(AN,{scope:e.__scopeSelect},v.createElement(Gy.Slot,{scope:e.__scopeSelect},v.createElement("div",null,e.children))),t):null}return v.createElement(pW,Pe({},e,{ref:t}))})),bl=10,[AN,op]=Gm(km),pW=v.forwardRef(((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:i,side:s,sideOffset:u,align:l,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g,...y}=e,b=rp(km,n),[w,x]=v.useState(null),[_,E]=v.useState(null),S=Vt(t,(e=>x(e))),[I,A]=v.useState(null),[k,C]=v.useState(null),P=Hy(n),[R,O]=v.useState(!1),T=v.useRef(!1);v.useEffect((()=>{if(w)return Sy(w)}),[w]),EE();const N=v.useCallback((e=>{const[t,...n]=P().map((e=>e.ref.current)),[r]=n.slice(-1),o=document.activeElement;for(const n of e)if(n===o||(null==n||n.scrollIntoView({block:"nearest"}),n===t&&_&&(_.scrollTop=0),n===r&&_&&(_.scrollTop=_.scrollHeight),null==n||n.focus(),document.activeElement!==o))return}),[P,_]),M=v.useCallback((()=>N([I,w])),[N,I,w]);v.useEffect((()=>{R&&M()}),[R,M]);const{onOpenChange:j,triggerPointerDownPosRef:D}=b;v.useEffect((()=>{if(w){let e={x:0,y:0};const t=t=>{var n,r,o,a;e={x:Math.abs(Math.round(t.pageX)-(null!==(n=null===(r=D.current)||void 0===r?void 0:r.x)&&void 0!==n?n:0)),y:Math.abs(Math.round(t.pageY)-(null!==(o=null===(a=D.current)||void 0===a?void 0:a.y)&&void 0!==o?o:0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():w.contains(n.target)||j(!1),document.removeEventListener("pointermove",t),D.current=null};return null!==D.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}}),[w,j,D]),v.useEffect((()=>{const e=()=>j(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}}),[j]);const[q,z]=LN((e=>{const t=P().filter((e=>!e.disabled)),n=t.find((e=>e.ref.current===document.activeElement)),r=FN(t,e,n);r&&setTimeout((()=>r.ref.current.focus()))})),L=v.useCallback(((e,t,n)=>{const r=!T.current&&!n;(void 0!==b.value&&b.value===t||r)&&(A(e),r&&(T.current=!0))}),[b.value]),$=v.useCallback((()=>null==w?void 0:w.focus()),[w]),V=v.useCallback(((e,t,n)=>{const r=!T.current&&!n;(void 0!==b.value&&b.value===t||r)&&C(e)}),[b.value]),B="popper"===r?qT:mW,F=B===qT?{side:s,sideOffset:u,align:l,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return v.createElement(AN,{scope:n,content:w,viewport:_,onViewportChange:E,itemRefCallback:L,selectedItem:I,onItemLeave:$,itemTextRefCallback:V,focusSelectedItem:M,selectedItemText:k,position:r,isPositioned:R,searchRef:q},v.createElement(xy,{as:qf,allowPinchZoom:!0},v.createElement(SE,{asChild:!0,trapped:b.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:et(o,(e=>{var t;null===(t=b.trigger)||void 0===t||t.focus({preventScroll:!0}),e.preventDefault()}))},v.createElement(wy,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>b.onOpenChange(!1)},v.createElement(B,Pe({role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:e=>e.preventDefault()},y,F,{onPlaced:()=>O(!0),ref:S,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:et(y.onKeyDown,(e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),!t&&1===e.key.length&&z(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=P().filter((e=>!e.disabled)).map((e=>e.ref.current));if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout((()=>N(t))),e.preventDefault()}}))}))))))})),mW=v.forwardRef(((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=rp(km,n),i=op(km,n),[s,u]=v.useState(null),[l,c]=v.useState(null),d=Vt(t,(e=>c(e))),f=Hy(n),p=v.useRef(!1),m=v.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:y,focusSelectedItem:b}=i,w=v.useCallback((()=>{if(a.trigger&&a.valueNode&&s&&l&&h&&g&&y){const e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),o=y.getBoundingClientRect();if("rtl"!==a.dir){const r=o.left-t.left,a=n.left-r,i=e.left-a,u=e.width+i,l=Math.max(u,t.width),c=window.innerWidth-bl,d=WT(a,[bl,c-l]);s.style.minWidth=u+"px",s.style.left=d+"px"}else{const r=t.right-o.right,a=window.innerWidth-n.right-r,i=window.innerWidth-e.right-a,u=e.width+i,l=Math.max(u,t.width),c=window.innerWidth-bl,d=WT(a,[bl,c-l]);s.style.minWidth=u+"px",s.style.right=d+"px"}const i=f(),u=window.innerHeight-2*bl,c=h.scrollHeight,d=window.getComputedStyle(l),m=parseInt(d.borderTopWidth,10),v=parseInt(d.paddingTop,10),b=parseInt(d.borderBottomWidth,10),w=m+v+c+parseInt(d.paddingBottom,10)+b,x=Math.min(5*g.offsetHeight,w),_=window.getComputedStyle(h),E=parseInt(_.paddingTop,10),S=parseInt(_.paddingBottom,10),I=e.top+e.height/2-bl,A=u-I,k=g.offsetHeight/2,C=m+v+(g.offsetTop+k),P=w-C;if(C<=I){const e=g===i[i.length-1].ref.current;s.style.bottom="0px";const t=l.clientHeight-h.offsetTop-h.offsetHeight,n=C+Math.max(A,k+(e?S:0)+t+b);s.style.height=n+"px"}else{const e=g===i[0].ref.current;s.style.top="0px";const t=Math.max(I,m+h.offsetTop+(e?E:0)+k)+P;s.style.height=t+"px",h.scrollTop=C-I+h.offsetTop}s.style.margin=`${bl}px 0`,s.style.minHeight=x+"px",s.style.maxHeight=u+"px",null==r||r(),requestAnimationFrame((()=>p.current=!0))}}),[f,a.trigger,a.valueNode,s,l,h,g,y,a.dir,r]);Vo((()=>w()),[w]);const[x,_]=v.useState();Vo((()=>{l&&_(window.getComputedStyle(l).zIndex)}),[l]);const E=v.useCallback((e=>{e&&!0===m.current&&(w(),null==b||b(),m.current=!1)}),[w,b]);return v.createElement(hW,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:E},v.createElement("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:x}},v.createElement(lt.div,Pe({},o,{ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}}))))})),qT=v.forwardRef(((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=bl,...a}=e,i=$$(n);return v.createElement(v$,Pe({},i,a,{ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}))})),[hW,C$]=Gm(km,{}),GT="SelectViewport",vW=v.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,o=op(GT,n),a=C$(GT,n),i=Vt(t,o.onViewportChange),s=v.useRef(0);return v.createElement(v.Fragment,null,v.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"}}),v.createElement(Gy.Slot,{scope:n},v.createElement(lt.div,Pe({"data-radix-select-viewport":"",role:"presentation"},r,{ref:i,style:{position:"relative",flex:1,overflow:"auto",...r.style},onScroll:et(r.onScroll,(e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=a;if(null!=r&&r.current&&n){const e=Math.abs(s.current-t.scrollTop);if(e>0){const r=window.innerHeight-2*bl,o=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),i=Math.max(o,a);if(i<r){const o=i+e,a=Math.min(r,o),s=o-a;n.style.height=a+"px","0px"===n.style.bottom&&(t.scrollTop=s>0?s:0,n.style.justifyContent="flex-end")}}}s.current=t.scrollTop}))}))))})),gW="SelectGroup",[yW,wW]=Gm(gW),bW=v.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,o=ad();return v.createElement(yW,{scope:n,id:o},v.createElement(lt.div,Pe({role:"group","aria-labelledby":o},r,{ref:t})))})),_W="SelectLabel",xW=v.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,o=wW(_W,n);return v.createElement(lt.div,Pe({id:o.id},r,{ref:t}))})),KS="SelectItem",[SW,MN]=Gm(KS),EW=v.forwardRef(((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...i}=e,s=rp(KS,n),u=op(KS,n),l=s.value===r,[c,d]=v.useState(a??""),[f,p]=v.useState(!1),m=Vt(t,(e=>{var t;return null===(t=u.itemRefCallback)||void 0===t?void 0:t.call(u,e,r,o)})),h=ad(),g=()=>{o||(s.onValueChange(r),s.onOpenChange(!1))};if(""===r)throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return v.createElement(SW,{scope:n,value:r,disabled:o,textId:h,isSelected:l,onItemTextChange:v.useCallback((e=>{d((t=>{var n;return t||(null!==(n=null==e?void 0:e.textContent)&&void 0!==n?n:"").trim()}))}),[])},v.createElement(Gy.ItemSlot,{scope:n,value:r,disabled:o,textValue:c},v.createElement(lt.div,Pe({role:"option","aria-labelledby":h,"data-highlighted":f?"":void 0,"aria-selected":l&&f,"data-state":l?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1},i,{ref:m,onFocus:et(i.onFocus,(()=>p(!0))),onBlur:et(i.onBlur,(()=>p(!1))),onPointerUp:et(i.onPointerUp,g),onPointerMove:et(i.onPointerMove,(e=>{var t;o?null===(t=u.onItemLeave)||void 0===t||t.call(u):e.currentTarget.focus({preventScroll:!0})})),onPointerLeave:et(i.onPointerLeave,(e=>{var t;e.currentTarget===document.activeElement&&(null===(t=u.onItemLeave)||void 0===t||t.call(u))})),onKeyDown:et(i.onKeyDown,(e=>{var t;""!==(null===(t=u.searchRef)||void 0===t?void 0:t.current)&&" "===e.key||(eW.includes(e.key)&&g()," "===e.key&&e.preventDefault())}))}))))})),Mg="SelectItemText",$W=v.forwardRef(((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,i=rp(Mg,n),s=op(Mg,n),u=MN(Mg,n),l=oW(Mg,n),[c,d]=v.useState(null),f=Vt(t,(e=>d(e)),u.onItemTextChange,(e=>{var t;return null===(t=s.itemTextRefCallback)||void 0===t?void 0:t.call(s,e,u.value,u.disabled)})),p=null==c?void 0:c.textContent,m=v.useMemo((()=>v.createElement("option",{key:u.value,value:u.value,disabled:u.disabled},p)),[u.disabled,u.value,p]),{onNativeOptionAdd:h,onNativeOptionRemove:g}=l;return Vo((()=>(h(m),()=>g(m))),[h,g,m]),v.createElement(v.Fragment,null,v.createElement(lt.span,Pe({id:u.textId},a,{ref:f})),u.isSelected&&i.valueNode&&!i.valueNodeHasChildren?vu.createPortal(a.children,i.valueNode):null)})),CW="SelectItemIndicator",IW=v.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e;return MN(CW,n).isSelected?v.createElement(lt.span,Pe({"aria-hidden":!0},r,{ref:t})):null})),HT="SelectScrollUpButton",RW=v.forwardRef(((e,t)=>{const n=op(HT,e.__scopeSelect),r=C$(HT,e.__scopeSelect),[o,a]=v.useState(!1),i=Vt(t,r.onScrollButtonChange);return Vo((()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollTop>0;a(e)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[n.viewport,n.isPositioned]),o?v.createElement(DN,Pe({},e,{ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}})):null})),KT="SelectScrollDownButton",PW=v.forwardRef(((e,t)=>{const n=op(KT,e.__scopeSelect),r=C$(KT,e.__scopeSelect),[o,a]=v.useState(!1),i=Vt(t,r.onScrollButtonChange);return Vo((()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;a(n)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[n.viewport,n.isPositioned]),o?v.createElement(DN,Pe({},e,{ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}})):null})),DN=v.forwardRef(((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=op("SelectScrollButton",n),i=v.useRef(null),s=Hy(n),u=v.useCallback((()=>{null!==i.current&&(window.clearInterval(i.current),i.current=null)}),[]);return v.useEffect((()=>()=>u()),[u]),Vo((()=>{var e;const t=s().find((e=>e.ref.current===document.activeElement));null==t||null===(e=t.ref.current)||void 0===e||e.scrollIntoView({block:"nearest"})}),[s]),v.createElement(lt.div,Pe({"aria-hidden":!0},o,{ref:t,style:{flexShrink:0,...o.style},onPointerDown:et(o.onPointerDown,(()=>{null===i.current&&(i.current=window.setInterval(r,50))})),onPointerMove:et(o.onPointerMove,(()=>{var e;null===(e=a.onItemLeave)||void 0===e||e.call(a),null===i.current&&(i.current=window.setInterval(r,50))})),onPointerLeave:et(o.onPointerLeave,(()=>{u()}))}))})),TW=v.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e;return v.createElement(lt.div,Pe({"aria-hidden":!0},r,{ref:t}))}));function NN(e){return""===e||void 0===e}const kN=v.forwardRef(((e,t)=>{const{value:n,...r}=e,o=v.useRef(null),a=Vt(t,o),i=ky(n);return v.useEffect((()=>{const e=o.current,t=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(t,"value").set;if(i!==n&&r){const t=new Event("change",{bubbles:!0});r.call(e,n),e.dispatchEvent(t)}}),[i,n]),v.createElement(ON,{asChild:!0},v.createElement("select",Pe({},r,{ref:a,defaultValue:n})))}));function LN(e){const t=ws(e),n=v.useRef(""),r=v.useRef(0),o=v.useCallback((e=>{const o=n.current+e;t(o),function e(t){n.current=t,window.clearTimeout(r.current),""!==t&&(r.current=window.setTimeout((()=>e("")),1e3))}(o)}),[t]),a=v.useCallback((()=>{n.current="",window.clearTimeout(r.current)}),[]);return v.useEffect((()=>()=>window.clearTimeout(r.current)),[]),[n,o,a]}function FN(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,o=n?e.indexOf(n):-1;let a=OW(e,Math.max(o,0));1===r.length&&(a=a.filter((e=>e!==n)));const i=a.find((e=>e.textValue.toLowerCase().startsWith(r.toLowerCase())));return i!==n?i:void 0}function OW(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}kN.displayName="BubbleSelect";const BN=iW,I$=sW,jN=lW,AW=cW,MW=dW,zN=fW,DW=vW,VN=bW,UN=xW,WN=EW,NW=$W,kW=IW,qN=RW,GN=PW,HN=TW,LW=BN,R$=v.forwardRef((({...e},t)=>G.jsx(LW,{ref:t,...e})));R$.displayName=BN.displayName;const KN=v.forwardRef(((e,t)=>G.jsx(VN,{ref:t,...e})));KN.displayName=VN.displayName;const YN=v.forwardRef(((e,t)=>G.jsx(jN,{ref:t,...e})));YN.displayName=jN.displayName;const P$=v.forwardRef((({className:e,children:t,caption:n,error:r,icon:o,renderCaret:a,...i},s)=>{const u=a?a():a?null:G.jsx(oA,{size:20,className:"transition-transform duration-200 group-data-[state=open]/select:rotate-180"});return G.jsxs("div",{className:"w-full",children:[G.jsxs(I$,{ref:s,className:_e("group/select flex h-l w-full items-center justify-between rounded-m border bg-background p-xxs text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus-visible:ring-gray-700 focus-visible:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50",r?"border-red-500":"border-input",e),...i,children:[G.jsxs("div",{className:_e("flex flex-1 items-center gap-xxs",{"max-w-[90%]":!!a}),children:[o&&G.jsx("span",{className:_e("text-muted-foreground",{"text-red-dark":r}),children:o}),t]}),G.jsx(AW,{asChild:!0,children:u})]}),n||r?r?G.jsxs("div",{className:"mt-xxs flex items-center gap-xxxs text-sm text-red-600",children:[G.jsx(yE,{size:16}),r]}):G.jsxs("div",{className:"mt-xxs flex items-center gap-xxxs text-sm text-muted-foreground",children:[G.jsx(V5,{size:16}),n]}):null]})}));P$.displayName="SelectTriggerWrapper";const QN=v.forwardRef((({className:e,children:t,caption:n,error:r,icon:o,...a},i)=>G.jsx(P$,{ref:i,className:_e("[&>span]:line-clamp-1 [&>span]:text-left",e),caption:n,error:r,icon:o,...a,children:t})));QN.displayName=I$.displayName;const T$=v.forwardRef((({className:e,children:t,position:n="popper",...r},o)=>{const a=v.useMemo((()=>{const e=t=>{var n,r;if(!t)return!1;if(Array.isArray(t))return t.some(e);if(v.isValidElement(t)){const o=null==(n=t.type)?void 0:n.displayName;return"SelectActions"===o||"SelectFooter"===o||e(null==(r=t.props)?void 0:r.children)}return!1};return e(t)}),[t]);return G.jsx(MW,{children:G.jsx(zN,{ref:o,className:_e("z-[101] flex max-h-[var(--radix-select-content-available-height)] min-w-[8rem] flex-col rounded-lg border border-gray-200 bg-white text-popover-foreground","shadow-[0px_0px_12px_0px_rgba(0,0,0,0.08)]","data-[state=open]:animate-in data-[state=closed]:animate-out ","data-[state=open]:fade-in data-[state=open]:slide-in-from-top-2 ","data-[state=closed]:fade-out data-[state=closed]:slide-out-to-top-2 ","data-[state=closed]:duration-150 data-[state=open]:duration-150 ","data-[state=closed]:[animation-timing-function:ease-in] data-[state=open]:[animation-timing-function:ease-out]","popper"===n&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:G.jsx(DW,{className:_e("flex flex-col gap-xxxs overflow-y-auto px-xxs",{"py-xxs":!a},"popper"===n&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t})})})}));T$.displayName=zN.displayName;const XN=v.forwardRef((({className:e,...t},n)=>G.jsx(UN,{ref:n,className:_e("text-sm font-medium text-gray-900",e),...t})));XN.displayName=UN.displayName;const JN=v.forwardRef((({className:e,showCheck:t=!0,checkPosition:n="right",children:r,...o},a)=>{const i=G.jsx(kW,{children:G.jsx(gE,{size:20})});return G.jsxs(WN,{ref:a,className:_e("relative flex cursor-default select-none items-center gap-xxs rounded-m p-xxs","text-base font-medium text-gray-900 outline-none transition-colors hover:bg-gray-100","focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o,children:[t&&"left"===n&&i,G.jsx("div",{className:"flex flex-1 items-center gap-xxs",children:G.jsx(NW,{children:r})}),t&&"right"===n&&i]})}));JN.displayName=WN.displayName;const ZN=v.forwardRef((({className:e,...t},n)=>G.jsx(HN,{ref:n,className:_e("-mx-1 my-1 h-px bg-gray-200",e),...t})));ZN.displayName=HN.displayName;const FW=({selectedValues:e=[],onRemoveValue:t})=>{const n=v.useRef(null),[r,o]=v.useState(e.length);return v.useLayoutEffect((()=>{if(!n.current||0===e.length)return void o(e.length);const r=n.current.offsetWidth-60,a=document.createElement("div");Object.assign(a.style,{position:"absolute",visibility:"hidden",whiteSpace:"nowrap",display:"flex",gap:"4px",top:"-9999px",left:"-9999px"}),document.body.appendChild(a);let i=0,s=0;for(const n of e){const e=document.createElement("div");e.className="gap-xxxs p-xxs flex cursor-pointer items-center rounded-sm bg-gray-100 text-sm font-medium text-gray-900";const o=document.createElement("span");if(o.textContent="string"==typeof n?n:n.value,e.appendChild(o),"string"!=typeof n&&n.avatar){const t=document.createElement("div");t.className="w-6 h-6 rounded-full bg-gray-300 flex-shrink-0",e.insertBefore(t,o)}if(t){const t=document.createElement("button");t.innerHTML="×",t.className="ml-1 rounded-full outline-none",e.appendChild(t)}a.appendChild(e);const u=e.offsetWidth+4;if(!(i+u<=r))break;i+=u,s++}document.body.removeChild(a),o(Math.max(1,s))}),[e,t]),{containerRef:n,visibleCount:r}},ek=({hiddenCount:e,selectedValues:t=[],onRemoveValue:n})=>{const r=e=>{e.stopPropagation(),e.preventDefault()};return G.jsx("div",{onPointerDown:r,onMouseDown:r,onClick:r,children:G.jsxs(R$,{name:"hidden-chips-counter",children:[G.jsx(I$,{asChild:!0,children:G.jsx("div",{children:G.jsx(UM,{text:`+${e}`})})}),G.jsx(T$,{align:"end",className:"max-h-[250px] w-screen max-w-[300px] gap-xxxs overflow-y-auto",children:t.map((e=>{const t="string"==typeof e?e:e.value;return G.jsxs("div",{className:"flex justify-between p-xxs",onClick:e=>e.stopPropagation(),children:[G.jsx("span",{children:t}),G.jsx(gy,{size:16,className:"cursor-pointer",onClick:()=>null==n?void 0:n(t)})]},t)}))})]})})};ek.displayName="SelectHiddenChipsCounter";const BW=v.forwardRef(((e,t)=>{const{className:n,selectedValues:r=[],placeholder:o,onRemoveValue:a,icon:i,caption:s,error:u,...l}=e,{containerRef:c,visibleCount:d}=FW({selectedValues:r,onRemoveValue:a}),f=r.length-d;return G.jsx(P$,{ref:t,className:n,caption:s,error:u,icon:i,...l,children:G.jsx("div",{ref:c,className:"flex w-full flex-1 flex-nowrap overflow-hidden",children:0===r.length?G.jsx("span",{children:o||"Select options..."}):G.jsxs(AF,{children:[r.slice(0,d).map((e=>{const t="string"==typeof e?e:e.value;return G.jsx(UM,{avatarSrc:"string"==typeof e?void 0:e.avatar,text:t,onRemove:()=>null==a?void 0:a(t)},t)})),f>0&&G.jsx(ek,{hiddenCount:f,onRemoveValue:a,selectedValues:r})]})})})}));BW.displayName="SelectMultiTrigger";const jW=v.forwardRef((({value:e,isSelected:t=!1,isLoading:n=!1,checkboxPosition:r="right",onSelect:o,className:a,children:i,...s},u)=>{const l=n?G.jsx(sA,{size:24,className:"flex-shrink-0 animate-spin text-blue_100"}):G.jsx(ZE,{size:"default",variant:"default",checked:t}),c=()=>{null==o||o(e)};return G.jsxs("div",{ref:u,className:_e("relative flex cursor-pointer select-none items-center gap-xxs rounded-m","p-xxs text-base font-medium text-gray-900 outline-none transition-colors hover:bg-gray-100","focus:bg-accent focus:text-accent-foreground",{"pointer-events-none":n},a),onClick:c,role:"button",tabIndex:0,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),c())},...s,children:["left"===r&&l,G.jsx("div",{className:"flex flex-1 items-center gap-xxs",children:i}),"right"===r&&l]})}));jW.displayName="SelectCheckboxItem";const zW=v.forwardRef((({className:e,...t},n)=>G.jsx(qN,{ref:n,className:_e("flex cursor-default items-center justify-center py-xxs",e),...t,children:G.jsx(k5,{size:16})})));zW.displayName=qN.displayName;const VW=v.forwardRef((({className:e,...t},n)=>G.jsx(GN,{ref:n,className:_e("flex cursor-default items-center justify-center p-xxs",e),...t,children:G.jsx(oA,{size:16})})));VW.displayName=GN.displayName;const UW=v.forwardRef((({className:e,children:t,...n},r)=>G.jsx("div",{ref:r,className:_e("sticky top-0 z-20 bg-white p-xxs",e),...n,children:t})));UW.displayName="SelectActions";const WW=v.forwardRef((({className:e,children:t,...n},r)=>G.jsx("div",{ref:r,className:_e("sticky bottom-0 z-20 bg-white p-xxs",e),...n,children:t})));WW.displayName="SelectFooter";const qW=v.createContext({}),bd=()=>{const e=v.useContext(qW),t=v.useContext(tk),n=YU();e||console.error("useFormContext must be used within a FormProvider");const{getFieldState:r,formState:o}=n,a=r(e.name,o);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=t;return{id:i,name:e.name,formItemId:`${i}-form-item`,formDescriptionId:`${i}-form-item-description`,formMessageId:`${i}-form-item-message`,...a}},tk=v.createContext({}),GW=v.forwardRef((({className:e,...t},n)=>{const r=v.useId();return G.jsx(tk.Provider,{value:{id:r},children:G.jsx("div",{ref:n,className:_e("mt-[8px]",e),...t})})}));GW.displayName="FormItem";const HW=v.forwardRef((({className:e,isRequired:t,...n},r)=>{const{formItemId:o}=bd();return G.jsxs(TN,{ref:r,className:_e("mb-2 text-sm font-medium",e),htmlFor:o,...n,children:[t&&"*",n.children]})}));HW.displayName="FormLabel";const KW=v.forwardRef((({...e},t)=>{const{error:n,formItemId:r,formDescriptionId:o,formMessageId:a}=bd();return G.jsx(yd,{ref:t,id:r,"aria-describedby":n?`${o} ${a}`:`${o}`,"aria-invalid":!!n,...e})}));KW.displayName="FormControl";const YW=v.forwardRef((({className:e,...t},n)=>{const{formDescriptionId:r}=bd();return G.jsx("p",{ref:n,id:r,className:_e("text-sm text-muted-foreground",e),...t})}));YW.displayName="FormDescription";const QW=v.forwardRef((({className:e,children:t,...n},r)=>{const{error:o,formMessageId:a}=bd(),i=o?String(null==o?void 0:o.message):t;return i?G.jsxs("p",{ref:r,id:a,className:_e("flex items-start gap-1 pt-xxs text-sm text-red-dark",e),...n,children:[G.jsx(yE,{size:16,className:"text-red-dark"})," ",i]}):null}));QW.displayName="FormMessage";const XW=v.forwardRef((({...e},t)=>{const{name:n}=bd();return G.jsx(R$,{ref:t,name:n,...e})}));XW.displayName="FormSelect";const JW=v.forwardRef((({className:e,children:t,...n},r)=>{const{formItemId:o}=bd();return G.jsx(QN,{ref:r,id:o,className:e,...n,children:t})}));JW.displayName="FormSelectTrigger";const ZW=v.forwardRef(((e,t)=>G.jsx(T$,{ref:t,...e})));ZW.displayName="FormSelectContent";const eq=v.forwardRef(((e,t)=>G.jsx(JN,{ref:t,...e})));eq.displayName="FormSelectItem";const tq=v.forwardRef(((e,t)=>G.jsx(KN,{ref:t,...e})));tq.displayName="FormSelectGroup";const nq=v.forwardRef(((e,t)=>G.jsx(XN,{ref:t,...e})));nq.displayName="FormSelectLabel";const rq=v.forwardRef(((e,t)=>G.jsx(ZN,{ref:t,...e})));rq.displayName="FormSelectSeparator";const oq=v.forwardRef(((e,t)=>G.jsx(YN,{ref:t,...e})));function jf(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function nk(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>v.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return v.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=v.createContext(r),a=n.length;function i(t){const{scope:n,children:r,...i}=t,s=(null==n?void 0:n[e][a])||o,u=v.useMemo((()=>i),Object.values(i));return v.createElement(s.Provider,{value:u},r)}return n=[...n,r],i.displayName=t+"Provider",[i,function(n,i){const s=(null==i?void 0:i[e][a])||o,u=v.useContext(s);if(u)return u;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},iq(r,...t)]}function iq(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return v.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}function Ky(e){const t=v.useRef(e);return v.useEffect((()=>{t.current=e})),v.useMemo((()=>(...e)=>{var n;return null===(n=t.current)||void 0===n?void 0:n.call(t,...e)}),[])}function aq(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function sq(...e){return t=>e.forEach((e=>aq(e,t)))}function uq(...e){return v.useCallback(sq(...e),e)}function ip(e){return e.split("-")[0]}function jv(e){return e.split("-")[1]}function Hm(e){return["top","bottom"].includes(ip(e))?"x":"y"}function O$(e){return"y"===e?"height":"width"}function YT(e,t,n){let{reference:r,floating:o}=e;const a=r.x+r.width/2-o.width/2,i=r.y+r.height/2-o.height/2,s=Hm(t),u=O$(s),l=r[u]/2-o[u]/2,c="x"===s;let d;switch(ip(t)){case"top":d={x:a,y:r.y-o.height};break;case"bottom":d={x:a,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:i};break;case"left":d={x:r.x-o.width,y:i};break;default:d={x:r.x,y:r.y}}switch(jv(t)){case"start":d[s]-=l*(n&&c?-1:1);break;case"end":d[s]+=l*(n&&c?-1:1)}return d}oq.displayName="FormSelectValue";const lq=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:i}=n,s=await(null==i.isRTL?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:l,y:c}=YT(u,r,s),d=r,f={},p=0;for(let n=0;n<a.length;n++){const{name:m,fn:v}=a[n],{x:h,y:g,data:y,reset:b}=await v({x:l,y:c,initialPlacement:r,placement:d,strategy:o,middlewareData:f,rects:u,platform:i,elements:{reference:e,floating:t}});l=h??l,c=g??c,f={...f,[m]:{...f[m],...y}},b&&p<=50&&(p++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(u=!0===b.rects?await i.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:l,y:c}=YT(u,d,s))),n=-1)}return{x:l,y:c,placement:d,strategy:o,middlewareData:f}};function rk(e){return"number"!=typeof e?(t=e,{top:0,right:0,bottom:0,left:0,...t}):{top:e,right:e,bottom:e,left:e};var t}function oy(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function xv(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:a,rects:i,elements:s,strategy:u}=e,{boundary:l="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=t,m=rk(p),v=s[f?"floating"===d?"reference":"floating":d],h=oy(await a.getClippingRect({element:null==(n=await(null==a.isElement?void 0:a.isElement(v)))||n?v:v.contextElement||await(null==a.getDocumentElement?void 0:a.getDocumentElement(s.floating)),boundary:l,rootBoundary:c,strategy:u})),g=oy(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({rect:"floating"===d?{...i.floating,x:r,y:o}:i.reference,offsetParent:await(null==a.getOffsetParent?void 0:a.getOffsetParent(s.floating)),strategy:u}):i[d]);return{top:h.top-g.top+m.top,bottom:g.bottom-h.bottom+m.bottom,left:h.left-g.left+m.left,right:g.right-h.right+m.right}}const cq=Math.min,Df=Math.max;function YS(e,t,n){return Df(e,cq(t,n))}const QT=e=>({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e??{},{x:o,y:a,placement:i,rects:s,platform:u}=t;if(null==n)return{};const l=rk(r),c={x:o,y:a},d=Hm(i),f=jv(i),p=O$(d),m=await u.getDimensions(n),v="y"===d?"top":"left",h="y"===d?"bottom":"right",g=s.reference[p]+s.reference[d]-c[d]-s.floating[p],y=c[d]-s.reference[d],b=await(null==u.getOffsetParent?void 0:u.getOffsetParent(n));let w=b?"y"===d?b.clientHeight||0:b.clientWidth||0:0;0===w&&(w=s.floating[p]);const x=g/2-y/2,_=l[v],E=w-m[p]-l[h],S=w/2-m[p]/2+x,I=YS(_,S,E),A=("start"===f?l[v]:l[h])>0&&S!==I&&s.reference[p]<=s.floating[p];return{[d]:c[d]-(A?S<_?_-S:E-S:0),data:{[d]:I,centerOffset:S-I}}}}),dq={left:"right",right:"left",bottom:"top",top:"bottom"};function iy(e){return e.replace(/left|right|bottom|top/g,(e=>dq[e]))}function fq(e,t,n){void 0===n&&(n=!1);const r=jv(e),o=Hm(e),a=O$(o);let i="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=iy(i)),{main:i,cross:iy(i)}}const pq={start:"end",end:"start"};function XT(e){return e.replace(/start|end/g,(e=>pq[e]))}const ok=["top","right","bottom","left"];ok.reduce(((e,t)=>e.concat(t,t+"-start",t+"-end")),[]);const mq=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:o,rects:a,initialPlacement:i,platform:s,elements:u}=t,{mainAxis:l=!0,crossAxis:c=!0,fallbackPlacements:d,fallbackStrategy:f="bestFit",flipAlignment:p=!0,...m}=e,v=ip(r),h=[i,...d||(v!==i&&p?function(e){const t=iy(e);return[XT(e),t,XT(t)]}(i):[iy(i)])],g=await xv(t,m),y=[];let b=(null==(n=o.flip)?void 0:n.overflows)||[];if(l&&y.push(g[v]),c){const{main:e,cross:t}=fq(r,a,await(null==s.isRTL?void 0:s.isRTL(u.floating)));y.push(g[e],g[t])}if(b=[...b,{placement:r,overflows:y}],!y.every((e=>e<=0))){var w,x;const e=(null!=(w=null==(x=o.flip)?void 0:x.index)?w:0)+1,t=h[e];if(t)return{data:{index:e,overflows:b},reset:{placement:t}};let n="bottom";switch(f){case"bestFit":{var _;const e=null==(_=b.map((e=>[e,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:_[0].placement;e&&(n=e);break}case"initialPlacement":n=i}if(r!==n)return{reset:{placement:n}}}return{}}}};function JT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ZT(e){return ok.some((t=>e[t]>=0))}const hq=function(e){let{strategy:t="referenceHidden",...n}=void 0===e?{}:e;return{name:"hide",async fn(e){const{rects:r}=e;switch(t){case"referenceHidden":{const t=JT(await xv(e,{...n,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:ZT(t)}}}case"escaped":{const t=JT(await xv(e,{...n,altBoundary:!0}),r.floating);return{data:{escapedOffsets:t,escaped:ZT(t)}}}default:return{}}}}},vq=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await async function(e,t){const{placement:n,platform:r,elements:o}=e,a=await(null==r.isRTL?void 0:r.isRTL(o.floating)),i=ip(n),s=jv(n),u="x"===Hm(n),l=["left","top"].includes(i)?-1:1,c=a&&u?-1:1,d="function"==typeof t?t(e):t;let{mainAxis:f,crossAxis:p,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&"number"==typeof m&&(p="end"===s?-1*m:m),u?{x:p*c,y:f*l}:{x:f*l,y:p*c}}(t,e);return{x:n+o.x,y:r+o.y,data:o}}}};function ik(e){return"x"===e?"y":"x"}const gq=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...u}=e,l={x:n,y:r},c=await xv(t,u),d=Hm(ip(o)),f=ik(d);let p=l[d],m=l[f];if(a){const e="y"===d?"bottom":"right";p=YS(p+c["y"===d?"top":"left"],p,p-c[e])}if(i){const e="y"===f?"bottom":"right";m=YS(m+c["y"===f?"top":"left"],m,m-c[e])}const v=s.fn({...t,[d]:p,[f]:m});return{...v,data:{x:v.x-n,y:v.y-r}}}}},yq=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:i}=t,{offset:s=0,mainAxis:u=!0,crossAxis:l=!0}=e,c={x:n,y:r},d=Hm(o),f=ik(d);let p=c[d],m=c[f];const v="function"==typeof s?s({...a,placement:o}):s,h="number"==typeof v?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(u){const e="y"===d?"height":"width",t=a.reference[d]-a.floating[e]+h.mainAxis,n=a.reference[d]+a.reference[e]-h.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){var g,y,b,w;const e="y"===d?"width":"height",t=["top","left"].includes(ip(o)),n=a.reference[f]-a.floating[e]+(t&&null!=(g=null==(y=i.offset)?void 0:y[f])?g:0)+(t?0:h.crossAxis),r=a.reference[f]+a.reference[e]+(t?0:null!=(b=null==(w=i.offset)?void 0:w[f])?b:0)-(t?h.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[d]:p,[f]:m}}}},wq=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:a}=t,{apply:i,...s}=e,u=await xv(t,s),l=ip(n),c=jv(n);let d,f;"top"===l||"bottom"===l?(d=l,f=c===(await(null==o.isRTL?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(f=l,d="end"===c?"top":"bottom");const p=Df(u.left,0),m=Df(u.right,0),v=Df(u.top,0),h=Df(u.bottom,0),g={availableHeight:r.floating.height-(["left","right"].includes(n)?2*(0!==v||0!==h?v+h:Df(u.top,u.bottom)):u[d]),availableWidth:r.floating.width-(["top","bottom"].includes(n)?2*(0!==p||0!==m?p+m:Df(u.left,u.right)):u[f])},y=await o.getDimensions(a.floating);null==i||i({...t,...g});const b=await o.getDimensions(a.floating);return y.width!==b.width||y.height!==b.height?{reset:{rects:!0}}:{}}}};function ak(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Pl(e){if(null==e)return window;if(!ak(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function zv(e){return Pl(e).getComputedStyle(e)}function _l(e){return ak(e)?"":e?(e.nodeName||"").toLowerCase():""}function sk(){const e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((e=>e.brand+"/"+e.version)).join(" "):navigator.userAgent}function hu(e){return e instanceof Pl(e).HTMLElement}function gd(e){return e instanceof Pl(e).Element}function A$(e){return!(typeof ShadowRoot>"u")&&(e instanceof Pl(e).ShadowRoot||e instanceof ShadowRoot)}function Yy(e){const{overflow:t,overflowX:n,overflowY:r}=zv(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function bq(e){return["table","td","th"].includes(_l(e))}function eO(e){const t=/firefox/i.test(sk()),n=zv(e);return"none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||["transform","perspective"].includes(n.willChange)||t&&"filter"===n.willChange||t&&!!n.filter&&"none"!==n.filter}function uk(){return!/^((?!chrome|android).)*safari/i.test(sk())}const tO=Math.min,sv=Math.max,ay=Math.round;function xl(e,t,n){var r,o,a,i;void 0===t&&(t=!1),void 0===n&&(n=!1);const s=e.getBoundingClientRect();let u=1,l=1;t&&hu(e)&&(u=e.offsetWidth>0&&ay(s.width)/e.offsetWidth||1,l=e.offsetHeight>0&&ay(s.height)/e.offsetHeight||1);const c=gd(e)?Pl(e):window,d=!uk()&&n,f=(s.left+(d&&null!=(r=null==(o=c.visualViewport)?void 0:o.offsetLeft)?r:0))/u,p=(s.top+(d&&null!=(a=null==(i=c.visualViewport)?void 0:i.offsetTop)?a:0))/l,m=s.width/u,v=s.height/l;return{width:m,height:v,top:p,right:f+m,bottom:p+v,left:f,x:f,y:p}}function ud(e){return(t=e,(t instanceof Pl(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function Qy(e){return gd(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function lk(e){return xl(ud(e)).left+Qy(e).scrollLeft}function _q(e,t,n){const r=hu(t),o=ud(t),a=xl(e,r&&function(e){const t=xl(e);return ay(t.width)!==e.offsetWidth||ay(t.height)!==e.offsetHeight}(t),"fixed"===n);let i={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&"fixed"!==n)if(("body"!==_l(t)||Yy(o))&&(i=Qy(t)),hu(t)){const e=xl(t,!0);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&(s.x=lk(o));return{x:a.left+i.scrollLeft-s.x,y:a.top+i.scrollTop-s.y,width:a.width,height:a.height}}function ck(e){return"html"===_l(e)?e:e.assignedSlot||e.parentNode||(A$(e)?e.host:null)||ud(e)}function nO(e){return hu(e)&&"fixed"!==getComputedStyle(e).position?e.offsetParent:null}function QS(e){const t=Pl(e);let n=nO(e);for(;n&&bq(n)&&"static"===getComputedStyle(n).position;)n=nO(n);return n&&("html"===_l(n)||"body"===_l(n)&&"static"===getComputedStyle(n).position&&!eO(n))?t:n||function(e){let t=ck(e);for(A$(t)&&(t=t.host);hu(t)&&!["html","body"].includes(_l(t));){if(eO(t))return t;t=t.parentNode}return null}(e)||t}function rO(e){if(hu(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=xl(e);return{width:t.width,height:t.height}}function dk(e){const t=ck(e);return["html","body","#document"].includes(_l(t))?e.ownerDocument.body:hu(t)&&Yy(t)?t:dk(t)}function sy(e,t){var n;void 0===t&&(t=[]);const r=dk(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),a=Pl(r),i=o?[a].concat(a.visualViewport||[],Yy(r)?r:[]):r,s=t.concat(i);return o?s:s.concat(sy(i))}function oO(e,t,n){return"viewport"===t?oy(function(e,t){const n=Pl(e),r=ud(e),o=n.visualViewport;let a=r.clientWidth,i=r.clientHeight,s=0,u=0;if(o){a=o.width,i=o.height;const e=uk();(e||!e&&"fixed"===t)&&(s=o.offsetLeft,u=o.offsetTop)}return{width:a,height:i,x:s,y:u}}(e,n)):gd(t)?function(e,t){const n=xl(e,!1,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft;return{top:r,left:o,x:o,y:r,right:o+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}(t,n):oy(function(e){var t;const n=ud(e),r=Qy(e),o=null==(t=e.ownerDocument)?void 0:t.body,a=sv(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),i=sv(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0);let s=-r.scrollLeft+lk(e);const u=-r.scrollTop;return"rtl"===zv(o||n).direction&&(s+=sv(n.clientWidth,o?o.clientWidth:0)-a),{width:a,height:i,x:s,y:u}}(ud(e)))}function xq(e){const t=sy(e),n=["absolute","fixed"].includes(zv(e).position)&&hu(e)?QS(e):e;return gd(n)?t.filter((e=>gd(e)&&function(e,t){const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&A$(n)){let n=t;do{if(n&&e===n)return!0;n=n.parentNode||n.host}while(n)}return!1}(e,n)&&"body"!==_l(e))):[]}const Sq={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[..."clippingAncestors"===n?xq(t):[].concat(n),r],i=a[0],s=a.reduce(((e,n)=>{const r=oO(t,n,o);return e.top=sv(r.top,e.top),e.right=tO(r.right,e.right),e.bottom=tO(r.bottom,e.bottom),e.left=sv(r.left,e.left),e}),oO(t,i,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=hu(n),a=ud(n);if(n===a)return t;let i={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((o||!o&&"fixed"!==r)&&(("body"!==_l(n)||Yy(a))&&(i=Qy(n)),hu(n))){const e=xl(n,!0);s.x=e.x+n.clientLeft,s.y=e.y+n.clientTop}return{...t,x:t.x-i.scrollLeft+s.x,y:t.y-i.scrollTop+s.y}},isElement:gd,getDimensions:rO,getOffsetParent:QS,getDocumentElement:ud,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:_q(t,QS(n),r),floating:{...rO(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===zv(e).direction};function Eq(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i=!0,animationFrame:s=!1}=r,u=o&&!s,l=a&&!s,c=u||l?[...gd(e)?sy(e):[],...sy(t)]:[];c.forEach((e=>{u&&e.addEventListener("scroll",n,{passive:!0}),l&&e.addEventListener("resize",n)}));let d,f=null;if(i){let r=!0;f=new ResizeObserver((()=>{r||n(),r=!1})),gd(e)&&!s&&f.observe(e),f.observe(t)}let p=s?xl(e):null;return s&&function t(){const r=xl(e);!p||r.x===p.x&&r.y===p.y&&r.width===p.width&&r.height===p.height||n(),p=r,d=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach((e=>{u&&e.removeEventListener("scroll",n),l&&e.removeEventListener("resize",n)})),null==(e=f)||e.disconnect(),f=null,s&&cancelAnimationFrame(d)}}const $q=(e,t,n)=>lq(e,t,{platform:Sq,...n});var XS=typeof document<"u"?v.useLayoutEffect:v.useEffect;function JS(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;0!=r--;)if(!JS(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||JS(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function Cq(e){const t=v.useRef(e);return XS((()=>{t.current=e})),t}function Iq(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:o}=void 0===e?{}:e;const a=v.useRef(null),i=v.useRef(null),s=Cq(o),u=v.useRef(null),[l,c]=v.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[d,f]=v.useState(t);JS(null==d?void 0:d.map((e=>{let{options:t}=e;return t})),null==t?void 0:t.map((e=>{let{options:t}=e;return t})))||f(t);const p=v.useCallback((()=>{!a.current||!i.current||$q(a.current,i.current,{middleware:d,placement:n,strategy:r}).then((e=>{m.current&&vu.flushSync((()=>{c(e)}))}))}),[d,n,r]);XS((()=>{m.current&&p()}),[p]);const m=v.useRef(!1);XS((()=>(m.current=!0,()=>{m.current=!1})),[]);const h=v.useCallback((()=>{if("function"==typeof u.current&&(u.current(),u.current=null),a.current&&i.current)if(s.current){const e=s.current(a.current,i.current,p);u.current=e}else p()}),[p,s]),g=v.useCallback((e=>{a.current=e,h()}),[h]),y=v.useCallback((e=>{i.current=e,h()}),[h]),b=v.useMemo((()=>({reference:a,floating:i})),[]);return v.useMemo((()=>({...l,update:p,refs:b,reference:g,floating:y})),[l,p,b,g,y])}const Rq=e=>{const{element:t,padding:n}=e;return{name:"arrow",options:e,fn:e=>function(e){return Object.prototype.hasOwnProperty.call(e,"current")}(t)?null!=t.current?QT({element:t.current,padding:n}).fn(e):{}:t?QT({element:t,padding:n}).fn(e):{}}};function Pq(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function Tq(...e){return t=>e.forEach((e=>Pq(e,t)))}const fk=v.forwardRef(((e,t)=>{const{children:n,...r}=e,o=v.Children.toArray(n),a=o.find(Aq);if(a){const e=a.props.children,n=o.map((t=>t===a?v.Children.count(e)>1?v.Children.only(null):v.isValidElement(e)?e.props.children:null:t));return v.createElement(ZS,Pe({},r,{ref:t}),v.isValidElement(e)?v.cloneElement(e,void 0,n):null)}return v.createElement(ZS,Pe({},r,{ref:t}),n)}));fk.displayName="Slot";const ZS=v.forwardRef(((e,t)=>{const{children:n,...r}=e;return v.isValidElement(n)?v.cloneElement(n,{...Mq(r,n.props),ref:Tq(t,n.ref)}):v.Children.count(n)>1?v.Children.only(null):null}));ZS.displayName="SlotClone";const Oq=({children:e})=>v.createElement(v.Fragment,null,e);function Aq(e){return v.isValidElement(e)&&e.type===Oq}function Mq(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{a(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}const Dq=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],eE=Dq.reduce(((e,t)=>{const n=v.forwardRef(((e,n)=>{const{asChild:r,...o}=e,a=r?fk:t;return v.useEffect((()=>{window[Symbol.for("radix-ui")]=!0}),[]),v.createElement(a,Pe({},o,{ref:n}))}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});function Nq(e,t){e&&vu.flushSync((()=>e.dispatchEvent(t)))}function kq(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function Lq(...e){return t=>e.forEach((e=>kq(e,t)))}function Fq(...e){return v.useCallback(Lq(...e),e)}const Lf=null!=globalThis&&globalThis.document?v.useLayoutEffect:()=>{};function Bq(e){const[t,n]=v.useState(void 0);return Lf((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t)||!t.length)return;const r=t[0];let o,a;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,a=t.blockSize}else o=e.offsetWidth,a=e.offsetHeight;n({width:o,height:a})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}const pk="Popper",[M$,mk]=nk(pk),[cZ,jq]=M$(pk),uy="PopperContent",[zq,dZ]=M$(uy),[Vq,Uq]=M$(uy,{hasParent:!1,positionUpdateFns:new Set}),Wq=v.forwardRef(((e,t)=>{var n,r,o,a,i,s,u,l;const{__scopePopper:c,side:d="bottom",sideOffset:f=0,align:p="center",alignOffset:m=0,arrowPadding:h=0,collisionBoundary:g=[],collisionPadding:y=0,sticky:b="partial",hideWhenDetached:w=!1,avoidCollisions:x=!0,onPlaced:_,...E}=e,S=jq(uy,c),[I,A]=v.useState(null),k=Fq(t,(e=>A(e))),[C,P]=v.useState(null),R=Bq(C),O=null!==(n=null==R?void 0:R.width)&&void 0!==n?n:0,T=null!==(r=null==R?void 0:R.height)&&void 0!==r?r:0,N=d+("center"!==p?"-"+p:""),M="number"==typeof y?y:{top:0,right:0,bottom:0,left:0,...y},j=Array.isArray(g)?g:[g],D=j.length>0,q={padding:M,boundary:j.filter(Gq),altBoundary:D},{reference:z,floating:L,strategy:$,x:V,y:B,placement:F,middlewareData:U,update:G}=Iq({strategy:"fixed",placement:N,whileElementsMounted:Eq,middleware:[Hq(),vq({mainAxis:f+T,alignmentAxis:m}),x?gq({mainAxis:!0,crossAxis:!1,limiter:"partial"===b?yq():void 0,...q}):void 0,C?Rq({element:C,padding:h}):void 0,x?mq({...q}):void 0,wq({...q,apply:({elements:e,availableWidth:t,availableHeight:n})=>{e.floating.style.setProperty("--radix-popper-available-width",`${t}px`),e.floating.style.setProperty("--radix-popper-available-height",`${n}px`)}}),Kq({arrowWidth:O,arrowHeight:T}),w?hq({strategy:"referenceHidden"}):void 0].filter(qq)});Lf((()=>{z(S.anchor)}),[z,S.anchor]);const W=null!==V&&null!==B,[H,Q]=hk(F),K=Ky(_);Lf((()=>{W&&(null==K||K())}),[W,K]);const Y=null===(o=U.arrow)||void 0===o?void 0:o.x,J=null===(a=U.arrow)||void 0===a?void 0:a.y,X=0!==(null===(i=U.arrow)||void 0===i?void 0:i.centerOffset),[Z,ee]=v.useState();Lf((()=>{I&&ee(window.getComputedStyle(I).zIndex)}),[I]);const{hasParent:te,positionUpdateFns:ne}=Uq(uy,c),re=!te;v.useLayoutEffect((()=>{if(!re)return ne.add(G),()=>{ne.delete(G)}}),[re,ne,G]),Lf((()=>{re&&W&&Array.from(ne).reverse().forEach((e=>requestAnimationFrame(e)))}),[re,W,ne]);const oe={"data-side":H,"data-align":Q,...E,ref:k,style:{...E.style,animation:W?void 0:"none",opacity:null!==(s=U.hide)&&void 0!==s&&s.referenceHidden?0:void 0}};return v.createElement("div",{ref:L,"data-radix-popper-content-wrapper":"",style:{position:$,left:0,top:0,transform:W?`translate3d(${Math.round(V)}px, ${Math.round(B)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:Z,"--radix-popper-transform-origin":[null===(u=U.transformOrigin)||void 0===u?void 0:u.x,null===(l=U.transformOrigin)||void 0===l?void 0:l.y].join(" ")},dir:e.dir},v.createElement(zq,{scope:c,placedSide:H,onArrowChange:P,arrowX:Y,arrowY:J,shouldHideArrow:X},re?v.createElement(Vq,{scope:c,hasParent:!0,positionUpdateFns:ne},v.createElement(eE.div,oe)):v.createElement(eE.div,oe)))}));function qq(e){return void 0!==e}function Gq(e){return null!==e}const Hq=()=>({name:"anchorCssProperties",fn(e){const{rects:t,elements:n}=e,{width:r,height:o}=t.reference;return n.floating.style.setProperty("--radix-popper-anchor-width",`${r}px`),n.floating.style.setProperty("--radix-popper-anchor-height",`${o}px`),{}}}),Kq=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,a,i;const{placement:s,rects:u,middlewareData:l}=t,c=0!==(null===(n=l.arrow)||void 0===n?void 0:n.centerOffset),d=c?0:e.arrowWidth,f=c?0:e.arrowHeight,[p,m]=hk(s),v={start:"0%",center:"50%",end:"100%"}[m],h=(null!==(r=null===(o=l.arrow)||void 0===o?void 0:o.x)&&void 0!==r?r:0)+d/2,g=(null!==(a=null===(i=l.arrow)||void 0===i?void 0:i.y)&&void 0!==a?a:0)+f/2;let y="",b="";return"bottom"===p?(y=c?v:`${h}px`,b=-f+"px"):"top"===p?(y=c?v:`${h}px`,b=`${u.floating.height+f}px`):"right"===p?(y=-f+"px",b=c?v:`${g}px`):"left"===p&&(y=`${u.floating.width+f}px`,b=c?v:`${g}px`),{data:{x:y,y:b}}}});function hk(e){const[t,n="center"]=e.split("-");return[t,n]}const Yq=Wq;function Qq(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function Xq(...e){return t=>e.forEach((e=>Qq(e,t)))}function Jq(...e){return v.useCallback(Xq(...e),e)}function Zq(e,t){return v.useReducer(((e,n)=>t[e][n]??e),e)}const vk=e=>{const{present:t,children:n}=e,r=eG(t),o="function"==typeof n?n({present:r.isPresent}):v.Children.only(n),a=Jq(r.ref,o.ref);return"function"==typeof n||r.isPresent?v.cloneElement(o,{ref:a}):null};function eG(e){const[t,n]=v.useState(),r=v.useRef({}),o=v.useRef(e),a=v.useRef("none"),i=e?"mounted":"unmounted",[s,u]=Zq(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect((()=>{const e=Dg(r.current);a.current="mounted"===s?e:"none"}),[s]),Lf((()=>{const t=r.current,n=o.current;if(n!==e){const r=a.current,i=Dg(t);e?u("MOUNT"):"none"===i||"none"===(null==t?void 0:t.display)?u("UNMOUNT"):u(n&&r!==i?"ANIMATION_OUT":"UNMOUNT"),o.current=e}}),[e,u]),Lf((()=>{if(t){const e=e=>{const n=Dg(r.current).includes(e.animationName);e.target===t&&n&&vu.flushSync((()=>u("ANIMATION_END")))},n=e=>{e.target===t&&(a.current=Dg(r.current))};return t.addEventListener("animationstart",n),t.addEventListener("animationcancel",e),t.addEventListener("animationend",e),()=>{t.removeEventListener("animationstart",n),t.removeEventListener("animationcancel",e),t.removeEventListener("animationend",e)}}u("ANIMATION_END")}),[t,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:v.useCallback((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}function Dg(e){return(null==e?void 0:e.animationName)||"none"}function tG(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function nG(...e){return t=>e.forEach((e=>tG(e,t)))}function rG(...e){return v.useCallback(nG(...e),e)}function oG(e,t=(null==globalThis?void 0:globalThis.document)){const n=Ky(e);v.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e),()=>t.removeEventListener("keydown",e)}),[n,t])}vk.displayName="Presence";const tE="dismissableLayer.update",iG="dismissableLayer.pointerDownOutside",aG="dismissableLayer.focusOutside";let iO;const sG=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),uG=v.forwardRef(((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:s,onDismiss:u,...l}=e,c=v.useContext(sG),[d,f]=v.useState(null),p=null!==(n=null==d?void 0:d.ownerDocument)&&void 0!==n?n:null==globalThis?void 0:globalThis.document,[,m]=v.useState({}),h=rG(t,(e=>f(e))),g=Array.from(c.layers),[y]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),b=g.indexOf(y),w=d?g.indexOf(d):-1,x=c.layersWithOutsidePointerEventsDisabled.size>0,_=w>=b,E=lG((e=>{const t=e.target,n=[...c.branches].some((e=>e.contains(t)));!_||n||(null==a||a(e),null==s||s(e),e.defaultPrevented||null==u||u())}),p),S=cG((e=>{const t=e.target;[...c.branches].some((e=>e.contains(t)))||(null==i||i(e),null==s||s(e),e.defaultPrevented||null==u||u())}),p);return oG((e=>{w===c.layers.size-1&&(null==o||o(e),!e.defaultPrevented&&u&&(e.preventDefault(),u()))}),p),v.useEffect((()=>{if(d)return r&&(0===c.layersWithOutsidePointerEventsDisabled.size&&(iO=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),aO(),()=>{r&&1===c.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=iO)}}),[d,p,r,c]),v.useEffect((()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),aO())}),[d,c]),v.useEffect((()=>{const e=()=>m({});return document.addEventListener(tE,e),()=>document.removeEventListener(tE,e)}),[]),v.createElement(eE.div,Pe({},l,{ref:h,style:{pointerEvents:x?_?"auto":"none":void 0,...e.style},onFocusCapture:jf(e.onFocusCapture,S.onFocusCapture),onBlurCapture:jf(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:jf(e.onPointerDownCapture,E.onPointerDownCapture)}))}));function lG(e,t=(null==globalThis?void 0:globalThis.document)){const n=Ky(e),r=v.useRef(!1),o=v.useRef((()=>{}));return v.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){gk(iG,n,a,{discrete:!0})};const a={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}r.current=!1},a=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}function cG(e,t=(null==globalThis?void 0:globalThis.document)){const n=Ky(e),r=v.useRef(!1);return v.useEffect((()=>{const e=e=>{e.target&&!r.current&&gk(aG,n,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function aO(){const e=new CustomEvent(tE);document.dispatchEvent(e)}function gk(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Nq(o,a):o.dispatchEvent(a)}let Sx;const yk="HoverCard",[wk,fZ]=nk(yk,[mk]),dG=mk(),[pZ,bk]=wk(yk),fG="HoverCardPortal",[mZ,pG]=wk(fG,{forceMount:void 0}),nE="HoverCardContent",mG=v.forwardRef(((e,t)=>{const n=pG(nE,e.__scopeHoverCard),{forceMount:r=n.forceMount,...o}=e,a=bk(nE,e.__scopeHoverCard);return v.createElement(vk,{present:r||a.open},v.createElement(hG,Pe({"data-state":a.open?"open":"closed"},o,{onPointerEnter:jf(e.onPointerEnter,sO(a.onOpen)),onPointerLeave:jf(e.onPointerLeave,sO(a.onClose)),ref:t})))})),hG=v.forwardRef(((e,t)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,...s}=e,u=bk(nE,n),l=dG(n),c=v.useRef(null),d=uq(t,c),[f,p]=v.useState(!1);return v.useEffect((()=>{if(f){const e=document.body;return Sx=e.style.userSelect||e.style.webkitUserSelect,e.style.userSelect="none",e.style.webkitUserSelect="none",()=>{e.style.userSelect=Sx,e.style.webkitUserSelect=Sx}}}),[f]),v.useEffect((()=>{if(c.current){const e=()=>{p(!1),u.isPointerDownOnContentRef.current=!1,setTimeout((()=>{var e;""!==(null===(e=document.getSelection())||void 0===e?void 0:e.toString())&&(u.hasSelectionRef.current=!0)}))};return document.addEventListener("pointerup",e),()=>{document.removeEventListener("pointerup",e),u.hasSelectionRef.current=!1,u.isPointerDownOnContentRef.current=!1}}}),[u.isPointerDownOnContentRef,u.hasSelectionRef]),v.useEffect((()=>{c.current&&vG(c.current).forEach((e=>e.setAttribute("tabindex","-1")))})),v.createElement(uG,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:i,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:jf(a,(e=>{e.preventDefault()})),onDismiss:u.onDismiss},v.createElement(Yq,Pe({},l,s,{onPointerDown:jf(s.onPointerDown,(e=>{e.currentTarget.contains(e.target)&&p(!0),u.hasSelectionRef.current=!1,u.isPointerDownOnContentRef.current=!0})),ref:d,style:{...s.style,userSelect:f?"text":void 0,WebkitUserSelect:f?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})))}));function sO(e){return t=>"touch"===t.pointerType?void 0:e()}function vG(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}const _k=mG,gG=v.forwardRef((({className:e,align:t="center",sideOffset:n=4,...r},o)=>G.jsx(_k,{ref:o,align:t,sideOffset:n,className:_e("z-50 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})));gG.displayName=_k.displayName;const xk=v.forwardRef((({className:e,type:t,...n},r)=>{const{error:o}=bd();return G.jsx("input",{type:t,title:n.disabled?"Disabled":"",className:_e("flex w-full rounded-m px-s py-3.5 text-base text-gray-900 outline outline-1 outline-input ring-offset-background transition-all duration-200 ease-in-out file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-base placeholder:text-gray-400 placeholder:text-muted-foreground focus-visible:bg-gray-50 focus-visible:text-gray-900 focus-visible:outline-2 focus-visible:outline-blue_120 enabled:hover:outline-2 enabled:hover:outline-gray-400 disabled:bg-transparent disabled:text-gray-300 disabled:outline-gray-200 disabled:ring-0 disabled:ring-transparent disabled:placeholder:text-gray-300",{"bg-red_30_17 outline-red-dark":!!o},e),ref:r,...n})}));function yG(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>v.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return v.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=v.createContext(r),a=n.length;n=[...n,r];const i=t=>{var n;const{scope:r,children:i,...s}=t,u=(null==(n=null==r?void 0:r[e])?void 0:n[a])||o,l=v.useMemo((()=>s),Object.values(s));return G.jsx(u.Provider,{value:l,children:i})};return i.displayName=t+"Provider",[i,function(n,i){var s;const u=(null==(s=null==i?void 0:i[e])?void 0:s[a])||o,l=v.useContext(u);if(l)return l;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},wG(r,...t)]}function wG(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return v.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}function uO(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function bG(...e){return t=>{let n=!1;const r=e.map((e=>{const r=uO(e,t);return!n&&"function"==typeof r&&(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():uO(e[t],null)}}}}function _G(e){const t=xG(e),n=v.forwardRef(((e,n)=>{const{children:r,...o}=e,a=v.Children.toArray(r),i=a.find(EG);if(i){const e=i.props.children,r=a.map((t=>t===i?v.Children.count(e)>1?v.Children.only(null):v.isValidElement(e)?e.props.children:null:t));return G.jsx(t,{...o,ref:n,children:v.isValidElement(e)?v.cloneElement(e,void 0,r):null})}return G.jsx(t,{...o,ref:n,children:r})}));return n.displayName=`${e}.Slot`,n}function xG(e){const t=v.forwardRef(((e,t)=>{const{children:n,...r}=e;if(v.isValidElement(n)){const e=CG(n),o=$G(r,n.props);return n.type!==v.Fragment&&(o.ref=t?bG(t,e):e),v.cloneElement(n,o)}return v.Children.count(n)>1?v.Children.only(null):null}));return t.displayName=`${e}.SlotClone`,t}xk.displayName="Input";var SG=Symbol("radix.slottable");function EG(e){return v.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===SG}function $G(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{const t=a(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function CG(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?e.ref:(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var IG=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Sk=IG.reduce(((e,t)=>{const n=_G(`Primitive.${t}`),r=v.forwardRef(((e,r)=>{const{asChild:o,...a}=e,i=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),G.jsx(i,{...a,ref:r})}));return r.displayName=`Primitive.${t}`,{...e,[t]:r}}),{}),D$="Progress",N$=100,[RG,hZ]=yG(D$),[PG,TG]=RG(D$),Ek=v.forwardRef(((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:a=OG,...i}=e;(o||0===o)&&!lO(o)&&console.error(AG(`${o}`,"Progress"));const s=lO(o)?o:N$;null!==r&&!cO(r,s)&&console.error(MG(`${r}`,"Progress"));const u=cO(r,s)?r:null,l=ly(u)?a(u,s):void 0;return G.jsx(PG,{scope:n,value:u,max:s,children:G.jsx(Sk.div,{"aria-valuemax":s,"aria-valuemin":0,"aria-valuenow":ly(u)?u:void 0,"aria-valuetext":l,role:"progressbar","data-state":Ik(u,s),"data-value":u??void 0,"data-max":s,...i,ref:t})})}));Ek.displayName=D$;var $k="ProgressIndicator",Ck=v.forwardRef(((e,t)=>{const{__scopeProgress:n,...r}=e,o=TG($k,n);return G.jsx(Sk.div,{"data-state":Ik(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})}));function OG(e,t){return`${Math.round(e/t*100)}%`}function Ik(e,t){return null==e?"indeterminate":e===t?"complete":"loading"}function ly(e){return"number"==typeof e}function lO(e){return ly(e)&&!isNaN(e)&&e>0}function cO(e,t){return ly(e)&&!isNaN(e)&&e<=t&&e>=0}function AG(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${N$}\`.`}function MG(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:\n - a positive number\n - less than the value passed to \`max\` (or ${N$} if no \`max\` prop is set)\n - \`null\` or \`undefined\` if the progress is indeterminate.\n\nDefaulting to \`null\`.`}Ck.displayName=$k;var Rk=Ek,DG=Ck;const NG=v.forwardRef((({className:e,value:t,indicatorClassName:n,...r},o)=>G.jsx(Rk,{ref:o,className:_e("relative h-[7px] w-full overflow-hidden rounded-full bg-blue_10",e),...r,children:G.jsx(DG,{className:_e("h-full w-full flex-1 rounded-full bg-blue_100 transition-all",n),style:{transform:`translateX(-${100-(t||0)}%)`}})})));NG.displayName=Rk.displayName;const Pk="Radio",[kG,Tk]=ni(Pk),[LG,FG]=kG(Pk),BG=v.forwardRef(((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:a,disabled:i,value:s="on",onCheck:u,...l}=e,[c,d]=v.useState(null),f=Vt(t,(e=>d(e))),p=v.useRef(!1),m=!c||!!c.closest("form");return v.createElement(LG,{scope:n,checked:o,disabled:i},v.createElement(lt.button,Pe({type:"button",role:"radio","aria-checked":o,"data-state":Ok(o),"data-disabled":i?"":void 0,disabled:i,value:s},l,{ref:f,onClick:et(e.onClick,(e=>{o||null==u||u(),m&&(p.current=e.isPropagationStopped(),p.current||e.stopPropagation())}))})),m&&v.createElement(VG,{control:c,bubbles:!p.current,name:r,value:s,checked:o,required:a,disabled:i,style:{transform:"translateX(-100%)"}}))})),jG="RadioIndicator",zG=v.forwardRef(((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,a=FG(jG,n);return v.createElement(ea,{present:r||a.checked},v.createElement(lt.span,Pe({"data-state":Ok(a.checked),"data-disabled":a.disabled?"":void 0},o,{ref:t})))})),VG=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,a=v.useRef(null),i=ky(n),s=Ly(t);return v.useEffect((()=>{const e=a.current,t=window.HTMLInputElement.prototype,o=Object.getOwnPropertyDescriptor(t,"checked").set;if(i!==n&&o){const t=new Event("click",{bubbles:r});o.call(e,n),e.dispatchEvent(t)}}),[i,n,r]),v.createElement("input",Pe({type:"radio","aria-hidden":!0,defaultChecked:n},o,{tabIndex:-1,ref:a,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function Ok(e){return e?"checked":"unchecked"}const UG=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Ak="RadioGroup",[WG,vZ]=ni(Ak,[qm,Tk]),Mk=qm(),Dk=Tk(),[qG,GG]=WG(Ak),HG=v.forwardRef(((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:a,required:i=!1,disabled:s=!1,orientation:u,dir:l,loop:c=!0,onValueChange:d,...f}=e,p=Mk(n),m=u$(l),[h,g]=fd({prop:a,defaultProp:o,onChange:d});return v.createElement(qG,{scope:n,name:r,required:i,disabled:s,value:h,onValueChange:g},v.createElement(y$,Pe({asChild:!0},p,{orientation:u,dir:m,loop:c}),v.createElement(lt.div,Pe({role:"radiogroup","aria-required":i,"aria-orientation":u,"data-disabled":s?"":void 0,dir:m},f,{ref:t}))))})),KG="RadioGroupItem",YG=v.forwardRef(((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,a=GG(KG,n),i=a.disabled||r,s=Mk(n),u=Dk(n),l=v.useRef(null),c=Vt(t,l),d=a.value===o.value,f=v.useRef(!1);return v.useEffect((()=>{const e=e=>{UG.includes(e.key)&&(f.current=!0)},t=()=>f.current=!1;return document.addEventListener("keydown",e),document.addEventListener("keyup",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}}),[]),v.createElement(w$,Pe({asChild:!0},s,{focusable:!i,active:d}),v.createElement(BG,Pe({disabled:i,required:a.required,checked:d},u,o,{name:a.name,ref:c,onCheck:()=>a.onValueChange(o.value),onKeyDown:et((e=>{"Enter"===e.key&&e.preventDefault()})),onFocus:et(o.onFocus,(()=>{var e;f.current&&(null===(e=l.current)||void 0===e||e.click())}))})))})),QG=v.forwardRef(((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=Dk(n);return v.createElement(zG,Pe({},o,r,{ref:t}))})),Nk=HG,kk=YG,XG=QG,JG=v.forwardRef((({className:e,...t},n)=>G.jsx(Nk,{className:_e("grid gap-2",e),...t,ref:n})));JG.displayName=Nk.displayName;const ZG=v.forwardRef((({className:e,...t},n)=>G.jsx(kk,{ref:n,className:_e("aspect-square size-6 rounded-full border border-gray-300 disabled:cursor-not-allowed disabled:border-gray-100 disabled:bg-gray-100","data-[state=checked]:border-blue_100 data-[state=checked]:bg-blue_100 hover:data-[state=checked]:border-blue_120","disabled:data-[state=checked]:border-gray-100 disabled:data-[state=checked]:bg-gray-100","transition-[border] duration-200 hover:data-[state=checked]:bg-blue_120 md:hover:border-2",e),...t,children:G.jsx(XG,{className:"flex items-center justify-center",children:G.jsx(j5,{className:"stack-animate size-2 border-none",style:{fill:t.disabled?"var(--gray-300)":"white",color:t.disabled?"var(--gray-300)":"white"}})})})));ZG.displayName=kk.displayName;const eH=FA,tH=Ey,Lk=v.forwardRef((({className:e,...t},n)=>G.jsx(Bm,{className:_e("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n})));Lk.displayName=Bm.displayName;const nH=gu("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Fk=v.forwardRef((({side:e="right",className:t,overlayClassName:n,children:r,...o},a)=>G.jsxs(tH,{children:[G.jsx(Lk,{className:_e("bg-gray-900/70",n)}),G.jsxs(jm,{ref:a,className:_e(nH({side:e}),t),...o,children:[r,G.jsxs($y,{className:"absolute right-4 top-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[G.jsx(gy,{className:"h-4 w-4"}),G.jsx("span",{className:"sr-only",children:"Close"})]})]})]})));Fk.displayName=jm.displayName;const Bk=({className:e,...t})=>G.jsx("div",{className:_e("flex flex-col space-y-2 text-center sm:text-left",e),...t});Bk.displayName="SheetHeader";const jk=v.forwardRef((({className:e,...t},n)=>G.jsx(Ov,{ref:n,className:_e("text-lg font-semibold text-foreground",e),...t})));jk.displayName=Ov.displayName;const zk=v.forwardRef((({className:e,...t},n)=>G.jsx(Av,{ref:n,className:_e("text-sm text-muted-foreground",e),...t})));zk.displayName=Av.displayName;const[Xy,gZ]=ni("Tooltip",[Wm]),Jy=Wm(),rH="TooltipProvider",oH=700,rE="tooltip.open",[iH,k$]=Xy(rH),aH=e=>{const{__scopeTooltip:t,delayDuration:n=oH,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,[i,s]=v.useState(!0),u=v.useRef(!1),l=v.useRef(0);return v.useEffect((()=>{const e=l.current;return()=>window.clearTimeout(e)}),[]),v.createElement(iH,{scope:t,isOpenDelayed:i,delayDuration:n,onOpen:v.useCallback((()=>{window.clearTimeout(l.current),s(!1)}),[]),onClose:v.useCallback((()=>{window.clearTimeout(l.current),l.current=window.setTimeout((()=>s(!0)),r)}),[r]),isPointerInTransitRef:u,onPointerInTransitChange:v.useCallback((e=>{u.current=e}),[]),disableHoverableContent:o},a)},L$="Tooltip",[sH,Vv]=Xy(L$),uH=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:a,disableHoverableContent:i,delayDuration:s}=e,u=k$(L$,e.__scopeTooltip),l=Jy(t),[c,d]=v.useState(null),f=ad(),p=v.useRef(0),m=i??u.disableHoverableContent,h=s??u.delayDuration,g=v.useRef(!1),[y=!1,b]=fd({prop:r,defaultProp:o,onChange:e=>{e?(u.onOpen(),document.dispatchEvent(new CustomEvent(rE))):u.onClose(),null==a||a(e)}}),w=v.useMemo((()=>y?g.current?"delayed-open":"instant-open":"closed"),[y]),x=v.useCallback((()=>{window.clearTimeout(p.current),g.current=!1,b(!0)}),[b]),_=v.useCallback((()=>{window.clearTimeout(p.current),b(!1)}),[b]),E=v.useCallback((()=>{window.clearTimeout(p.current),p.current=window.setTimeout((()=>{g.current=!0,b(!0)}),h)}),[h,b]);return v.useEffect((()=>()=>window.clearTimeout(p.current)),[]),v.createElement(sN,l,v.createElement(sH,{scope:t,contentId:f,open:y,stateAttribute:w,trigger:c,onTriggerChange:d,onTriggerEnter:v.useCallback((()=>{u.isOpenDelayed?E():x()}),[u.isOpenDelayed,E,x]),onTriggerLeave:v.useCallback((()=>{m?_():window.clearTimeout(p.current)}),[_,m]),onOpen:x,onClose:_,disableHoverableContent:m},n))},dO="TooltipTrigger",lH=v.forwardRef(((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Vv(dO,n),a=k$(dO,n),i=Jy(n),s=Vt(t,v.useRef(null),o.onTriggerChange),u=v.useRef(!1),l=v.useRef(!1),c=v.useCallback((()=>u.current=!1),[]);return v.useEffect((()=>()=>document.removeEventListener("pointerup",c)),[c]),v.createElement(h$,Pe({asChild:!0},i),v.createElement(lt.button,Pe({"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute},r,{ref:s,onPointerMove:et(e.onPointerMove,(e=>{"touch"!==e.pointerType&&!l.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),l.current=!0)})),onPointerLeave:et(e.onPointerLeave,(()=>{o.onTriggerLeave(),l.current=!1})),onPointerDown:et(e.onPointerDown,(()=>{u.current=!0,document.addEventListener("pointerup",c,{once:!0})})),onFocus:et(e.onFocus,(()=>{u.current||o.onOpen()})),onBlur:et(e.onBlur,o.onClose),onClick:et(e.onClick,o.onClose)})))})),Vk="TooltipPortal",[cH,dH]=Xy(Vk,{forceMount:void 0}),fH=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,a=Vv(Vk,t);return v.createElement(cH,{scope:t,forceMount:n},v.createElement(ea,{present:n||a.open},v.createElement(by,{asChild:!0,container:o},r)))},Sv="TooltipContent",Uk=v.forwardRef(((e,t)=>{const n=dH(Sv,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,i=Vv(Sv,e.__scopeTooltip);return v.createElement(ea,{present:r||i.open},i.disableHoverableContent?v.createElement(Wk,Pe({side:o},a,{ref:t})):v.createElement(pH,Pe({side:o},a,{ref:t})))})),pH=v.forwardRef(((e,t)=>{const n=Vv(Sv,e.__scopeTooltip),r=k$(Sv,e.__scopeTooltip),o=v.useRef(null),a=Vt(t,o),[i,s]=v.useState(null),{trigger:u,onClose:l}=n,c=o.current,{onPointerInTransitChange:d}=r,f=v.useCallback((()=>{s(null),d(!1)}),[d]),p=v.useCallback(((e,t)=>{const n=e.currentTarget,r={x:e.clientX,y:e.clientY},o=xH([...wH(r,yH(r,n.getBoundingClientRect())),...bH(t.getBoundingClientRect())]);s(o),d(!0)}),[d]);return v.useEffect((()=>()=>f()),[f]),v.useEffect((()=>{if(u&&c){const e=e=>p(e,c),t=e=>p(e,u);return u.addEventListener("pointerleave",e),c.addEventListener("pointerleave",t),()=>{u.removeEventListener("pointerleave",e),c.removeEventListener("pointerleave",t)}}}),[u,c,p,f]),v.useEffect((()=>{if(i){const e=e=>{const t=e.target,n={x:e.clientX,y:e.clientY},r=(null==u?void 0:u.contains(t))||(null==c?void 0:c.contains(t)),o=!_H(n,i);r?f():o&&(f(),l())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}}),[u,c,i,l,f]),v.createElement(Wk,Pe({},e,{ref:a}))})),[mH,hH]=Xy(L$,{isInside:!1}),Wk=v.forwardRef(((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:i,...s}=e,u=Vv(Sv,n),l=Jy(n),{onClose:c}=u;return v.useEffect((()=>(document.addEventListener(rE,c),()=>document.removeEventListener(rE,c))),[c]),v.useEffect((()=>{if(u.trigger){const e=e=>{const t=e.target;null!=t&&t.contains(u.trigger)&&c()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}}),[u.trigger,c]),v.createElement(wy,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:c},v.createElement(v$,Pe({"data-state":u.stateAttribute},l,s,{ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),v.createElement(xE,null,r),v.createElement(mH,{scope:n,isInside:!0},v.createElement(JU,{id:u.contentId,role:"tooltip"},o||r))))})),vH="TooltipArrow",gH=v.forwardRef(((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Jy(n);return hH(vH,n).isInside?null:v.createElement(EV,Pe({},o,r,{ref:t}))}));function yH(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function wH(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}function bH(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function _H(e,t){const{x:n,y:r}=e;let o=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){const i=t[e].x,s=t[e].y,u=t[a].x,l=t[a].y;s>r!=l>r&&n<(u-i)*(r-s)/(l-s)+i&&(o=!o)}return o}function xH(e){const t=e.slice();return t.sort(((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0)),SH(t)}function SH(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const r=e[n];for(;t.length>=2;){const e=t[t.length-1],n=t[t.length-2];if(!((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x)))break;t.pop()}t.push(r)}t.pop();const n=[];for(let t=e.length-1;t>=0;t--){const r=e[t];for(;n.length>=2;){const e=n[n.length-1],t=n[n.length-2];if(!((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x)))break;n.pop()}n.push(r)}return n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}const EH=fH,qk=Uk,$H=gH,CH=()=>{const e=window.innerWidth;return e<768?"mobile":e<1024?"tablet":"desktop"},IH=e=>{if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)},RH=e=>IH(e)&&"type"in e&&"string"==typeof e.type,wt=e=>{const t=t=>({type:e,payload:t});return t.toString=()=>`${e}`,t.type=e,t.match=t=>RH(t)&&t.type===e,t};wt("remoteReady"),wt("askLogin"),wt("reselectUser"),wt("requestLogout");const PH=wt("setConfirmLeavePage"),TH=wt("requestChangePath");wt("wsSubscribe"),wt("wsUnSubscribe"),wt("hostStoreConnect"),wt("remoteLogin");const OH=wt("remoteLogout");wt("wsOnMessage");const AH=wt("setRouterPath"),MH=wt("setDeviceType"),DH=wt("setDeviceWidth"),NH=wt("setUserError"),kH=wt("setUserIsError"),LH=wt("setUserPending"),FH=wt("setUserSuccess"),BH=wt("setUserData"),jH=wt("updateAccountData"),zH=wt("updateUser"),VH=wt("addNotification"),UH=wt("markNotification"),WH=wt("setNotificationsError"),qH=wt("setNotificationsList"),GH=wt("setNotificationsPending"),HH=wt("setNotificationsTotalCount"),KH=wt("setNotificationsUnreadCount"),YH=wt("acceptAllFollowRequests"),QH=wt("resetNotificationsState"),XH=wt("undoNotification"),JH=wt("setInstanceInfo"),ZH=wt("setInstanceInfoPending"),eK=wt("setInstanceInfoError"),tK=wt("setPlatformSettings"),nK=wt("setProfileSettings");wt("setGroupData"),wt("setGroupLoading"),wt("requestLocalStorageGet"),wt("requestLocalStorageSet"),wt("requestLocalStorageRemove"),wt("requestLocalStorageClear"),wt("requestLocalStorageKeys"),wt("requestLocalStorageHas"),wt("sendLocalStorageResponse"),wt("sendLocalStorageChanged");const uv="8.48.0",$l=globalThis;function F$(e,t,n){const r=$l,o=r.__SENTRY__=r.__SENTRY__||{},a=o[uv]=o[uv]||{};return a[e]||(a[e]=t())}const Gk=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,rK="Sentry Logger ",fO=["debug","info","warn","error","log","assert","trace"],pO={};function oK(e){if(!("console"in $l))return e();const t=$l.console,n={},r=Object.keys(pO);r.forEach((e=>{const r=pO[e];n[e]=t[e],t[e]=r}));try{return e()}finally{r.forEach((e=>{t[e]=n[e]}))}}function iK(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return Gk?fO.forEach((n=>{t[n]=(...t)=>{e&&oK((()=>{$l.console[n](`${rK}[${n}]:`,...t)}))}})):fO.forEach((e=>{t[e]=()=>{}})),t}const Ug=F$("logger",iK);function B$(){return j$($l),$l}function j$(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||uv,t[uv]=t[uv]||{}}const aK=Object.prototype.toString;function sK(e,t){return aK.call(e)===`[object ${t}]`}function uK(e){return sK(e,"Object")}function lK(e){return!(!e||!e.then||"function"!=typeof e.then)}function cK(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{Gk&&Ug.log(`Failed to add non-enumerable property "${t}" to object`,e)}}const Hk=1e3;function Kk(){return Date.now()/Hk}function dK(){const{performance:e}=$l;if(!e||!e.now)return Kk;const t=Date.now()-e.now(),n=null==e.timeOrigin?t:e.timeOrigin;return()=>(n+e.now())/Hk}const fK=dK();function Tm(){const e=$l,t=e.crypto||e.msCrypto;let n=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{const e=new Uint8Array(1);return t.getRandomValues(e),e[0]})}catch{}return"10000000100040008000100000000000".replace(/[018]/g,(e=>(e^(15&n())>>e/4).toString(16)))}function pK(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||fK(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:Tm()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{const t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function mO(){return Tm()}function hO(){return Tm().substring(16)}function Yk(e,t,n=2){if(!t||"object"!=typeof t||n<=0)return t;if(e&&t&&0===Object.keys(t).length)return e;const r={...e};for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=Yk(r[e],t[e],n-1));return r}(()=>{const{performance:e}=$l;if(!e||!e.now)return;const t=36e5,n=e.now(),r=Date.now(),o=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,a=o<t,i=e.timing&&e.timing.navigationStart,s="number"==typeof i?Math.abs(i+n-r):t;(a||s<t)&&(o<=s&&e.timeOrigin)})();const oE="_sentrySpan";function vO(e,t){t?cK(e,oE,t):delete e[oE]}function gO(e){return e[oE]}const mK=100;class z${constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:mO(),spanId:hO()}}clone(){const e=new z$;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,vO(e,gO(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&pK(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const t="function"==typeof e?e(this):e,[n,r]=t instanceof Ev?[t.getScopeData(),t.getRequestSession()]:uK(t)?[e,e.requestSession]:[],{tags:o,extra:a,user:i,contexts:s,level:u,fingerprint:l=[],propagationContext:c}=n||{};return this._tags={...this._tags,...o},this._extra={...this._extra,...a},this._contexts={...this._contexts,...s},i&&Object.keys(i).length&&(this._user=i),u&&(this._level=u),l.length&&(this._fingerprint=l),c&&(this._propagationContext=c),r&&(this._requestSession=r),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,vO(this,void 0),this._attachments=[],this.setPropagationContext({traceId:mO()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:mK;if(n<=0)return this;const r={timestamp:Kk(),...e},o=this._breadcrumbs;return o.push(r),this._breadcrumbs=o.length>n?o.slice(-n):o,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:gO(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=Yk(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext={spanId:hO(),...e},this}getPropagationContext(){return this._propagationContext}captureException(e,t){const n=t&&t.event_id?t.event_id:Tm();if(!this._client)return Ug.warn("No client configured on scope - will not capture exception!"),n;const r=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},this),n}captureMessage(e,t,n){const r=n&&n.event_id?n.event_id:Tm();if(!this._client)return Ug.warn("No client configured on scope - will not capture message!"),r;const o=new Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:o,...n,event_id:r},this),r}captureEvent(e,t){const n=t&&t.event_id?t.event_id:Tm();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(Ug.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((e=>{e(this)})),this._notifyingListeners=!1)}}const Ev=z$;function hK(){return F$("defaultCurrentScope",(()=>new Ev))}function vK(){return F$("defaultIsolationScope",(()=>new Ev))}class gK{constructor(e,t){let n,r;n=e||new Ev,r=t||new Ev,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){const t=this._pushScope();let n;try{n=e(t)}catch(e){throw this._popScope(),e}return lK(n)?n.then((e=>(this._popScope(),e)),(e=>{throw this._popScope(),e})):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}}function Lm(){const e=j$(B$());return e.stack=e.stack||new gK(hK(),vK())}function yK(e){return Lm().withScope(e)}function wK(e,t){const n=Lm();return n.withScope((()=>(n.getStackTop().scope=e,t(e))))}function yO(e){return Lm().withScope((()=>e(Lm().getIsolationScope())))}function bK(){return{withIsolationScope:yO,withScope:yK,withSetScope:wK,withSetIsolationScope:(e,t)=>yO(t),getCurrentScope:()=>Lm().getScope(),getIsolationScope:()=>Lm().getIsolationScope()}}function Qk(e){const t=j$(e);return t.acs?t.acs:bK()}function Xk(){return Qk(B$()).getCurrentScope()}function _K(){return Qk(B$()).getIsolationScope()}function xK(e,t){return Xk().captureException(e,void 0)}function SK(e,t){const n={captureContext:t};return Xk().captureMessage(e,void 0,n)}function EK(e,t){_K().setExtra(e,t)}const $K=(...e)=>{let t="";for(const n of e){if(n instanceof Error){const e=n;return EK("exceptionMessage",t),void xK(e)}if("object"!=typeof n)t+=n;else try{t+=" "+JSON.stringify(n)}catch{t+=" "+n}}SK(t)},Zy=()=>"object"!=typeof window,CK="wlsy",Jk=()=>{try{return window.localStorage}catch(e){console.warn("Error getting window.localStorage storage",e)}},IK=()=>{const e=new Set,t=Jk();if(!t)return[];for(let n=0;n<(null==t?void 0:t.length);n+=1){const r=null==t?void 0:t.key(n);"string"==typeof r&&e.add(r)}return Array.from(e)},V$=e=>{const t=`${CK}${e?`:${e}`:""}`,n=e=>`${t}:${e}`,r=()=>IK().filter((e=>e.startsWith(`${t}:`))),o=e=>e.slice(t.length+1),a=Jk(),i=e=>{try{return null==a?void 0:a.getItem(n(e))}catch{return null}},s=(e,t)=>{try{null==a||a.setItem(n(e),String(t))}catch{return}};return{getItem:i,setItem:s,removeItem:e=>{try{null==a||a.removeItem(n(e))}catch{return}},clear:()=>{try{r().forEach((e=>null==a?void 0:a.removeItem(e)))}catch{return}},keys:()=>r().map(o),has:e=>null!==i(e),getJSON:e=>{const t=i(e);if(null==t)return null;try{return JSON.parse(t)}catch{return null}},setJSON:(e,t)=>{try{s(e,JSON.stringify(t))}catch{return}}}},wO=["debug","info","warn","error"],RK=(e,t)=>{const n=wO.indexOf(e);return wO.indexOf(t)>=n},Ng=(e,t,n,...r)=>{RK(t,e)&&console.log(`[${e}] ${n}`,...r)},PK=()=>V$().getItem("logger_lvl"),TK=(e=(Zy()?"info":PK()||"warn"))=>{let t=e;return{debug:(e,...n)=>Ng("debug",t,e,...n),info:(e,...n)=>Ng("info",t,e,...n),warn:(e,...n)=>Ng("warn",t,e,...n),error:(e,...n)=>($K(e,...n),Ng("error",t,e,...n)),setLevel:e=>{t=e},getLevel:()=>t}},ap=TK(),OK=e=>{try{const{type:t,payload:n}=e,r={type:t};return void 0!==n&&(r.payload=JSON.parse(JSON.stringify(n))),r}catch(t){return ap.warn(`Could not serialize action type: ${e.type}`,t),{type:e.type,payload:`[Non-serializable payload for action: ${e.type}]`}}},Zk=({action:e,windowElement:t,whitelist:n})=>{if(t)try{const{type:r}=e;if(!n.some((({type:e})=>e===r||"*"===e)))return;const o=OK(e);t.postMessage(o,"*")}catch(e){ap.error("Failed to process or send message:",e)}},e3=({onMessage:e,whitelist:t,sourceWindow:n})=>{const r=r=>{const o=r.origin===window.location.origin,a=!n||r.source===n,i=r.data&&"object"==typeof r.data&&"type"in r.data,s=t.some((({type:e})=>e===r.data.type||"*"===e));!o&&a&&i&&s&&e(r.data)};return window.addEventListener("message",r),()=>{window.removeEventListener("message",r)}},Cm=()=>{try{return window.self!==window.top}catch{return!0}},bO=Vn("requestMicroFrontendFetch"),AK=Vn("sendMicroFrontendFetchResponse"),MK={deviceType:CH(),deviceWidth:window.innerWidth},t3=oo({name:"ui",initialState:MK,reducers:{},extraReducers:e=>{e.addCase(MH,((e,{payload:t})=>{e.deviceType=t})),e.addCase(DH,((e,{payload:t})=>{e.deviceWidth=t}))},selectors:{selectDeviceType:e=>e.deviceType,selectDeviceWidth:e=>e.deviceWidth,selectIsMobile:e=>"mobile"===e.deviceType,selectIsTablet:e=>"tablet"===e.deviceType,selectIsDesktop:e=>"desktop"===e.deviceType}});var Ex,_O,$x,xO,Cx,SO,Ix,EO,Rx,$O,Px,CO,Tx,IO,Ox,RO,Ax,PO,Mx,TO,Dx,OO,Nx,AO,kx,MO,Lx,DO,Fx,NO,Bx,kO,jx,LO,zx,FO,Vx,BO,Ux,jO,Wx,zO,qx,VO,Gx,UO,Hx,WO,Kx,qO,Yx,GO,Qx,HO,Xx,KO,Jx,YO,Zx,QO,eS,XO,tS,JO,nS,ZO,rS,e2,oS,t2,iS,n2,aS,r2,sS,o2,uS,i2,lS,a2,cS,s2;function n3(){if(_O)return Ex;_O=1;var e=CM(),t=e&&new e;return Ex=t}function r3(){if(xO)return $x;xO=1;var e=HE(),t=n3();return $x=t?function(e,n){return t.set(e,n),e}:e}function e0(){if(SO)return Cx;SO=1;var e=Ny(),t=bs();return Cx=function(n){return function(){var r=arguments;switch(r.length){case 0:return new n;case 1:return new n(r[0]);case 2:return new n(r[0],r[1]);case 3:return new n(r[0],r[1],r[2]);case 4:return new n(r[0],r[1],r[2],r[3]);case 5:return new n(r[0],r[1],r[2],r[3],r[4]);case 6:return new n(r[0],r[1],r[2],r[3],r[4],r[5]);case 7:return new n(r[0],r[1],r[2],r[3],r[4],r[5],r[6])}var o=e(n.prototype),a=n.apply(o,r);return t(a)?a:o}},Cx}function DK(){if(EO)return Ix;EO=1;var e=e0(),t=ri();return Ix=function(n,r,o){var a=1&r,i=e(n);return function e(){return(this&&this!==t&&this instanceof e?i:n).apply(a?o:this,arguments)}},Ix}function o3(){if($O)return Rx;$O=1;var e=Math.max;return Rx=function(t,n,r,o){for(var a=-1,i=t.length,s=r.length,u=-1,l=n.length,c=e(i-s,0),d=Array(l+c),f=!o;++u<l;)d[u]=n[u];for(;++a<s;)(f||a<i)&&(d[r[a]]=t[a]);for(;c--;)d[u++]=t[a++];return d}}function i3(){if(CO)return Px;CO=1;var e=Math.max;return Px=function(t,n,r,o){for(var a=-1,i=t.length,s=-1,u=r.length,l=-1,c=n.length,d=e(i-u,0),f=Array(d+c),p=!o;++a<d;)f[a]=t[a];for(var m=a;++l<c;)f[m+l]=n[l];for(;++s<u;)(p||a<i)&&(f[m+r[s]]=t[a++]);return f}}function NK(){if(IO)return Tx;return IO=1,Tx=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}}function U$(){if(RO)return Ox;return RO=1,Ox=function(){}}function W$(){if(PO)return Ax;PO=1;var e=Ny(),t=U$();function n(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}return n.prototype=e(t.prototype),n.prototype.constructor=n,Ax=n}function a3(){if(TO)return Mx;TO=1;var e=n3(),t=F9();return Mx=e?function(t){return e.get(t)}:t}function kK(){if(OO)return Dx;OO=1;return Dx={}}function LK(){if(AO)return Nx;AO=1;var e=kK(),t=Object.prototype.hasOwnProperty;return Nx=function(n){for(var r=n.name+"",o=e[r],a=t.call(e,r)?o.length:0;a--;){var i=o[a],s=i.func;if(null==s||s==n)return i.name}return r}}function s3(){if(MO)return kx;MO=1;var e=Ny(),t=U$();function n(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}return n.prototype=e(t.prototype),n.prototype.constructor=n,kx=n}function FK(){if(DO)return Lx;DO=1;var e=W$(),t=s3(),n=Dy();return Lx=function(r){if(r instanceof e)return r.clone();var o=new t(r.__wrapped__,r.__chain__);return o.__actions__=n(r.__actions__),o.__index__=r.__index__,o.__values__=r.__values__,o}}function BK(){if(NO)return Fx;NO=1;var e=W$(),t=s3(),n=U$(),r=Ei(),o=ta(),a=FK(),i=Object.prototype.hasOwnProperty;function s(n){if(o(n)&&!r(n)&&!(n instanceof e)){if(n instanceof t)return n;if(i.call(n,"__wrapped__"))return a(n)}return new t(n)}return s.prototype=n.prototype,s.prototype.constructor=s,Fx=s}function jK(){if(kO)return Bx;kO=1;var e=W$(),t=a3(),n=LK(),r=BK();return Bx=function(o){var a=n(o),i=r[a];if("function"!=typeof i||!(a in e.prototype))return!1;if(o===i)return!0;var s=t(i);return!!s&&o===s[0]}}function u3(){if(LO)return jx;LO=1;var e=r3(),t=OM()(e);return jx=t}function zK(){if(FO)return zx;FO=1;var e=/\{\n\/\* \[wrapped with (.+)\] \*/,t=/,? & /;return zx=function(n){var r=n.match(e);return r?r[1].split(t):[]}}function VK(){if(BO)return Vx;BO=1;var e=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;return Vx=function(t,n){var r=n.length;if(!r)return t;var o=r-1;return n[o]=(r>1?"& ":"")+n[o],n=n.join(r>2?", ":" "),t.replace(e,"{\n/* [wrapped with "+n+"] */\n")}}function UK(){if(jO)return Ux;jO=1;var e=QE(),t=L9(),n=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];return Ux=function(r,o){return e(n,(function(e){var n="_."+e[0];o&e[1]&&!t(r,n)&&r.push(n)})),r.sort()}}function l3(){if(zO)return Wx;zO=1;var e=zK(),t=VK(),n=AM(),r=UK();return Wx=function(o,a,i){var s=a+"";return n(o,t(s,r(e(s),i)))}}function c3(){if(VO)return qx;VO=1;var e=jK(),t=u3(),n=l3();return qx=function(r,o,a,i,s,u,l,c,d,f){var p=8&o;o|=p?32:64,4&(o&=~(p?64:32))||(o&=-4);var m=[r,o,s,p?u:void 0,p?l:void 0,p?void 0:u,p?void 0:l,c,d,f],v=a.apply(void 0,m);return e(r)&&t(v,m),v.placeholder=i,n(v,r,o)}}function d3(){if(UO)return Gx;return UO=1,Gx=function(e){return e.placeholder}}function WK(){if(WO)return Hx;WO=1;var e=Dy(),t=VE(),n=Math.min;return Hx=function(r,o){for(var a=r.length,i=n(o.length,a),s=e(r);i--;){var u=o[i];r[i]=t(u,a)?s[u]:void 0}return r}}function q$(){if(qO)return Kx;qO=1;var e="__lodash_placeholder__";return Kx=function(t,n){for(var r=-1,o=t.length,a=0,i=[];++r<o;){var s=t[r];(s===n||s===e)&&(t[r]=e,i[a++]=r)}return i}}function f3(){if(GO)return Yx;GO=1;var e=o3(),t=i3(),n=NK(),r=e0(),o=c3(),a=d3(),i=WK(),s=q$(),u=ri();return Yx=function l(c,d,f,p,m,v,h,g,y,b){var w=128&d,x=1&d,_=2&d,E=24&d,S=512&d,I=_?void 0:r(c);return function A(){for(var k=arguments.length,C=Array(k),P=k;P--;)C[P]=arguments[P];if(E)var R=a(A),O=n(C,R);if(p&&(C=e(C,p,m,E)),v&&(C=t(C,v,h,E)),k-=O,E&&k<b){var T=s(C,R);return o(c,d,l,A.placeholder,f,C,T,g,y,b-k)}var N=x?f:this,M=_?N[c]:c;return k=C.length,g?C=i(C,g):S&&k>1&&C.reverse(),w&&y<k&&(C.length=y),this&&this!==u&&this instanceof A&&(M=I||r(M)),M.apply(N,C)}},Yx}function qK(){if(HO)return Qx;HO=1;var e=KE(),t=e0(),n=f3(),r=c3(),o=d3(),a=q$(),i=ri();return Qx=function(s,u,l){var c=t(s);return function t(){for(var d=arguments.length,f=Array(d),p=d,m=o(t);p--;)f[p]=arguments[p];var v=d<3&&f[0]!==m&&f[d-1]!==m?[]:a(f,m);return(d-=v.length)<l?r(s,u,n,t.placeholder,void 0,f,v,void 0,void 0,l-d):e(this&&this!==i&&this instanceof t?c:s,this,f)}},Qx}function GK(){if(KO)return Xx;KO=1;var e=KE(),t=e0(),n=ri();return Xx=function(r,o,a,i){var s=1&o,u=t(r);return function t(){for(var o=-1,l=arguments.length,c=-1,d=i.length,f=Array(d+l),p=this&&this!==n&&this instanceof t?u:r;++c<d;)f[c]=i[c];for(;l--;)f[c++]=arguments[++o];return e(p,s?a:this,f)}},Xx}function HK(){if(YO)return Jx;YO=1;var e=o3(),t=i3(),n=q$(),r="__lodash_placeholder__",o=128,a=Math.min;return Jx=function(i,s){var u=i[1],l=s[1],c=u|l,d=c<131,f=l==o&&8==u||l==o&&256==u&&i[7].length<=s[8]||384==l&&s[7].length<=s[8]&&8==u;if(!d&&!f)return i;1&l&&(i[2]=s[2],c|=1&u?0:4);var p=s[3];if(p){var m=i[3];i[3]=m?e(m,p,s[4]):p,i[4]=m?n(i[3],r):s[4]}return(p=s[5])&&(m=i[5],i[5]=m?t(m,p,s[6]):p,i[6]=m?n(i[5],r):s[6]),(p=s[7])&&(i[7]=p),l&o&&(i[8]=null==i[8]?s[8]:a(i[8],s[8])),null==i[9]&&(i[9]=s[9]),i[0]=s[0],i[1]=c,i}}function G$(){if(QO)return Zx;QO=1;var e=r3(),t=DK(),n=qK(),r=f3(),o=GK(),a=a3(),i=HK(),s=u3(),u=l3(),l=kM(),c=Math.max;return Zx=function(d,f,p,m,v,h,g,y){var b=2&f;if(!b&&"function"!=typeof d)throw new TypeError("Expected a function");var w=m?m.length:0;if(w||(f&=-97,m=v=void 0),g=void 0===g?g:c(l(g),0),y=void 0===y?y:l(y),w-=v?v.length:0,64&f){var x=m,_=v;m=v=void 0}var E=b?void 0:a(d),S=[d,f,p,m,v,x,_,h,g,y];if(E&&i(S,E),d=S[0],f=S[1],p=S[2],m=S[3],v=S[4],!(y=S[9]=void 0===S[9]?b?0:d.length:c(S[9]-w,0))&&24&f&&(f&=-25),f&&1!=f)I=8==f||16==f?n(d,f,y):32!=f&&33!=f||v.length?r.apply(void 0,S):o(d,f,p,m);else var I=t(d,f,p);return u((E?e:s)(I,S),d,f)}}function KK(){if(XO)return eS;XO=1;var e=G$();return eS=function(t,n,r){return n=r?void 0:n,n=t&&null==n?t.length:n,e(t,128,void 0,void 0,void 0,void 0,n)}}function YK(){if(JO)return tS;JO=1;var e=jM();return tS=function(t){return e(t,4)}}function QK(){if(ZO)return nS;ZO=1;var e=G$();function t(n,r,o){var a=e(n,8,void 0,void 0,void 0,void 0,void 0,r=o?void 0:r);return a.placeholder=t.placeholder,a}return t.placeholder={},nS=t}function XK(){if(e2)return rS;e2=1;var e=Cl(),t=ta(),n=iF();return rS=function(r){if(!t(r))return!1;var o=e(r);return"[object Error]"==o||"[object DOMException]"==o||"string"==typeof r.message&&"string"==typeof r.name&&!n(r)}}function JK(){if(t2)return oS;t2=1;var e=kv(),t=ta();return oS=function(n){return t(n)&&"[object WeakMap]"==e(n)}}function ZK(){if(n2)return iS;n2=1;var e=jM(),t=A9();return iS=function(n){return t("function"==typeof n?n:e(n,1))}}function eY(){if(r2)return aS;r2=1;var e=G$(),t=CF(),n=t((function(t,n){return e(t,256,void 0,void 0,void 0,n)}));return aS=n}function tY(){if(o2)return sS;o2=1;var e=cM(),t=Dy(),n=Ei(),r=Dv(),o=lM(),a=Nv(),i=dM();return sS=function(s){return n(s)?e(s,a):r(s)?[s]:t(o(i(s)))}}function nY(){return i2||(i2=1,uS={ary:KK(),assign:FM(),clone:YK(),curry:QK(),forEach:QE(),isArray:Ei(),isError:XK(),isFunction:Iy(),isWeakMap:JK(),iteratee:ZK(),keys:SM(),rearg:eY(),toInteger:kM(),toPath:tY()}),uS}function rY(){if(a2)return lS;a2=1;var e=nA(),t=nY();return lS=function(n,r,o){return e(t,n,r,o)}}function oY(){if(s2)return cS;s2=1;var e=rY()("debounce",DM());return e.placeholder=tA(),cS=e}function u2(e,t,n=window){const r=v.useRef(t);v.useEffect((()=>{r.current=t}),[t]),v.useEffect((()=>{if(!n)return;const t=e=>r.current(e);return n.addEventListener(e,t),()=>{n.removeEventListener(e,t)}}),[e,n])}oY();const iY=()=>vy(t3.selectors.selectIsMobile);function l2({className:e,...t}){return G.jsx("div",{className:_e("animate-pulse rounded-md bg-muted",e),...t})}const aY="sidebar_state",sY=604800,uY="12rem",lY="18rem",cY="2rem",dY="b",p3=v.createContext(null);function t0(){const e=v.useContext(p3);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const fY=v.forwardRef((({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:o,children:a,...i},s)=>{const u=iY(),[l,c]=v.useState(!1),[d,f]=v.useState(e),p=t??d,m=v.useCallback((e=>{const t="function"==typeof e?e(p):e;n?n(t):f(t),document.cookie=`${aY}=${t}; path=/; max-age=${sY}`}),[n,p]),h=v.useCallback((()=>u?c((e=>!e)):m((e=>!e))),[u,m,c]);v.useEffect((()=>{const e=e=>{e.key===dY&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),h())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)}),[h]);const g=p?"expanded":"collapsed",y=v.useMemo((()=>({state:g,open:p,setOpen:m,isMobile:u,openMobile:l,setOpenMobile:c,toggleSidebar:h})),[g,p,m,u,l,c,h]);return G.jsx(p3.Provider,{value:y,children:G.jsx(aH,{delayDuration:0,children:G.jsx("div",{style:{"--sidebar-width":uY,"--sidebar-width-icon":cY,...o},className:_e("group/sidebar-wrapper flex min-h-svh w-full bg-gray-100 has-[[data-variant=inset]]:bg-sidebar",r),ref:s,...i,children:a})})})}));fY.displayName="SidebarProvider";const pY=v.forwardRef((({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:o,...a},i)=>{const{isMobile:s,state:u,openMobile:l,setOpenMobile:c}=t0();return"none"===n?G.jsx("div",{className:_e("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",r),ref:i,...a,children:o}):s?G.jsx(eH,{open:l,onOpenChange:c,children:G.jsxs(Fk,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":lY},side:e,children:[G.jsxs(Bk,{className:"sr-only",children:[G.jsx(jk,{children:"Sidebar"}),G.jsx(zk,{children:"Displays the mobile sidebar."})]}),G.jsx("div",{className:"flex h-full w-full flex-col",children:o})]})}):G.jsxs("div",{ref:i,className:"group peer hidden text-sidebar-foreground md:block","data-state":u,"data-collapsible":"collapsed"===u?n:"","data-variant":t,"data-side":e,children:[G.jsx("div",{className:_e("relative w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180","floating"===t||"inset"===t?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),G.jsx("div",{className:_e("fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex","left"===e?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]","floating"===t||"inset"===t?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",r),...a,children:G.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-sm group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:o})})]})}));pY.displayName="Sidebar";const mY=v.forwardRef((({className:e,onClick:t,...n},r)=>{const{toggleSidebar:o,open:a}=t0();return G.jsx(yy,{ref:r,"data-sidebar":"trigger",variant:"tertiary",size:"icon_m",className:_e("size-6 text-gray-900",e),onClick:e=>{null==t||t(e),o()},...n,children:a?G.jsx(Y5,{size:16}):G.jsx(H5,{size:16})})}));mY.displayName="SidebarTrigger";const hY=v.forwardRef((({className:e,...t},n)=>{const{toggleSidebar:r}=t0();return G.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:r,title:"Toggle Sidebar",className:_e("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})}));hY.displayName="SidebarRail";const vY=v.forwardRef((({className:e,...t},n)=>G.jsx("main",{ref:n,className:_e("relative flex w-full flex-1 flex-col bg-background","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-m md:peer-data-[variant=inset]:shadow",e),...t})));vY.displayName="SidebarInset";const gY=v.forwardRef((({className:e,...t},n)=>G.jsx(xk,{ref:n,"data-sidebar":"input",className:_e("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t})));gY.displayName="SidebarInput";const yY=v.forwardRef((({className:e,...t},n)=>G.jsx("div",{ref:n,"data-sidebar":"header",className:_e("flex flex-col gap-xxs p-xs",e),...t})));yY.displayName="SidebarHeader";const wY=v.forwardRef((({className:e,...t},n)=>G.jsx("div",{ref:n,"data-sidebar":"footer",className:_e("flex flex-col gap-2 p-2",e),...t})));wY.displayName="SidebarFooter";const bY=v.forwardRef((({className:e,...t},n)=>G.jsx(E$,{ref:n,"data-sidebar":"separator",className:_e("mx-2 w-auto bg-sidebar-border",e),...t})));bY.displayName="SidebarSeparator";const _Y=v.forwardRef((({className:e,...t},n)=>G.jsx("div",{ref:n,"data-sidebar":"content",className:_e("flex min-h-0 flex-1 flex-col gap-xxxs overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t})));_Y.displayName="SidebarContent";const xY=v.forwardRef((({className:e,...t},n)=>G.jsx("div",{ref:n,"data-sidebar":"group",className:_e("relative flex w-full min-w-0 flex-col pt-xs",e),...t})));xY.displayName="SidebarGroup";const SY=v.forwardRef((({className:e,asChild:t=!1,...n},r)=>{const o=t?yd:"div";return G.jsx(o,{ref:r,"data-sidebar":"group-label",className:_e("flex h-s shrink-0 items-center rounded-md px-xxs py-xxs text-xs font-semibold text-gray-700 opacity-60 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-xl group-data-[collapsible=icon]:opacity-0",e),...n})}));SY.displayName="SidebarGroupLabel";const EY=v.forwardRef((({className:e,asChild:t=!1,...n},r)=>{const o=t?yd:"button";return G.jsx(o,{ref:r,"data-sidebar":"group-action",className:_e("absolute right-xs top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...n})}));EY.displayName="SidebarGroupAction";const $Y=v.forwardRef((({className:e,...t},n)=>G.jsx("div",{ref:n,"data-sidebar":"group-content",className:_e("w-full text-sm",e),...t})));$Y.displayName="SidebarGroupContent";const CY=v.forwardRef((({className:e,...t},n)=>G.jsx("ul",{ref:n,"data-sidebar":"menu",className:_e("flex w-full min-w-0 flex-col p-xs font-semibold text-gray-700 [&_svg]:size-4",e),...t})));CY.displayName="SidebarMenu";const IY=v.forwardRef((({className:e,...t},n)=>G.jsx("li",{ref:n,"data-sidebar":"menu-item",className:_e("group/menu-item relative",e),...t})));IY.displayName="SidebarMenuItem";const RY=gu("peer/menu-button flex w-full items-center gap-xxs overflow-hidden rounded-sm p-xxs text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:text-blue_100 hover:bg-white focus-visible:ring-2 active:bg-white active:text-blue_100 disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-white data-[active=true]:font-medium data-[active=true]:text-blue_100 data-[state=open]:hover:bg-white data-[state=open]:hover:text-blue_100 group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:text-blue_100 hover:bg-white",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-white hover:text-blue_100 hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-s text-sm",sm:"h-m text-xs",lg:"h-l text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),PY=v.forwardRef((({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:o,className:a,...i},s)=>{const u=e?yd:"button",{isMobile:l,state:c}=t0(),d=G.jsx(u,{ref:s,"data-sidebar":"menu-button","data-size":r,"data-active":t,className:_e(RY({variant:n,size:r}),a),...i});return o?("string"==typeof o&&(o={children:o}),G.jsxs(uH,{children:[G.jsx(lH,{asChild:!0,children:d}),G.jsx(Uk,{side:"right",align:"center",hidden:"collapsed"!==c||l,...o})]})):d}));PY.displayName="SidebarMenuButton";const TY=v.forwardRef((({className:e,asChild:t=!1,showOnHover:n=!1,...r},o)=>{const a=t?yd:"button";return G.jsx(a,{ref:o,"data-sidebar":"menu-action",className:_e("absolute right-xxxs top-xxs flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-xxxs","peer-data-[size=default]/menu-button:top-xxs","peer-data-[size=lg]/menu-button:top-xs","group-data-[collapsible=icon]:hidden",n&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...r})}));TY.displayName="SidebarMenuAction";const OY=v.forwardRef((({className:e,...t},n)=>G.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:_e("pointer-events-none absolute right-xxxs flex h-m min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-xxxs","peer-data-[size=default]/menu-button:top-xxs","peer-data-[size=lg]/menu-button:top-xs","group-data-[collapsible=icon]:hidden",e),...t})));OY.displayName="SidebarMenuBadge";const AY=v.forwardRef((({className:e,showIcon:t=!1,...n},r)=>{const o=v.useMemo((()=>`${Math.floor(40*Math.random())+50}%`),[]);return G.jsxs("div",{ref:r,"data-sidebar":"menu-skeleton",className:_e("flex h-8 items-center gap-xxs rounded-md px-xxs",e),...n,children:[t&&G.jsx(l2,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),G.jsx(l2,{className:"h-xxxs max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":o}})]})}));AY.displayName="SidebarMenuSkeleton";const MY=v.forwardRef((({className:e,...t},n)=>G.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:_e("flex min-w-0 translate-x-px flex-col gap-xxxs border-l border-sidebar-border","group-data-[collapsible=icon]:hidden",e),...t})));MY.displayName="SidebarMenuSub";const DY=v.forwardRef((({...e},t)=>G.jsx("li",{ref:t,...e})));DY.displayName="SidebarMenuSubItem";const NY=v.forwardRef((({asChild:e=!1,size:t="md",isActive:n,className:r,...o},a)=>{const i=e?yd:"a";return G.jsx(i,{ref:a,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:_e("flex h-s min-w-0 -translate-x-px items-center gap-xxs overflow-hidden rounded-sm px-xxs text-sm text-gray-700 outline-none ring-sidebar-ring hover:bg-white hover:text-blue_100 focus-visible:ring-2 active:bg-white active:text-blue_100 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-blue_100","data-[active=true]:bg-white data-[active=true]:text-blue_100","sm"===t&&"text-xs","md"===t&&"text-sm","group-data-[collapsible=icon]:hidden",r),...o})}));NY.displayName="SidebarMenuSubButton";const m3="Switch",[kY,yZ]=ni(m3),[LY,FY]=kY(m3),BY=v.forwardRef(((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:a,required:i,disabled:s,value:u="on",onCheckedChange:l,...c}=e,[d,f]=v.useState(null),p=Vt(t,(e=>f(e))),m=v.useRef(!1),h=!d||!!d.closest("form"),[g=!1,y]=fd({prop:o,defaultProp:a,onChange:l});return v.createElement(LY,{scope:n,checked:g,disabled:s},v.createElement(lt.button,Pe({type:"button",role:"switch","aria-checked":g,"aria-required":i,"data-state":h3(g),"data-disabled":s?"":void 0,disabled:s,value:u},c,{ref:p,onClick:et(e.onClick,(e=>{y((e=>!e)),h&&(m.current=e.isPropagationStopped(),m.current||e.stopPropagation())}))})),h&&v.createElement(VY,{control:d,bubbles:!m.current,name:r,value:u,checked:g,required:i,disabled:s,style:{transform:"translateX(-100%)"}}))})),jY="SwitchThumb",zY=v.forwardRef(((e,t)=>{const{__scopeSwitch:n,...r}=e,o=FY(jY,n);return v.createElement(lt.span,Pe({"data-state":h3(o.checked),"data-disabled":o.disabled?"":void 0},r,{ref:t}))})),VY=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,a=v.useRef(null),i=ky(n),s=Ly(t);return v.useEffect((()=>{const e=a.current,t=window.HTMLInputElement.prototype,o=Object.getOwnPropertyDescriptor(t,"checked").set;if(i!==n&&o){const t=new Event("click",{bubbles:r});o.call(e,n),e.dispatchEvent(t)}}),[i,n,r]),v.createElement("input",Pe({type:"checkbox","aria-hidden":!0,defaultChecked:n},o,{tabIndex:-1,ref:a,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function h3(e){return e?"checked":"unchecked"}const v3=BY,UY=zY,WY=v.forwardRef((({className:e,...t},n)=>G.jsx(v3,{className:_e("group peer inline-flex h-xs w-[44px] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background data-[state=checked]:bg-blue_100 data-[state=unchecked]:bg-gray-200","disabled:cursor-not-allowed disabled:!bg-gray-100 md:hover:data-[state=checked]:bg-blue_120 md:hover:data-[state=unchecked]:!bg-gray-300",e),...t,ref:n,children:G.jsx(UY,{className:_e("pointer-events-none block size-xxs rounded-full bg-background shadow-lg ring-0 transition-[transform,width] data-[state=checked]:translate-x-[20px] data-[state=unchecked]:translate-x-0",{"md:group-hover:w-[26px] md:group-hover:data-[state=checked]:translate-x-[14px]":!t.disabled,"bg-gray-300":t.disabled})})})));WY.displayName=v3.displayName;var qY={USER:"teamcity",npm_config_user_agent:"npm/10.9.3 node/v22.18.0 linux x64 workspaces/true",SENTRY_AUTH_TOKEN:"1d93ff28a44e4c3aaaaff854277cd8583c1de670bd8744bc895670dfd9300840",npm_node_execpath:"/home/teamcity/.nvm/versions/node/v22.18.0/bin/node",npm_config_noproxy:"",HOME:"/home/teamcity",npm_package_json:"/mnt/agent/work/70fcd8585843667f/packages/network/package.json",npm_config_userconfig:"/home/teamcity/.npmrc",npm_config_local_prefix:"/mnt/agent/work/70fcd8585843667f",COLOR:"1",npm_config_progress:"",TEMP:"/mnt/agent/temp/buildTmp",npm_config_prefix:"/home/teamcity/.nvm/versions/node/v22.18.0",npm_config_npm_version:"10.9.3",npm_config_cache:"/home/teamcity/.npm",USE_NPM_LIBS:"false",npm_config_ignore_scripts:"true",npm_config_node_gyp:"/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",PATH:"/mnt/agent/work/70fcd8585843667f/packages/network/node_modules/.bin:/mnt/agent/work/70fcd8585843667f/packages/node_modules/.bin:/mnt/agent/work/70fcd8585843667f/node_modules/.bin:/mnt/agent/work/node_modules/.bin:/mnt/agent/node_modules/.bin:/mnt/node_modules/.bin:/node_modules/.bin:/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/mnt/agent/work/70fcd8585843667f/node_modules/.bin:/mnt/agent/work/node_modules/.bin:/mnt/agent/node_modules/.bin:/mnt/node_modules/.bin:/node_modules/.bin:/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/home/teamcity/.cargo/bin:/home/teamcity/.rvm/gems/ruby-3.3.9/bin:/home/teamcity/.rvm/gems/ruby-3.3.9@global/bin:/home/teamcity/.rvm/rubies/ruby-3.3.9/bin:/home/teamcity/.rvm/bin:/home/teamcity/.local/bin:/usr/lib/jvm/java-21-amazon-corretto/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/snap/bin:/usr/share/dotnet:/usr/share/dotnet/tools:/home/teamcity/google-cloud-sdk/bin:/home/teamcity/go/bin:/usr/bin/mvn:/home/teamcity/.nvm/versions/node/v22.18.0/bin",TURBO_HASH:"c501d9cb96602f37",NODE:"/home/teamcity/.nvm/versions/node/v22.18.0/bin/node",npm_package_name:"@wellesley/network",npm_config_color:"always",DOMAIN_ENV:"test",LANG:"en_US.UTF-8",TURBO_TEAM:"wellesley",TMP:"/mnt/agent/temp/buildTmp",TURBO_API:"https://turborepo-remote-cache-fo3np.ondigitalocean.app",npm_lifecycle_script:"vite build",SHELL:"/bin/bash",npm_package_version:"1.0.693",npm_lifecycle_event:"build",TURBO_CACHE:"remote:rw",SENTRY_MAPS_UPLOAD:"true",npm_config_globalconfig:"/home/teamcity/.nvm/versions/node/v22.18.0/etc/npmrc",npm_config_init_module:"/home/teamcity/.npm-init.js",PWD:"/mnt/agent/work/70fcd8585843667f/packages/network",npm_execpath:"/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/bin/npm-cli.js",npm_config_global_prefix:"/home/teamcity/.nvm/versions/node/v22.18.0",npm_command:"run-script",TURBO_TOKEN:"wellesley-turbo-token",USE_PACKAGES_FROM_NPM:"false",INIT_CWD:"/mnt/agent/work/70fcd8585843667f/packages/network",EDITOR:"vi",NODE_ENV:"production",BUILD_NUMBER:"3776",APP_NAME:"@wellesley/network"},g3=(e=>(e.uninitialized="uninitialized",e.pending="pending",e.fulfilled="fulfilled",e.rejected="rejected",e))(g3||{});function GY(e){return{status:e,isUninitialized:"uninitialized"===e,isLoading:"pending"===e,isSuccess:"fulfilled"===e,isError:"rejected"===e}}function HY(e){return new RegExp("(^|:)//").test(e)}var KY=e=>e.replace(/\/$/,""),YY=e=>e.replace(/^\//,"");function QY(e,t){if(!e)return t;if(!t)return e;if(HY(t))return t;const n=e.endsWith("/")||!t.startsWith("?")?"/":"";return`${e=KY(e)}${n}${t=YY(t)}`}var c2=e=>[].concat(...e);function XY(){return typeof navigator>"u"||void 0===navigator.onLine||navigator.onLine}function JY(){return typeof document>"u"||"hidden"!==document.visibilityState}var d2=ld;function y3(e,t){if(e===t||!(d2(e)&&d2(t)||Array.isArray(e)&&Array.isArray(t)))return t;const n=Object.keys(t),r=Object.keys(e);let o=n.length===r.length;const a=Array.isArray(t)?[]:{};for(const r of n)a[r]=y3(e[r],t[r]),o&&(o=e[r]===a[r]);return o?e:a}var f2=(...e)=>fetch(...e),ZY=e=>e.status>=200&&e.status<=299,eQ=e=>/ion\/(vnd\.api\+)?json/.test(e.get("content-type")||"");function p2(e){if(!ld(e))return e;const t={...e};for(const[e,n]of Object.entries(t))void 0===n&&delete t[e];return t}function tQ({baseUrl:e,prepareHeaders:t=e=>e,fetchFn:n=f2,paramsSerializer:r,isJsonContentType:o=eQ,jsonContentType:a="application/json",jsonReplacer:i,timeout:s,responseHandler:u,validateStatus:l,...c}={}){return typeof fetch>"u"&&n===f2&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),async(f,p)=>{const{signal:m,getState:v,extra:h,endpoint:g,forced:y,type:b}=p;let w,{url:x,headers:_=new Headers(c.headers),params:E,responseHandler:S=u??"json",validateStatus:I=l??ZY,timeout:A=s,...k}="string"==typeof f?{url:f}:f,C={...c,signal:m,...k};_=new Headers(p2(_)),C.headers=await t(_,{getState:v,extra:h,endpoint:g,forced:y,type:b})||_;const P=e=>"object"==typeof e&&(ld(e)||Array.isArray(e)||"function"==typeof e.toJSON);if(!C.headers.has("content-type")&&P(C.body)&&C.headers.set("content-type",a),P(C.body)&&o(C.headers)&&(C.body=JSON.stringify(C.body,i)),E){const e=~x.indexOf("?")?"&":"?";x+=e+(r?r(E):new URLSearchParams(p2(E)))}x=QY(e,x);const R=new Request(x,C);w={request:new Request(x,C)};let O,T=!1,N=A&&setTimeout((()=>{T=!0,p.abort()}),A);try{O=await n(R)}catch(e){return{error:{status:T?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(e)},meta:w}}finally{N&&clearTimeout(N)}const M=O.clone();w.response=M;let j,D="";try{let e;if(await Promise.all([d(O,S).then((e=>j=e),(t=>e=t)),M.text().then((e=>D=e),(()=>{}))]),e)throw e}catch(e){return{error:{status:"PARSING_ERROR",originalStatus:O.status,data:D,error:String(e)},meta:w}}return I(O,j)?{data:j,meta:w}:{error:{status:O.status,data:j},meta:w}};async function d(e,t){if("function"==typeof t)return t(e);if("content-type"===t&&(t=o(e.headers)?"json":"text"),"json"===t){const t=await e.text();return t.length?JSON.parse(t):null}return e.text()}}var m2=class{constructor(e,t=void 0){this.value=e,this.meta=t}},H$=Vn("__rtkq/focused"),w3=Vn("__rtkq/unfocused"),K$=Vn("__rtkq/online"),b3=Vn("__rtkq/offline");function _3(e){return"query"===e.type}function nQ(e){return"mutation"===e.type}function Y$(e,t,n,r,o,a){return rQ(e)?e(t,n,r,o).map(iE).map(a):Array.isArray(e)?e.map(iE).map(a):[]}function rQ(e){return"function"==typeof e}function iE(e){return"string"==typeof e?{type:e}:e}function h2(e){return null!=e}function Om(e){let t=0;for(const n in e)t++;return t}function oQ(e,t){return e.catch(t)}var $v=Symbol("forceQueryFn"),aE=e=>"function"==typeof e[$v];function iQ({serializeQueryArgs:e,queryThunk:t,mutationThunk:n,api:r,context:o}){const a=new Map,i=new Map,{unsubscribeQueryResult:s,removeMutationResult:u,updateSubscriptionOptions:l}=r.internalActions;return{buildInitiateQuery:function(n,o){const i=(u,{subscribe:c=!0,forceRefetch:d,subscriptionOptions:f,[$v]:p,...m}={})=>(v,h)=>{var g;const y=e({queryArgs:u,endpointDefinition:o,endpointName:n}),b=t({...m,type:"query",subscribe:c,forceRefetch:d,subscriptionOptions:f,endpointName:n,originalArgs:u,queryCacheKey:y,[$v]:p}),w=r.endpoints[n].select(u),x=v(b),_=w(h()),{requestId:E,abort:S}=x,I=_.requestId!==E,A=null==(g=a.get(v))?void 0:g[y],k=()=>w(h()),C=Object.assign(p?x.then(k):I&&!A?Promise.resolve(_):Promise.all([A,x]).then(k),{arg:u,requestId:E,subscriptionOptions:f,queryCacheKey:y,abort:S,async unwrap(){const e=await C;if(e.isError)throw e.error;return e.data},refetch:()=>v(i(u,{subscribe:!1,forceRefetch:!0})),unsubscribe(){c&&v(s({queryCacheKey:y,requestId:E}))},updateSubscriptionOptions(e){C.subscriptionOptions=e,v(l({endpointName:n,requestId:E,queryCacheKey:y,options:e}))}});if(!A&&!I&&!p){const e=a.get(v)||{};e[y]=C,a.set(v,e),C.then((()=>{delete e[y],Om(e)||a.delete(v)}))}return C};return i},buildInitiateMutation:function(e){return(t,{track:r=!0,fixedCacheKey:o}={})=>(a,s)=>{const l=n({type:"mutation",endpointName:e,originalArgs:t,track:r,fixedCacheKey:o}),c=a(l),{requestId:d,abort:f,unwrap:p}=c,m=oQ(c.unwrap().then((e=>({data:e}))),(e=>({error:e}))),v=Object.assign(m,{arg:c.arg,requestId:d,abort:f,unwrap:p,reset:()=>{a(u({requestId:d,fixedCacheKey:o}))}}),h=i.get(a)||{};return i.set(a,h),h[d]=v,v.then((()=>{delete h[d],Om(h)||i.delete(a)})),o&&(h[o]=v,v.then((()=>{h[o]===v&&(delete h[o],Om(h)||i.delete(a))}))),v}},getRunningQueryThunk:function(t,n){return r=>{var i;const s=o.endpointDefinitions[t],u=e({queryArgs:n,endpointDefinition:s,endpointName:t});return null==(i=a.get(r))?void 0:i[u]}},getRunningMutationThunk:function(e,t){return e=>{var n;return null==(n=i.get(e))?void 0:n[t]}},getRunningQueriesThunk:function(){return e=>Object.values(a.get(e)||{}).filter(h2)},getRunningMutationsThunk:function(){return e=>Object.values(i.get(e)||{}).filter(h2)}}}function v2(e){return e}function aQ({reducerPath:e,baseQuery:t,context:{endpointDefinitions:n},serializeQueryArgs:r,api:o,assertTagType:a}){const i=async(e,{signal:r,abort:o,rejectWithValue:a,fulfillWithValue:i,dispatch:u,getState:l,extra:c})=>{const d=n[e.endpointName];try{let n,a=v2;const f={signal:r,abort:o,dispatch:u,getState:l,extra:c,endpoint:e.endpointName,type:e.type,forced:"query"===e.type?s(e,l()):void 0},p="query"===e.type?e[$v]:void 0;if(p?n=p():d.query?(n=await t(d.query(e.originalArgs),f,d.extraOptions),d.transformResponse&&(a=d.transformResponse)):n=await d.queryFn(e.originalArgs,f,d.extraOptions,(e=>t(e,f,d.extraOptions))),typeof process<"u"&&qY.NODE_ENV,n.error)throw new m2(n.error,n.meta);return i(await a(n.data,n.meta,e.originalArgs),{fulfilledTimeStamp:Date.now(),baseQueryMeta:n.meta,[Yh]:!0})}catch(t){let n=t;if(n instanceof m2){let t=v2;d.query&&d.transformErrorResponse&&(t=d.transformErrorResponse);try{return a(await t(n.value,n.meta,e.originalArgs),{baseQueryMeta:n.meta,[Yh]:!0})}catch(e){n=e}}throw console.error(n),n}};function s(t,n){var r,o,a;const i=null==(o=null==(r=n[e])?void 0:r.queries)?void 0:o[t.queryCacheKey],s=null==(a=n[e])?void 0:a.config.refetchOnMountOrArgChange,u=null==i?void 0:i.fulfilledTimeStamp,l=t.forceRefetch??(t.subscribe&&s);return!!l&&(!0===l||(Number(new Date)-Number(u))/1e3>=l)}const u=vC(`${e}/executeQuery`,i,{getPendingMeta:()=>({startedTimeStamp:Date.now(),[Yh]:!0}),condition(t,{getState:r}){var o,a,i;const u=r(),l=null==(a=null==(o=u[e])?void 0:o.queries)?void 0:a[t.queryCacheKey],c=null==l?void 0:l.fulfilledTimeStamp,d=t.originalArgs,f=null==l?void 0:l.originalArgs,p=n[t.endpointName];return!!aE(t)||"pending"!==(null==l?void 0:l.status)&&(!!(s(t,u)||_3(p)&&null!=(i=null==p?void 0:p.forceRefetch)&&i.call(p,{currentArg:d,previousArg:f,endpointState:l,state:u}))||!c)},dispatchConditionRejection:!0}),l=vC(`${e}/executeMutation`,i,{getPendingMeta:()=>({startedTimeStamp:Date.now(),[Yh]:!0})});function c(e){return t=>{var n,r;return(null==(r=null==(n=null==t?void 0:t.meta)?void 0:n.arg)?void 0:r.endpointName)===e}}return{queryThunk:u,mutationThunk:l,prefetch:(e,t,n)=>(r,a)=>{const i=(e=>"force"in e)(n)&&n.force,s=(e=>"ifOlderThan"in e)(n)&&n.ifOlderThan,u=(n=!0)=>{const r={forceRefetch:n,isPrefetch:!0};return o.endpoints[e].initiate(t,r)},l=o.endpoints[e].select(t)(a());if(i)r(u());else if(s){const e=null==l?void 0:l.fulfilledTimeStamp;if(!e)return void r(u());(Number(new Date)-Number(new Date(e)))/1e3>=s&&r(u())}else r(u(!1))},updateQueryData:(e,t,n,r=!0)=>(a,i)=>{const s=o.endpoints[e].select(t)(i());let u,l={patches:[],inversePatches:[],undo:()=>a(o.util.patchQueryData(e,t,l.inversePatches,r))};if("uninitialized"===s.status)return l;if("data"in s)if(ys(s.data)){const[e,t,r]=G2(s.data,n);l.patches.push(...t),l.inversePatches.push(...r),u=e}else u=n(s.data),l.patches.push({op:"replace",path:[],value:u}),l.inversePatches.push({op:"replace",path:[],value:s.data});return a(o.util.patchQueryData(e,t,l.patches,r)),l},upsertQueryData:(e,t,n)=>r=>r(o.endpoints[e].initiate(t,{subscribe:!1,forceRefetch:!0,[$v]:()=>({data:n})})),patchQueryData:(e,t,i,s)=>(u,l)=>{const c=n[e],d=r({queryArgs:t,endpointDefinition:c,endpointName:e});if(u(o.internalActions.queryResultPatched({queryCacheKey:d,patches:i})),!s)return;const f=o.endpoints[e].select(t)(l()),p=Y$(c.providesTags,f.data,void 0,t,{},a);u(o.internalActions.updateProvidedBy({queryCacheKey:d,providedTags:p}))},buildMatchThunkActions:function(e,t){return{matchPending:nv(fE(e),c(t)),matchFulfilled:nv(dd(e),c(t)),matchRejected:nv(Mm(e),c(t))}}}}function x3(e,t,n,r){return Y$(n[e.meta.arg.endpointName][t],dd(e)?e.payload:void 0,py(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,r)}function kg(e,t,n){const r=e[t];r&&n(r)}function Cv(e){return("arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)??e.requestId}function g2(e,t,n){const r=e[Cv(t)];r&&n(r)}var Hh={};function sQ({reducerPath:e,queryThunk:t,mutationThunk:n,context:{endpointDefinitions:r,apiUid:o,extractRehydrationInfo:a,hasRehydrationInfo:i},assertTagType:s,config:u}){const l=Vn(`${e}/resetApiState`),c=oo({name:`${e}/queries`,initialState:Hh,reducers:{removeQueryResult:{reducer(e,{payload:{queryCacheKey:t}}){delete e[t]},prepare:jh()},queryResultPatched:{reducer(e,{payload:{queryCacheKey:t,patches:n}}){kg(e,t,(e=>{e.data=dC(e.data,n.concat())}))},prepare:jh()}},extraReducers(e){e.addCase(t.pending,((e,{meta:t,meta:{arg:n}})=>{var r;const o=aE(n);e[r=n.queryCacheKey]??(e[r]={status:"uninitialized",endpointName:n.endpointName}),kg(e,n.queryCacheKey,(e=>{e.status="pending",e.requestId=o&&e.requestId?e.requestId:t.requestId,void 0!==n.originalArgs&&(e.originalArgs=n.originalArgs),e.startedTimeStamp=t.startedTimeStamp}))})).addCase(t.fulfilled,((e,{meta:t,payload:n})=>{kg(e,t.arg.queryCacheKey,(e=>{if(e.requestId!==t.requestId&&!aE(t.arg))return;const{merge:o}=r[t.arg.endpointName];if(e.status="fulfilled",o)if(void 0!==e.data){const{fulfilledTimeStamp:r,arg:a,baseQueryMeta:i,requestId:s}=t;let u=Pv(e.data,(e=>o(e,n,{arg:a.originalArgs,baseQueryMeta:i,fulfilledTimeStamp:r,requestId:s})));e.data=u}else e.data=n;else e.data=r[t.arg.endpointName].structuralSharing??1?y3(gs(e.data)?Z3(e.data):e.data,n):n;delete e.error,e.fulfilledTimeStamp=t.fulfilledTimeStamp}))})).addCase(t.rejected,((e,{meta:{condition:t,arg:n,requestId:r},error:o,payload:a})=>{kg(e,n.queryCacheKey,(e=>{if(!t){if(e.requestId!==r)return;e.status="rejected",e.error=a??o}}))})).addMatcher(i,((e,t)=>{const{queries:n}=a(t);for(const[t,r]of Object.entries(n))("fulfilled"===(null==r?void 0:r.status)||"rejected"===(null==r?void 0:r.status))&&(e[t]=r)}))}}),d=oo({name:`${e}/mutations`,initialState:Hh,reducers:{removeMutationResult:{reducer(e,{payload:t}){const n=Cv(t);n in e&&delete e[n]},prepare:jh()}},extraReducers(e){e.addCase(n.pending,((e,{meta:t,meta:{requestId:n,arg:r,startedTimeStamp:o}})=>{r.track&&(e[Cv(t)]={requestId:n,status:"pending",endpointName:r.endpointName,startedTimeStamp:o})})).addCase(n.fulfilled,((e,{payload:t,meta:n})=>{n.arg.track&&g2(e,n,(e=>{e.requestId===n.requestId&&(e.status="fulfilled",e.data=t,e.fulfilledTimeStamp=n.fulfilledTimeStamp)}))})).addCase(n.rejected,((e,{payload:t,error:n,meta:r})=>{r.arg.track&&g2(e,r,(e=>{e.requestId===r.requestId&&(e.status="rejected",e.error=t??n)}))})).addMatcher(i,((e,t)=>{const{mutations:n}=a(t);for(const[t,r]of Object.entries(n))("fulfilled"===(null==r?void 0:r.status)||"rejected"===(null==r?void 0:r.status))&&t!==(null==r?void 0:r.requestId)&&(e[t]=r)}))}}),f=oo({name:`${e}/invalidation`,initialState:Hh,reducers:{updateProvidedBy:{reducer(e,t){var n,r;const{queryCacheKey:o,providedTags:a}=t.payload;for(const t of Object.values(e))for(const e of Object.values(t)){const t=e.indexOf(o);-1!==t&&e.splice(t,1)}for(const{type:t,id:i}of a){const a=(n=e[t]??(e[t]={}))[r=i||"__internal_without_id"]??(n[r]=[]);a.includes(o)||a.push(o)}},prepare:jh()}},extraReducers(e){e.addCase(c.actions.removeQueryResult,((e,{payload:{queryCacheKey:t}})=>{for(const n of Object.values(e))for(const e of Object.values(n)){const n=e.indexOf(t);-1!==n&&e.splice(n,1)}})).addMatcher(i,((e,t)=>{var n,r;const{provided:o}=a(t);for(const[t,a]of Object.entries(o))for(const[o,i]of Object.entries(a)){const a=(n=e[t]??(e[t]={}))[r=o||"__internal_without_id"]??(n[r]=[]);for(const e of i)a.includes(e)||a.push(e)}})).addMatcher(cd(dd(t),py(t)),((e,t)=>{const n=x3(t,"providesTags",r,s),{queryCacheKey:o}=t.meta.arg;f.caseReducers.updateProvidedBy(e,f.actions.updateProvidedBy({queryCacheKey:o,providedTags:n}))}))}}),p=oo({name:`${e}/subscriptions`,initialState:Hh,reducers:{updateSubscriptionOptions(e,t){},unsubscribeQueryResult(e,t){},internal_getRTKQSubscriptions(){}}}),m=oo({name:`${e}/internalSubscriptions`,initialState:Hh,reducers:{subscriptionsUpdated:{reducer:(e,t)=>dC(e,t.payload),prepare:jh()}}}),v=oo({name:`${e}/config`,initialState:{online:XY(),focused:JY(),middlewareRegistered:!1,...u},reducers:{middlewareRegistered(e,{payload:t}){e.middlewareRegistered="conflict"!==e.middlewareRegistered&&o===t||"conflict"}},extraReducers:e=>{e.addCase(K$,(e=>{e.online=!0})).addCase(b3,(e=>{e.online=!1})).addCase(H$,(e=>{e.focused=!0})).addCase(w3,(e=>{e.focused=!1})).addMatcher(i,(e=>({...e})))}}),h=F2({queries:c.reducer,mutations:d.reducer,provided:f.reducer,subscriptions:m.reducer,config:v.reducer});return{reducer:(e,t)=>h(l.match(t)?void 0:e,t),actions:{...v.actions,...c.actions,...p.actions,...m.actions,...d.actions,...f.actions,resetApiState:l}}}var Ff=Symbol.for("RTKQ/skipToken"),S3={status:"uninitialized"},y2=Pv(S3,(()=>{})),w2=Pv(S3,(()=>{}));function uQ({serializeQueryArgs:e,reducerPath:t,createSelector:n}){const r=e=>y2,o=e=>w2;return{buildQuerySelector:function(t,o){return s=>{const u=e({queryArgs:s,endpointDefinition:o,endpointName:t});return n(s===Ff?r:e=>{var t,n;return(null==(n=null==(t=i(e))?void 0:t.queries)?void 0:n[u])??y2},a)}},buildMutationSelector:function(){return e=>{let t;return t="object"==typeof e?Cv(e)??Ff:e,n(t===Ff?o:e=>{var n,r;return(null==(r=null==(n=i(e))?void 0:n.mutations)?void 0:r[t])??w2},a)}},selectInvalidatedBy:function(e,n){const r=e[t],o=new Set;for(const e of n.map(iE)){const t=r.provided[e.type];if(!t)continue;let n=(void 0!==e.id?t[e.id]:c2(Object.values(t)))??[];for(const e of n)o.add(e)}return c2(Array.from(o.values()).map((e=>{const t=r.queries[e];return t?[{queryCacheKey:e,endpointName:t.endpointName,originalArgs:t.originalArgs}]:[]})))},selectCachedArgsForQuery:function(e,n){return Object.values(e[t].queries).filter((e=>(null==e?void 0:e.endpointName)===n&&"uninitialized"!==e.status)).map((e=>e.originalArgs))}};function a(e){return{...e,...GY(e.status)}}function i(e){return e[t]}}var Sm=WeakMap?new WeakMap:void 0,b2=({endpointName:e,queryArgs:t})=>{let n="";const r=null==Sm?void 0:Sm.get(t);if("string"==typeof r)n=r;else{const e=JSON.stringify(t,((e,t)=>ld(t)?Object.keys(t).sort().reduce(((e,n)=>(e[n]=t[n],e)),{}):t));ld(t)&&(null==Sm||Sm.set(t,e)),n=e}return`${e}(${n})`};function lQ(...e){return function(t){const n=fv((e=>{var n;return null==(n=t.extractRehydrationInfo)?void 0:n.call(t,e,{reducerPath:t.reducerPath??"api"})})),r={reducerPath:"api",keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1,invalidationBehavior:"delayed",...t,extractRehydrationInfo:n,serializeQueryArgs(e){let n=b2;if("serializeQueryArgs"in e.endpointDefinition){const t=e.endpointDefinition.serializeQueryArgs;n=e=>{const n=t(e);return"string"==typeof n?n:b2({...e,queryArgs:n})}}else t.serializeQueryArgs&&(n=t.serializeQueryArgs);return n(e)},tagTypes:[...t.tagTypes||[]]},o={endpointDefinitions:{},batch(e){e()},apiUid:dy(),extractRehydrationInfo:n,hasRehydrationInfo:fv((e=>null!=n(e)))},a={injectEndpoints:function(e){const t=e.endpoints({query:e=>({...e,type:"query"}),mutation:e=>({...e,type:"mutation"})});for(const[n,r]of Object.entries(t))if(!0!==e.overrideExisting&&n in o.endpointDefinitions){if("throw"===e.overrideExisting)throw new Error($o(39))}else{o.endpointDefinitions[n]=r;for(const e of i)e.injectEndpoint(n,r)}return a},enhanceEndpoints({addTagTypes:e,endpoints:t}){if(e)for(const t of e)r.tagTypes.includes(t)||r.tagTypes.push(t);if(t)for(const[e,n]of Object.entries(t))"function"==typeof n?n(o.endpointDefinitions[e]):Object.assign(o.endpointDefinitions[e]||{},n);return a}},i=e.map((e=>e.init(a,r,o)));return a.injectEndpoints({endpoints:t.endpoints})}}function cQ(e){for(let t in e)return!1;return!0}var dQ=2147482.647,fQ=({reducerPath:e,api:t,context:n,internalState:r})=>{const{removeQueryResult:o,unsubscribeQueryResult:a}=t.internalActions;function i(e){const t=r.currentSubscriptions[e];return!!t&&!cQ(t)}const s={};function u(e,t,r,a){const u=n.endpointDefinitions[t],l=(null==u?void 0:u.keepUnusedDataFor)??a.keepUnusedDataFor;if(l===1/0)return;const c=Math.max(0,Math.min(l,dQ));if(!i(e)){const t=s[e];t&&clearTimeout(t),s[e]=setTimeout((()=>{i(e)||r.dispatch(o({queryCacheKey:e})),delete s[e]}),1e3*c)}}return(r,o,i)=>{var l;if(a.match(r)){const t=o.getState()[e],{queryCacheKey:n}=r.payload;u(n,null==(l=t.queries[n])?void 0:l.endpointName,o,t.config)}if(t.util.resetApiState.match(r))for(const[e,t]of Object.entries(s))t&&clearTimeout(t),delete s[e];if(n.hasRehydrationInfo(r)){const t=o.getState()[e],{queries:a}=n.extractRehydrationInfo(r);for(const[e,n]of Object.entries(a))u(e,null==n?void 0:n.endpointName,o,t.config)}}},pQ=({reducerPath:e,context:t,context:{endpointDefinitions:n},mutationThunk:r,queryThunk:o,api:a,assertTagType:i,refetchQuery:s,internalState:u})=>{const{removeQueryResult:l}=a.internalActions,c=cd(dd(r),py(r)),d=cd(dd(r,o),Mm(r,o));let f=[];function p(n,r){const o=r.getState(),i=o[e];if(f.push(...n),"delayed"===i.config.invalidationBehavior&&function(e){var t,n;for(const n in e.queries)if("pending"===(null==(t=e.queries[n])?void 0:t.status))return!0;for(const t in e.mutations)if("pending"===(null==(n=e.mutations[t])?void 0:n.status))return!0;return!1}(i))return;const c=f;if(f=[],0===c.length)return;const d=a.util.selectInvalidatedBy(o,c);t.batch((()=>{const e=Array.from(d.values());for(const{queryCacheKey:t}of e){const e=i.queries[t],n=u.currentSubscriptions[t]??{};e&&(0===Om(n)?r.dispatch(l({queryCacheKey:t})):"uninitialized"!==e.status&&r.dispatch(s(e,t)))}}))}return(e,t)=>{c(e)?p(x3(e,"invalidatesTags",n,i),t):d(e)?p([],t):a.util.invalidateTags.match(e)&&p(Y$(e.payload,void 0,void 0,void 0,void 0,i),t)}},mQ=({reducerPath:e,queryThunk:t,api:n,refetchQuery:r,internalState:o})=>{const a={};function i({queryCacheKey:t},n){const s=n.getState()[e],u=s.queries[t],c=o.currentSubscriptions[t];if(!u||"uninitialized"===u.status)return;const{lowestPollingInterval:d,skipPollingIfUnfocused:f}=l(c);if(!Number.isFinite(d))return;const p=a[t];null!=p&&p.timeout&&(clearTimeout(p.timeout),p.timeout=void 0);const m=Date.now()+d;a[t]={nextPollTimestamp:m,pollingInterval:d,timeout:setTimeout((()=>{(s.config.focused||!f)&&n.dispatch(r(u,t)),i({queryCacheKey:t},n)}),d)}}function s({queryCacheKey:t},n){const r=n.getState()[e].queries[t],s=o.currentSubscriptions[t];if(!r||"uninitialized"===r.status)return;const{lowestPollingInterval:c}=l(s);if(!Number.isFinite(c))return void u(t);const d=a[t],f=Date.now()+c;(!d||f<d.nextPollTimestamp)&&i({queryCacheKey:t},n)}function u(e){const t=a[e];null!=t&&t.timeout&&clearTimeout(t.timeout),delete a[e]}function l(e={}){let t=!1,n=Number.POSITIVE_INFINITY;for(let r in e)e[r].pollingInterval&&(n=Math.min(e[r].pollingInterval,n),t=e[r].skipPollingIfUnfocused||t);return{lowestPollingInterval:n,skipPollingIfUnfocused:t}}return(e,r)=>{(n.internalActions.updateSubscriptionOptions.match(e)||n.internalActions.unsubscribeQueryResult.match(e))&&s(e.payload,r),(t.pending.match(e)||t.rejected.match(e)&&e.meta.condition)&&s(e.meta.arg,r),(t.fulfilled.match(e)||t.rejected.match(e)&&!e.meta.condition)&&i(e.meta.arg,r),n.util.resetApiState.match(e)&&function(){for(const e of Object.keys(a))u(e)}()}},hQ=({reducerPath:e,context:t,api:n,refetchQuery:r,internalState:o})=>{const{removeQueryResult:a}=n.internalActions;function i(n,i){const s=n.getState()[e],u=s.queries,l=o.currentSubscriptions;t.batch((()=>{for(const e of Object.keys(l)){const t=u[e],o=l[e];o&&t&&((Object.values(o).some((e=>!0===e[i]))||Object.values(o).every((e=>void 0===e[i]))&&s.config[i])&&(0===Om(o)?n.dispatch(a({queryCacheKey:e})):"uninitialized"!==t.status&&n.dispatch(r(t,e))))}}))}return(e,t)=>{H$.match(e)&&i(t,"refetchOnFocus"),K$.match(e)&&i(t,"refetchOnReconnect")}},_2=new Error("Promise never resolved before cacheEntryRemoved."),vQ=({api:e,reducerPath:t,context:n,queryThunk:r,mutationThunk:o,internalState:a})=>{const i=CS(r),s=CS(o),u=dd(r,o),l={};function c(t,r,o,a,i){const s=n.endpointDefinitions[t],u=null==s?void 0:s.onCacheEntryAdded;if(!u)return;let c={};const d=new Promise((e=>{c.cacheEntryRemoved=e})),f=Promise.race([new Promise((e=>{c.valueResolved=e})),d.then((()=>{throw _2}))]);f.catch((()=>{})),l[o]=c;const p=e.endpoints[t].select("query"===s.type?r:o),m=a.dispatch(((e,t,n)=>n)),v={...a,getCacheEntry:()=>p(a.getState()),requestId:i,extra:m,updateCachedData:"query"===s.type?n=>a.dispatch(e.util.updateQueryData(t,r,n)):void 0,cacheDataLoaded:f,cacheEntryRemoved:d},h=u(r,v);Promise.resolve(h).catch((e=>{if(e!==_2)throw e}))}return(n,a,d)=>{const f=function(t){return i(t)?t.meta.arg.queryCacheKey:s(t)?t.meta.arg.fixedCacheKey??t.meta.requestId:e.internalActions.removeQueryResult.match(t)?t.payload.queryCacheKey:e.internalActions.removeMutationResult.match(t)?Cv(t.payload):""}(n);if(r.pending.match(n)){const e=d[t].queries[f],r=a.getState()[t].queries[f];!e&&r&&c(n.meta.arg.endpointName,n.meta.arg.originalArgs,f,a,n.meta.requestId)}else if(o.pending.match(n))a.getState()[t].mutations[f]&&c(n.meta.arg.endpointName,n.meta.arg.originalArgs,f,a,n.meta.requestId);else if(u(n)){const e=l[f];null!=e&&e.valueResolved&&(e.valueResolved({data:n.payload,meta:n.meta.baseQueryMeta}),delete e.valueResolved)}else if(e.internalActions.removeQueryResult.match(n)||e.internalActions.removeMutationResult.match(n)){const e=l[f];e&&(delete l[f],e.cacheEntryRemoved())}else if(e.util.resetApiState.match(n))for(const[e,t]of Object.entries(l))delete l[e],t.cacheEntryRemoved()}},gQ=({api:e,context:t,queryThunk:n,mutationThunk:r})=>{const o=fE(n,r),a=Mm(n,r),i=dd(n,r),s={};return(n,r)=>{var u,l;if(o(n)){const{requestId:o,arg:{endpointName:a,originalArgs:i}}=n.meta,u=t.endpointDefinitions[a],l=null==u?void 0:u.onQueryStarted;if(l){const t={},n=new Promise(((e,n)=>{t.resolve=e,t.reject=n}));n.catch((()=>{})),s[o]=t;const c=e.endpoints[a].select("query"===u.type?i:o),d=r.dispatch(((e,t,n)=>n)),f={...r,getCacheEntry:()=>c(r.getState()),requestId:o,extra:d,updateCachedData:"query"===u.type?t=>r.dispatch(e.util.updateQueryData(a,i,t)):void 0,queryFulfilled:n};l(i,f)}}else if(i(n)){const{requestId:e,baseQueryMeta:t}=n.meta;null==(u=s[e])||u.resolve({data:n.payload,meta:t}),delete s[e]}else if(a(n)){const{requestId:e,rejectedWithValue:t,baseQueryMeta:r}=n.meta;null==(l=s[e])||l.reject({error:n.payload??n.error,isUnhandledError:!t,meta:r}),delete s[e]}}},yQ=({api:e,context:{apiUid:t},reducerPath:n})=>(n,r)=>{e.util.resetApiState.match(n)&&r.dispatch(e.internalActions.middlewareRegistered(t))},wQ=({api:e,queryThunk:t,internalState:n})=>{const r=`${e.reducerPath}/subscriptions`;let o=null,a=null;const{updateSubscriptionOptions:i,unsubscribeQueryResult:s}=e.internalActions,u=()=>n.currentSubscriptions,l={getSubscriptions:u,getSubscriptionCount:e=>Om(u()[e]??{}),isRequestSubscribed:(e,t)=>{var n;const r=u();return!(null==(n=null==r?void 0:r[e])||!n[t])}};return(u,c)=>{if(o||(o=JSON.parse(JSON.stringify(n.currentSubscriptions))),e.util.resetApiState.match(u))return o=n.currentSubscriptions={},a=null,[!0,!1];if(e.internalActions.internal_getRTKQSubscriptions.match(u))return[!1,l];const d=((n,r)=>{var o,a,u;if(i.match(r)){const{queryCacheKey:e,requestId:t,options:a}=r.payload;return null!=(o=null==n?void 0:n[e])&&o[t]&&(n[e][t]=a),!0}if(s.match(r)){const{queryCacheKey:e,requestId:t}=r.payload;return n[e]&&delete n[e][t],!0}if(e.internalActions.removeQueryResult.match(r))return delete n[r.payload.queryCacheKey],!0;if(t.pending.match(r)){const{meta:{arg:e,requestId:t}}=r,o=n[a=e.queryCacheKey]??(n[a]={});return o[`${t}_running`]={},e.subscribe&&(o[t]=e.subscriptionOptions??o[t]??{}),!0}let l=!1;if(t.fulfilled.match(r)||t.rejected.match(r)){const e=n[r.meta.arg.queryCacheKey]||{},t=`${r.meta.requestId}_running`;l||(l=!!e[t]),delete e[t]}if(t.rejected.match(r)){const{meta:{condition:e,arg:t,requestId:o}}=r;if(e&&t.subscribe){const e=n[u=t.queryCacheKey]??(n[u]={});e[o]=t.subscriptionOptions??e[o]??{},l=!0}}return l})(n.currentSubscriptions,u);let f=!0;if(d){a||(a=setTimeout((()=>{const t=JSON.parse(JSON.stringify(n.currentSubscriptions)),[,r]=G2(o,(()=>t));c.next(e.internalActions.subscriptionsUpdated(r)),o=t,a=null}),500));const i="string"==typeof u.type&&!!u.type.startsWith(r),s=t.rejected.match(u)&&u.meta.condition&&!!u.meta.arg.subscribe;f=!i&&!s}return[f,!1]}};function bQ(e){const{reducerPath:t,queryThunk:n,api:r,context:o}=e,{apiUid:a}=o,i={invalidateTags:Vn(`${t}/invalidateTags`)},s=e=>e.type.startsWith(`${t}/`),u=[yQ,fQ,pQ,mQ,vQ,gQ];return{middleware:n=>{let i=!1;const c={...e,internalState:{currentSubscriptions:{}},refetchQuery:l,isThisApiSliceAction:s},d=u.map((e=>e(c))),f=wQ(c),p=hQ(c);return e=>u=>{if(!B2(u))return e(u);i||(i=!0,n.dispatch(r.internalActions.middlewareRegistered(a)));const l={...n,next:e},c=n.getState(),[m,v]=f(u,l,c);let h;if(h=m?e(u):v,n.getState()[t]&&(p(u,l,c),s(u)||o.hasRehydrationInfo(u)))for(let e of d)e(u,l,c);return h}},actions:i};function l(e,t,r={}){return n({type:"query",endpointName:e.endpointName,originalArgs:e.originalArgs,subscribe:!1,forceRefetch:!0,queryCacheKey:t,...r})}}function rd(e,...t){return Object.assign(e,...t)}var x2=Symbol(),_Q=({createSelector:e=Zn}={})=>({name:x2,init(t,{baseQuery:n,tagTypes:r,reducerPath:o,serializeQueryArgs:a,keepUnusedDataFor:i,refetchOnMountOrArgChange:s,refetchOnFocus:u,refetchOnReconnect:l,invalidationBehavior:c},d){uL();const f=e=>e;Object.assign(t,{reducerPath:o,endpoints:{},internalActions:{onOnline:K$,onOffline:b3,onFocus:H$,onFocusLost:w3},util:{}});const{queryThunk:p,mutationThunk:m,patchQueryData:v,updateQueryData:h,upsertQueryData:g,prefetch:y,buildMatchThunkActions:b}=aQ({baseQuery:n,reducerPath:o,context:d,api:t,serializeQueryArgs:a,assertTagType:f}),{reducer:w,actions:x}=sQ({context:d,queryThunk:p,mutationThunk:m,reducerPath:o,assertTagType:f,config:{refetchOnFocus:u,refetchOnReconnect:l,refetchOnMountOrArgChange:s,keepUnusedDataFor:i,reducerPath:o,invalidationBehavior:c}});rd(t.util,{patchQueryData:v,updateQueryData:h,upsertQueryData:g,prefetch:y,resetApiState:x.resetApiState}),rd(t.internalActions,x);const{middleware:_,actions:E}=bQ({reducerPath:o,context:d,queryThunk:p,mutationThunk:m,api:t,assertTagType:f});rd(t.util,E),rd(t,{reducer:w,middleware:_});const{buildQuerySelector:S,buildMutationSelector:I,selectInvalidatedBy:A,selectCachedArgsForQuery:k}=uQ({serializeQueryArgs:a,reducerPath:o,createSelector:e});rd(t.util,{selectInvalidatedBy:A,selectCachedArgsForQuery:k});const{buildInitiateQuery:C,buildInitiateMutation:P,getRunningMutationThunk:R,getRunningMutationsThunk:O,getRunningQueriesThunk:T,getRunningQueryThunk:N}=iQ({queryThunk:p,mutationThunk:m,api:t,serializeQueryArgs:a,context:d});return rd(t.util,{getRunningMutationThunk:R,getRunningMutationsThunk:O,getRunningQueryThunk:N,getRunningQueriesThunk:T}),{name:x2,injectEndpoint(e,n){var r;const o=t;(r=o.endpoints)[e]??(r[e]={}),_3(n)?rd(o.endpoints[e],{name:e,select:S(e,n),initiate:C(e,n)},b(p,e)):nQ(n)&&rd(o.endpoints[e],{name:e,select:I(),initiate:P(e)},b(m,e))}}}});function xQ(e){return"query"===e.type}function SQ(e){return"mutation"===e.type}function Lg(e,...t){return Object.assign(e,...t)}function dS(e){return e.replace(e[0],e[0].toUpperCase())}var Em=WeakMap?new WeakMap:void 0,EQ=({endpointName:e,queryArgs:t})=>{let n="";const r=null==Em?void 0:Em.get(t);if("string"==typeof r)n=r;else{const e=JSON.stringify(t,((e,t)=>ld(t)?Object.keys(t).sort().reduce(((e,n)=>(e[n]=t[n],e)),{}):t));ld(t)&&(null==Em||Em.set(t,e)),n=e}return`${e}(${n})`},fS=Symbol();function S2(e,t,n,r){const o=v.useMemo((()=>({queryArgs:e,serialized:"object"==typeof e?t({queryArgs:e,endpointDefinition:n,endpointName:r}):e})),[e,t,n,r]),a=v.useRef(o);return v.useEffect((()=>{a.current.serialized!==o.serialized&&(a.current=o)}),[o]),a.current.serialized===o.serialized?a.current.queryArgs:e}function pS(e){const t=v.useRef(e);return v.useEffect((()=>{rv(t.current,e)||(t.current=e)}),[e]),rv(t.current,e)?t.current:e}var $Q=typeof window<"u"&&window.document&&window.document.createElement?v.useLayoutEffect:v.useEffect,CQ=e=>e.isUninitialized?{...e,isUninitialized:!1,isFetching:!0,isLoading:void 0===e.data,status:g3.pending}:e;function IQ({api:e,moduleOptions:{batch:t,hooks:{useDispatch:n,useSelector:r,useStore:o},unstable__sideEffectsInRender:a,createSelector:i},serializeQueryArgs:s,context:u}){const l=a?e=>e():v.useEffect;return{buildQueryHooks:function(a){const d=(t,{refetchOnReconnect:r,refetchOnFocus:o,refetchOnMountOrArgChange:i,skip:s=!1,pollingInterval:c=0,skipPollingIfUnfocused:d=!1}={})=>{const{initiate:f}=e.endpoints[a],p=n(),m=v.useRef();if(!m.current){const t=p(e.internalActions.internal_getRTKQSubscriptions());m.current=t}const h=S2(s?Ff:t,EQ,u.endpointDefinitions[a],a),g=pS({refetchOnReconnect:r,refetchOnFocus:o,pollingInterval:c,skipPollingIfUnfocused:d}),y=v.useRef(!1),b=v.useRef();let{queryCacheKey:w,requestId:x}=b.current||{},_=!1;w&&x&&(_=m.current.isRequestSubscribed(w,x));const E=!_&&y.current;return l((()=>{y.current=_})),l((()=>{E&&(b.current=void 0)}),[E]),l((()=>{var e;const t=b.current;if(h===Ff)return null==t||t.unsubscribe(),void(b.current=void 0);const n=null==(e=b.current)?void 0:e.subscriptionOptions;if(t&&t.arg===h)g!==n&&t.updateSubscriptionOptions(g);else{null==t||t.unsubscribe();const e=p(f(h,{subscriptionOptions:g,forceRefetch:i}));b.current=e}}),[p,f,i,h,g,E]),v.useEffect((()=>()=>{var e;null==(e=b.current)||e.unsubscribe(),b.current=void 0}),[]),v.useMemo((()=>({refetch:()=>{var e;if(!b.current)throw new Error($o(38));return null==(e=b.current)?void 0:e.refetch()}})),[])},f=({refetchOnReconnect:r,refetchOnFocus:o,pollingInterval:i=0,skipPollingIfUnfocused:s=!1}={})=>{const{initiate:u}=e.endpoints[a],c=n(),[d,f]=v.useState(fS),p=v.useRef(),m=pS({refetchOnReconnect:r,refetchOnFocus:o,pollingInterval:i,skipPollingIfUnfocused:s});l((()=>{var e,t;const n=null==(e=p.current)?void 0:e.subscriptionOptions;m!==n&&(null==(t=p.current)||t.updateSubscriptionOptions(m))}),[m]);const h=v.useRef(m);l((()=>{h.current=m}),[m]);const g=v.useCallback((function(e,n=!1){let r;return t((()=>{var t;null==(t=p.current)||t.unsubscribe(),p.current=r=c(u(e,{subscriptionOptions:h.current,forceRefetch:!n})),f(e)})),r}),[c,u]);return v.useEffect((()=>()=>{var e;null==(e=null==p?void 0:p.current)||e.unsubscribe()}),[]),v.useEffect((()=>{d!==fS&&!p.current&&g(d,!0)}),[d,g]),v.useMemo((()=>[g,d]),[g,d])},p=(t,{skip:n=!1,selectFromResult:l}={})=>{const{select:d}=e.endpoints[a],f=S2(n?Ff:t,s,u.endpointDefinitions[a],a),p=v.useRef(),m=v.useMemo((()=>i([d(f),(e,t)=>t,e=>f],c,{memoizeOptions:{resultEqualityCheck:rv}})),[d,f]),h=v.useMemo((()=>l?i([m],l,{devModeChecks:{identityFunctionCheck:"never"}}):m),[m,l]),g=r((e=>h(e,p.current)),rv),y=o(),b=m(y.getState(),p.current);return $Q((()=>{p.current=b}),[b]),g};return{useQueryState:p,useQuerySubscription:d,useLazyQuerySubscription:f,useLazyQuery(e){const[t,n]=f(e),r=p(n,{...e,skip:n===fS}),o=v.useMemo((()=>({lastArg:n})),[n]);return v.useMemo((()=>[t,r,o]),[t,r,o])},useQuery(e,t){const n=d(e,t),r=p(e,{selectFromResult:e===Ff||null!=t&&t.skip?void 0:CQ,...t}),{data:o,status:a,isLoading:i,isSuccess:s,isError:u,error:l}=r;return v.useDebugValue({data:o,status:a,isLoading:i,isSuccess:s,isError:u,error:l}),v.useMemo((()=>({...r,...n})),[r,n])}}},buildMutationHook:function(o){return({selectFromResult:a,fixedCacheKey:s}={})=>{const{select:u,initiate:l}=e.endpoints[o],c=n(),[d,f]=v.useState();v.useEffect((()=>()=>{null!=d&&d.arg.fixedCacheKey||null==d||d.reset()}),[d]);const p=v.useCallback((function(e){const t=c(l(e,{fixedCacheKey:s}));return f(t),t}),[c,l,s]),{requestId:m}=d||{},h=v.useMemo((()=>u({fixedCacheKey:s,requestId:null==d?void 0:d.requestId})),[s,d,u]),g=v.useMemo((()=>a?i([h],a):h),[a,h]),y=r(g,rv),b=null==s?null==d?void 0:d.arg.originalArgs:void 0,w=v.useCallback((()=>{t((()=>{d&&f(void 0),s&&c(e.internalActions.removeMutationResult({requestId:m,fixedCacheKey:s}))}))}),[c,s,d,m]),{endpointName:x,data:_,status:E,isLoading:S,isSuccess:I,isError:A,error:k}=y;v.useDebugValue({endpointName:x,data:_,status:E,isLoading:S,isSuccess:I,isError:A,error:k});const C=v.useMemo((()=>({...y,originalArgs:b,reset:w})),[y,b,w]);return v.useMemo((()=>[p,C]),[p,C])}},usePrefetch:function(t,r){const o=n(),a=pS(r);return v.useCallback(((n,r)=>o(e.util.prefetch(t,n,{...a,...r}))),[t,o,a])}};function c(e,t,n){if(null!=t&&t.endpointName&&e.isUninitialized){const{endpointName:e}=t,r=u.endpointDefinitions[e];s({queryArgs:t.originalArgs,endpointDefinition:r,endpointName:e})===s({queryArgs:n,endpointDefinition:r,endpointName:e})&&(t=void 0)}let r=e.isSuccess?e.data:null==t?void 0:t.data;void 0===r&&(r=e.data);const o=void 0!==r,a=e.isLoading,i=!o&&a,l=e.isSuccess||a&&o;return{...e,data:r,currentData:e.data,isFetching:a,isLoading:i,isSuccess:l}}}var RQ=Symbol(),PQ=({batch:e=l5,hooks:t={useDispatch:vE,useSelector:vy,useStore:Z2},createSelector:n=Zn,unstable__sideEffectsInRender:r=!1,...o}={})=>({name:RQ,init(o,{serializeQueryArgs:a},i){const s=o,{buildQueryHooks:u,buildMutationHook:l,usePrefetch:c}=IQ({api:o,moduleOptions:{batch:e,hooks:t,unstable__sideEffectsInRender:r,createSelector:n},serializeQueryArgs:a,context:i});return Lg(s,{usePrefetch:c}),Lg(i,{batch:e}),{injectEndpoint(e,t){if(xQ(t)){const{useQuery:t,useLazyQuery:n,useLazyQuerySubscription:r,useQueryState:a,useQuerySubscription:i}=u(e);Lg(s.endpoints[e],{useQuery:t,useLazyQuery:n,useLazyQuerySubscription:r,useQueryState:a,useQuerySubscription:i}),o[`use${dS(e)}Query`]=t,o[`useLazy${dS(e)}Query`]=n}else if(SQ(t)){const t=l(e);Lg(s.endpoints[e],{useMutation:t}),o[`use${dS(e)}Mutation`]=t}}}}}),TQ=lQ(_Q(),PQ());const E3=()=>I3()?location.hostname:location.hostname.replace(/\w\w\w\.|^/,"."),$3=e=>{const t=new Date;return t.setTime(t.getTime()+24*e*60*60*1e3),t.toUTCString()},C3=e=>Object.keys(e).reduce(((t,n)=>`${t}${n}${!0===e[n]?"":`=${e[n]}`};`),""),OQ=(e,t)=>{const n=Zy()?"":document.cookie,r=`; ${t||n}`.split(`; ${e}=`);if(2===r.length)return(r.pop()||"").replace("=","").split(";").shift()},AQ=(e,t)=>{Zy()||(document.cookie=C3({[e]:"",path:"/",domain:t||E3(),expires:"Thu, 01 Jan 1970 00:00:01 GMT"}))},MQ=["localhost","127.0.0.1","dev.localtest.me","wellesleydev.localtest.me"],I3=()=>MQ.includes(location.hostname),DQ=(e,t="",n=10,r)=>{Zy()||(document.cookie=C3({[e]:t,path:"/",domain:r||E3(),expires:$3(n),...!I3()&&{SameSite:"None",Secure:!0}}))},Q$={set:DQ,remove:AQ,get:OQ,getExpireDate:$3},X$="auth_token",R3=()=>Q$.get(X$)||void 0,NQ=e=>Q$.set(X$,e),kQ=()=>Q$.remove(X$),LQ=()=>!!R3(),J$={getToken:R3,setToken:NQ,removeToken:kQ,hasToken:LQ},FQ=e=>{J$.removeToken(),e(OH()),V$("user").clear()},BQ=e=>async(t,n,r)=>{const o=await e(t,n,r);return o.error&&[401].includes(o.error.status)&&FQ(n.dispatch),o},jQ=async(e,t=2e3)=>{for(;!e();)await new Promise((e=>setTimeout(e,t)))},zQ=5,VQ=e=>t=>!!e&&t.includes(e.status),E2=e=>new Promise((t=>setTimeout(t,1e3*e))),UQ=e=>async(t,n,r)=>{const o=(null==r?void 0:r.maxRetries)??5;await jQ((()=>n.getState().network.isOnline));let a=0;const i=async()=>{var s,u,l,c;const d=await e(t,n,r),f=d.error;if(a>=o)return d;a>0&&await E2(Math.pow(2,a)),a++;const p=VQ(f);switch(!0){case"mutation"===n.type:return d;case!navigator.onLine:case p([408,404]):case f&&"FETCH_ERROR"===(null==f?void 0:f.status):case f&&f.status>=500:return await i();case 429===(null==(s=null==d?void 0:d.error)?void 0:s.status):{const e=null==(c=null==(l=null==(u=d.meta)?void 0:u.response)?void 0:l.headers)?void 0:c.get("Retry-After");return await E2(+(e||"0")),await i()}default:return d}};return await i()},$2=Vn("requestOpenapiHydrationCacheHas"),C2=Vn("requestOpenapiHydrationCacheAdd"),I2=Vn("requestOpenapiHydrationCacheRemove"),R2=Vn("requestOpenapiHydrationCacheClear"),P2=Vn("sendOpenapiHydrationCacheResponse"),WQ=()=>Math.random().toString(16).slice(2),qQ=()=>{try{return!!Cm()&&window.location.origin!==window.parent.location.origin}catch{return!0}},Fg=()=>{const e=window.parent;return e.__wlsy_openapiHydrationCache||(e.__wlsy_openapiHydrationCache=new Set),e.__wlsy_openapiHydrationCache},Bg=new Set,GQ=()=>{const e=qQ(),t=new Map,n=(()=>{let n=null;return()=>{!e||n||(n=e3({sourceWindow:window.parent,onMessage:e=>{if(!P2.match(e))return;const{id:n,value:r,success:o,error:a}=e.payload,i=t.get(n);i&&(t.delete(n),window.clearTimeout(i.timeoutId),o?i.resolve(r):i.reject(new Error(a||"Unknown error")))},whitelist:[P2]}))}})(),r=(e,r)=>{const o=WQ();return new Promise(((a,i)=>{const s=window.setTimeout((()=>{t.delete(o),i(new Error("OpenAPI hydration cache request timed out"))}),8e3);t.set(o,{resolve:a,reject:i,timeoutId:s}),(e=>{n(),Zk({action:e,windowElement:window.parent,whitelist:[$2,C2,I2,R2]})})(e({id:o,...r}))}))};return{has:async t=>e?!!await r($2,{key:t}):(t=>Cm()&&!e?Fg().has(t):Bg.has(t))(t),add:async t=>{e?await r(C2,{key:t}):(t=>{!Cm()||e?Bg.add(t):Fg().add(t)})(t)},remove:async t=>{e?await r(I2,{key:t}):(t=>{!Cm()||e?Bg.delete(t):Fg().delete(t)})(t)},clear:async()=>{e?await r(R2,{}):!Cm()||e?Bg.clear():Fg().clear()}}},HQ=e=>"object"==typeof e&&null!==e,T2=GQ(),KQ=e=>async(t,n,r)=>{var o,a,i,s;if("mutation"===n.type)return e(t,n,r);const u=n.endpoint;if(!u||!(null!=r&&r.initialDataKey||null!=r&&r.initialDataKeyResolver||null!=r&&r.initialDataResolver))return e(t,n,r);const l=(null==(o=null==r?void 0:r.initialDataKeyResolver)?void 0:o.call(r,{endpoint:u,requestArgs:t}))??(null==r?void 0:r.initialDataKey),c=(null==(a=null==r?void 0:r.hydrationCacheKeyResolver)?void 0:a.call(r,{endpoint:u,requestArgs:t,initialDataKey:l}))??(l?`initialDataKey:${l}`:u);if(await T2.has(c))return e(t,n,r);const d=null==(i=n.getState().initialState)?void 0:i.value,f=(null==(s=null==r?void 0:r.initialDataResolver)?void 0:s.call(r,{endpoint:u,requestArgs:t,initialState:d}))??(()=>{if(l)return HQ(d)?d[l]:void 0})();return void 0===f?e(t,n,r):(await T2.add(c),{data:f})};var P3=(e=>(e.SERVER_RULES="serverRules",e.INVITE_PEOPLE="invitePeople",e))(P3||{});const n0="staticState",T3=V$(),Wg={path:"",baseUrl:"",search:""},YQ=e=>{if(!e)return Wg;try{return JSON.parse(decodeURIComponent(e))||Wg}catch(e){return ap.error("Error parsing static state",e),Wg}},O3=()=>new URLSearchParams(window.location.search).get(n0),QQ=({path:e,baseUrl:t,search:n}={})=>{const{pathname:r,origin:o,search:a}=window.location;return`${n0}=${encodeURIComponent(JSON.stringify({path:e||r,baseUrl:t||o,search:n||a}))}`},XQ=()=>{const e=O3();return e&&T3.setItem(n0,e),A3()},A3=()=>{try{const e=T3.getItem(n0)||O3();return YQ(e)}catch(e){return ap.error("Error parsing static state",e),Wg}},JQ={create:QQ,init:XQ,get:A3},ZQ=async e=>{const t={};e.headers.forEach(((e,n)=>{t[n]=e}));return{body:["get","head"].includes(e.method.toLowerCase())?null:await(async()=>{try{return await e.text()}catch(e){return ap.error("No body or error reading body:",e),null}})(),headers:t,url:e.url,method:e.method,mode:e.mode,credentials:e.credentials,cache:e.cache,redirect:e.redirect,referrer:e.referrer,integrity:e.integrity}},eX=e=>{const{url:t,status:n,statusText:r,headers:o,body:a}=e,i=new Response(JSON.stringify(a),{status:n,statusText:r,headers:o});return Object.defineProperties(i,{url:{value:t},type:{value:"cors"}}),i},tX=async e=>{const t=crypto.randomUUID();return new Promise(((n,r)=>{const o=e3({onMessage:({payload:{id:e,response:r}})=>{t===e&&(null==o||o(),n(eX(r)))},whitelist:[AK]});(async()=>{try{Zk({action:bO({id:t,options:await ZQ(e)}),windowElement:window.parent,whitelist:[bO]})}catch(e){r(e)}})()}))};new EventTarget;const Z$=()=>{var e;try{return(null==(e=window.wellesley)?void 0:e.v1)||window.wellesley}catch(e){ap.error("Error getting window.wellesley:",e)}},nX=e=>new Response(JSON.stringify(e),{status:200,statusText:"OK",headers:{"Content-Type":"application/json"}}),rX=e=>{var t,n;if(e.url.includes("accounts/profile")){const e=null==(n=null==(t=Z$())?void 0:t.initialState)?void 0:n.currentAccount;return!(null==e||!e.selectedUserId)&&nX(e)}},oX=Object.freeze(Object.defineProperty({__proto__:null,userHandler:rX},Symbol.toStringTag,{value:"Module"})),iX=e=>Object.values(oX).reduce(((t,n)=>t||n(e)),void 0),aX=async e=>iX(e)||await fetch(e),sX=()=>e=>Cm()?tX(e):aX(e),uX=JQ.get().baseUrl,lX=uX||"",cX=tQ({fetchFn:sX(),baseUrl:lX,responseHandler:e=>{const t=e.headers.get("content-type");if(!(null==t?void 0:t.startsWith("application/json")))return e.text();try{return e.json()}catch{return e.text()}},prepareHeaders:e=>{const t=J$.getToken();return t&&e.set("authorization",`Bearer ${t}`),e}}),dX=BQ(KQ(UQ(cX))),fX=TQ({tagTypes:["Secure","Post","Follow","Like","Settings","UserSettings","RBAC","Rbac_Config","Admin_Apps","Admin_Platform_Data","Admin_Ai_Agents_Assignments","Admin_Users","Admin_Groups","Admin_Audit_Logs","Admin_Reports","Admin_Signup_Requests","Admin_Posts","Admin_Uploads","Admin_Roles","Admin_Jobs_Stats","Admin_Federation","Admin_Domain_Block","Admin_Custom_Emojis","Admin_Domain_Allow","Admin_Link_Service_Configure","Groups","Group_Channels","GroupMembers","GroupMembership","GroupRules","Group_Roles","Group_Join_Requests","Group_Apps","Group_Ai_Agents_Assignments","User_Apps","Account","Profile","UserNoHtml","Relationship","Bookmarks","Global_Search","Events","Event","EventAttendees",...Object.values(P3)],reducerPath:"openapi",baseQuery:dX,endpoints:()=>({})}),pX=fX.injectEndpoints({endpoints:e=>({getApiMetaCompat:e.query({query:()=>({url:"/api/meta/compat"})}),postApiV1AccountsAddReason:e.mutation({query:e=>({url:"/api/v1/accounts/add-reason",method:"POST",body:e.signupReasonParams})}),postApiV1AccountsAuthenticateEmail:e.mutation({query:e=>({url:"/api/v1/accounts/authenticate/email",method:"POST",body:e.authRequest})}),postApiV1AccountsAuthenticatePhone:e.mutation({query:e=>({url:"/api/v1/accounts/authenticate/phone",method:"POST",body:e.authPhoneRequest})}),putApiV1AccountsChangeName:e.mutation({query:e=>({url:"/api/v1/accounts/change/name",method:"PUT",params:{id:e.id,name:e.name,username:e.username}})}),postApiV1AccountsCheckCaptcha:e.mutation({query:e=>({url:"/api/v1/accounts/check-captcha",method:"POST",body:e.captchaVerificationParams})}),postApiV1AccountsConfirmEmail:e.mutation({query:e=>({url:"/api/v1/accounts/confirm-email",method:"POST",body:e.codeVerificationParams})}),postApiV1AccountsConfirmPhone:e.mutation({query:e=>({url:"/api/v1/accounts/confirm-phone",method:"POST",body:e.codeVerificationParams})}),deleteApiV1AccountsDelete:e.mutation({query:()=>({url:"/api/v1/accounts/delete",method:"DELETE"})}),postApiV1AccountsEmailChangeConfirm:e.mutation({query:e=>({url:"/api/v1/accounts/email/change/confirm",method:"POST",body:e.body})}),postApiV1AccountsEmailChangeRequest:e.mutation({query:e=>({url:"/api/v1/accounts/email/change/request",method:"POST",body:e.emailChangeRequest})}),putApiV1AccountsEmailChangeResendCode:e.mutation({query:()=>({url:"/api/v1/accounts/email/change/resend-code",method:"PUT"})}),postApiV1AccountsFinishCreating:e.mutation({query:e=>({url:"/api/v1/accounts/finish-creating",method:"POST",body:e.finishCreatingAccountParams,params:{htmlContent:e.htmlContent}})}),putApiV1AccountsGetTokenByHash:e.mutation({query:e=>({url:`/api/v1/accounts/get-token/${e.hash}`,method:"PUT"})}),postApiV1AccountsLoginsAddEmailPassword:e.mutation({query:e=>({url:"/api/v1/accounts/logins/add-email-password",method:"POST",body:e.addEmailRequest})}),postApiV1AccountsLoginsAddEmailPasswordConfirm:e.mutation({query:e=>({url:"/api/v1/accounts/logins/add-email-password/confirm",method:"POST",body:e.body})}),putApiV1AccountsLoginsAddEmailPasswordResendCode:e.mutation({query:()=>({url:"/api/v1/accounts/logins/add-email-password/resend-code",method:"PUT"})}),postApiV1AccountsLoginsAddPhone:e.mutation({query:e=>({url:"/api/v1/accounts/logins/add-phone",method:"POST",body:e.addPhoneRequest})}),deleteApiV1AccountsLoginsRemoveEmailPassword:e.mutation({query:()=>({url:"/api/v1/accounts/logins/remove-email-password",method:"DELETE"})}),deleteApiV1AccountsLoginsRemovePhone:e.mutation({query:()=>({url:"/api/v1/accounts/logins/remove-phone",method:"DELETE"})}),postApiV1AccountsPasswordChangeConfirm:e.mutation({query:e=>({url:"/api/v1/accounts/password/change/confirm",method:"POST",body:e.body})}),postApiV1AccountsPasswordChangeRequest:e.mutation({query:e=>({url:"/api/v1/accounts/password/change/request",method:"POST",body:e.passwordChangeRequest})}),putApiV1AccountsPasswordChangeResendCode:e.mutation({query:()=>({url:"/api/v1/accounts/password/change/resend-code",method:"PUT"})}),postApiV1AccountsPasswordRecover:e.mutation({query:e=>({url:"/api/v1/accounts/password/recover",method:"POST",body:e.passwordRecoveryRequest})}),postApiV1AccountsPasswordRecoverChange:e.mutation({query:e=>({url:"/api/v1/accounts/password/recover/change",method:"POST",body:e.passwordRecoveryChange})}),postApiV1AccountsPasswordRecoverCheckCode:e.mutation({query:e=>({url:"/api/v1/accounts/password/recover/check-code",method:"POST",body:e.passwordRecoveryCode})}),postApiV1AccountsPhoneChangeConfirmAuth:e.mutation({query:e=>({url:"/api/v1/accounts/phone/change/confirm/auth",method:"POST",body:e.body})}),postApiV1AccountsPhoneChangeConfirmNewPhone:e.mutation({query:e=>({url:"/api/v1/accounts/phone/change/confirm/new-phone",method:"POST",body:e.body})}),postApiV1AccountsPhoneChangeNewPhone:e.mutation({query:e=>({url:"/api/v1/accounts/phone/change/new-phone",method:"POST",body:e.addPhoneRequest})}),putApiV1AccountsPhoneChangeRequest:e.mutation({query:()=>({url:"/api/v1/accounts/phone/change/request",method:"PUT"})}),putApiV1AccountsPhoneChangeResendCodeAuth:e.mutation({query:()=>({url:"/api/v1/accounts/phone/change/resend-code/auth",method:"PUT"})}),putApiV1AccountsPhoneChangeResendCodeNewPhone:e.mutation({query:()=>({url:"/api/v1/accounts/phone/change/resend-code/new-phone",method:"PUT"})}),getApiV1AccountsProfile:e.query({query:e=>({url:"/api/v1/accounts/profile",params:{htmlContent:e.htmlContent}})}),putApiV1AccountsResendCodeByHash:e.mutation({query:e=>({url:`/api/v1/accounts/resend-code/${e.hash}`,method:"PUT"})}),putApiV1AccountsResendEmailByHash:e.mutation({query:e=>({url:`/api/v1/accounts/resend-email/${e.hash}`,method:"PUT"})}),postApiV1AccountsSignup:e.mutation({query:e=>({url:"/api/v1/accounts/signup",method:"POST",body:e.accountCreate})}),postApiV1AccountsSignupPhone:e.mutation({query:e=>({url:"/api/v1/accounts/signup-phone",method:"POST",body:e.phoneSignup})}),postApiV1AccountsUserReselectUser:e.mutation({query:e=>({url:"/api/v1/accounts/user/reselect-user",method:"POST",params:{userId:e.userId,userName:e.userName}})}),getApiV1AddressesSuggest:e.query({query:e=>({url:"/api/v1/addresses/suggest",params:{lang:e.lang,text:e.text}})}),getApiV1AdminAccountByAccountId:e.query({query:e=>({url:`/api/v1/admin/account/${e.accountId}`,params:{htmlContent:e.htmlContent}})}),getApiV1AdminAuditLog:e.query({query:e=>({url:"/api/v1/admin/audit_log",params:{accountId:e.accountId,action:e.action,appId:e.appId,domainSearch:e.domainSearch,email:e.email,group:e.group,groupId:e.groupId,lastId:e.lastId,limit:e.limit,offset:e.offset,ruleId:e.ruleId,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,userId:e.userId,username:e.username}})}),putApiV1AdminChangeEmail:e.mutation({query:e=>({url:"/api/v1/admin/change/email",method:"PUT",params:{email:e.email,id:e.id,username:e.username}})}),putApiV1AdminChangePassword:e.mutation({query:e=>({url:"/api/v1/admin/change/password",method:"PUT",params:{id:e.id,password:e.password,username:e.username}})}),putApiV1AdminChangeRoleAssign:e.mutation({query:e=>({url:"/api/v1/admin/change/role/assign",method:"PUT",params:{id:e.id,role:e.role,username:e.username,htmlContent:e.htmlContent}})}),putApiV1AdminChangeRoleRevoke:e.mutation({query:e=>({url:"/api/v1/admin/change/role/revoke",method:"PUT",params:{id:e.id,role:e.role,username:e.username,htmlContent:e.htmlContent}})}),postApiV1AdminClearApErrors:e.mutation({query:e=>({url:"/api/v1/admin/clear-ap-errors",method:"POST",params:{domain:e.domain}})}),postApiV1AdminCreateAccount:e.mutation({query:e=>({url:"/api/v1/admin/create-account",method:"POST",body:e.accountCreate,params:{htmlContent:e.htmlContent}})}),postApiV1AdminCreateUser:e.mutation({query:e=>({url:"/api/v1/admin/create-user",method:"POST",body:e.userCreate,params:{account_id:e.accountId,htmlContent:e.htmlContent}})}),deleteApiV1AdminDelete:e.mutation({query:e=>({url:"/api/v1/admin/delete",method:"DELETE",params:{email:e.email,id:e.id,username:e.username}})}),deleteApiV1AdminDeleteUser:e.mutation({query:e=>({url:"/api/v1/admin/delete-user",method:"DELETE",params:{id:e.id,username:e.username}})}),getApiV1AdminDomainAllow:e.query({query:e=>({url:"/api/v1/admin/domain-allow",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),postApiV1AdminDomainAllow:e.mutation({query:e=>({url:"/api/v1/admin/domain-allow",method:"POST",body:e.allowedDomainReq})}),deleteApiV1AdminDomainAllowByDomain:e.mutation({query:e=>({url:`/api/v1/admin/domain-allow/${e.domain}`,method:"DELETE"})}),putApiV1AdminDomainBlock:e.mutation({query:e=>({url:"/api/v1/admin/domain-block",method:"PUT",body:e.blockDomainReq})}),getApiV1AdminDomainBlock:e.query({query:e=>({url:"/api/v1/admin/domain-block",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),postApiV1AdminDomainBlock:e.mutation({query:e=>({url:"/api/v1/admin/domain-block",method:"POST",body:e.blockDomainReq})}),deleteApiV1AdminDomainBlockByDomain:e.mutation({query:e=>({url:`/api/v1/admin/domain-block/${e.domain}`,method:"DELETE"})}),getApiV1AdminEmailAllow:e.query({query:()=>({url:"/api/v1/admin/email-allow"})}),postApiV1AdminEmailAllow:e.mutation({query:e=>({url:"/api/v1/admin/email-allow",method:"POST",body:e.allowedDomainReq})}),deleteApiV1AdminEmailAllowByDomain:e.mutation({query:e=>({url:`/api/v1/admin/email-allow/${e.domain}`,method:"DELETE"})}),getApiV1AdminEmailBlock:e.query({query:()=>({url:"/api/v1/admin/email-block"})}),postApiV1AdminEmailBlock:e.mutation({query:e=>({url:"/api/v1/admin/email-block",method:"POST",body:e.blockEmailRequest})}),deleteApiV1AdminEmailBlockByPattern:e.mutation({query:e=>({url:`/api/v1/admin/email-block/${e.pattern}`,method:"DELETE"})}),getApiV1AdminFederation:e.query({query:e=>({url:"/api/v1/admin/federation",params:{blockState:e.blockState,lastId:e.lastId,limit:e.limit,offset:e.offset,search:e.search,sortBy:e.sortBy,sortOrder:e.sortOrder,unavailable:e.unavailable,untilId:e.untilId,warning:e.warning}})}),getApiV1AdminFederationMetricsOperations:e.query({query:e=>({url:"/api/v1/admin/federation/metrics/operations",params:{window:e.window}})}),getApiV1AdminFederationMetricsRunningAverageSingle:e.query({query:e=>({url:"/api/v1/admin/federation/metrics/running-average-single",params:{operation:e.operation,window:e.window}})}),getApiV1AdminFederationMetricsRunningAveragesAll:e.query({query:e=>({url:"/api/v1/admin/federation/metrics/running-averages-all",params:{operations:e.operations,window:e.window}})}),getApiV1AdminFederationByDomain:e.query({query:e=>({url:`/api/v1/admin/federation/${e.domain}`})}),postApiV1AdminFeedClearUserFeed:e.mutation({query:e=>({url:"/api/v1/admin/feed/clear-user-feed",method:"POST",params:{userId:e.userId,username:e.username}})}),getApiV1AdminFeedDiagnose:e.query({query:e=>({url:"/api/v1/admin/feed/diagnose",params:{limit:e.limit,skipExactMatch:e.skipExactMatch,skipFull:e.skipFull,skipOrderMismatch:e.skipOrderMismatch,userId:e.userId,username:e.username}})}),getApiV1AdminFeedMetricsGlobalAllOperation:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/global-all-operation",params:{window:e.window}})}),getApiV1AdminFeedMetricsGlobalSingle:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/global-single",params:{operation:e.operation,window:e.window}})}),getApiV1AdminFeedMetricsHistory:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/history",params:{limit:e.limit,operation:e.operation,userId:e.userId}})}),getApiV1AdminFeedMetricsHistoryAll:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/history/all",params:{limit:e.limit,userId:e.userId}})}),getApiV1AdminFeedMetricsRunningAverageSingle:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/running-average-single",params:{operation:e.operation,userId:e.userId,window:e.window}})}),getApiV1AdminFeedMetricsRunningAveragesAll:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/running-averages-all",params:{userId:e.userId,window:e.window}})}),getApiV1AdminFeedMetricsSlowestOperations:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/slowest-operations",params:{limit:e.limit,window:e.window}})}),getApiV1AdminFeedMetricsSlowestUsers:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/slowest-users",params:{limit:e.limit,operation:e.operation,window:e.window}})}),getApiV1AdminFeedMetricsSlowestUsersAll:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/slowest-users-all",params:{limit:e.limit,sortDesc:e.sortDesc,window:e.window}})}),getApiV1AdminFeedMetricsSlowestUsersSingle:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/slowest-users-single",params:{limit:e.limit,operation:e.operation,sortDesc:e.sortDesc,window:e.window}})}),getApiV1AdminFeedMetricsSummary:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/summary",params:{includeUserCounts:e.includeUserCounts,window:e.window}})}),getApiV1AdminFeedMetricsUserCountAll:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/user-count-all",params:{window:e.window}})}),getApiV1AdminFeedMetricsUserCountSingle:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/user-count-single",params:{operation:e.operation,window:e.window}})}),postApiV1AdminFeedRegenerateUserFeed:e.mutation({query:e=>({url:"/api/v1/admin/feed/regenerate-user-feed",method:"POST",params:{clear:e.clear,userId:e.userId,username:e.username}})}),getApiV1AdminGroupsSearch:e.query({query:e=>({url:"/api/v1/admin/groups/search",params:{accountId:e.accountId,displayName:e.displayName,domain:e.domain,email:e.email,joinMode:e.joinMode,lastId:e.lastId,limit:e.limit,offset:e.offset,privacy:e.privacy,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,userId:e.userId,username:e.username,visibility:e.visibility}})}),getApiV1AdminGroupsUserByUserId:e.query({query:e=>({url:`/api/v1/admin/groups/user/${e.userId}`,params:{lastId:e.lastId,limit:e.limit,offset:e.offset,roles:e.roles,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),getApiV1AdminGroupsByAccountId:e.query({query:e=>({url:`/api/v1/admin/groups/${e.accountId}`,params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),getApiV1AdminGroupsByGroupIdCategories:e.query({query:e=>({url:`/api/v1/admin/groups/${e.groupId}/categories`,params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),getApiV1AdminGroupsByGroupIdChannels:e.query({query:e=>({url:`/api/v1/admin/groups/${e.groupId}/channels`})}),getApiV1AdminGroupsByGroupIdEvents:e.query({query:e=>({url:`/api/v1/admin/groups/${e.groupId}/events`,params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,withTranslation:e.withTranslation}})}),getApiV1AdminImpersonate:e.query({query:e=>({url:"/api/v1/admin/impersonate",params:{username:e.username}})}),getApiV1AdminLinkService:e.query({query:()=>({url:"/api/v1/admin/link-service"})}),postApiV1AdminLinkServiceConfigure:e.mutation({query:e=>({url:"/api/v1/admin/link-service/configure",method:"POST",body:e.configureRequest})}),postApiV1AdminPostsDelete:e.mutation({query:e=>({url:"/api/v1/admin/posts/delete",method:"POST",body:e.postDelete})}),deleteApiV1AdminPurge:e.mutation({query:e=>({url:"/api/v1/admin/purge",method:"DELETE",params:{id:e.id}})}),postApiV1AdminRegenerateKeys:e.mutation({query:e=>({url:"/api/v1/admin/regenerate-keys",method:"POST",params:{userId:e.userId,username:e.username}})}),postApiV1AdminRegenerateKeysAll:e.mutation({query:e=>({url:"/api/v1/admin/regenerate-keys-all",method:"POST",params:{batch:e.batch}})}),postApiV1AdminReleaseUsername:e.mutation({query:e=>({url:"/api/v1/admin/release-username",method:"POST",params:{username:e.username}})}),postApiV1AdminReportsDeletePosts:e.mutation({query:e=>({url:"/api/v1/admin/reports/delete-posts",method:"POST",body:e.body})}),getApiV1AdminReportsList:e.query({query:e=>({url:"/api/v1/admin/reports/list",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,open:e.open,postId:e.postId,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,userId:e.userId}})}),getApiV1AdminReportsByReportId:e.query({query:e=>({url:`/api/v1/admin/reports/${e.reportId}`})}),postApiV1AdminReportsByReportIdAddNote:e.mutation({query:e=>({url:`/api/v1/admin/reports/${e.reportId}/add-note`,method:"POST",body:e.body})}),postApiV1AdminReportsByReportIdAssignToSelf:e.mutation({query:e=>({url:`/api/v1/admin/reports/${e.reportId}/assign-to-self`,method:"POST"})}),deleteApiV1AdminReportsByReportIdDelete:e.mutation({query:e=>({url:`/api/v1/admin/reports/${e.reportId}/delete`,method:"DELETE"})}),postApiV1AdminReportsByReportIdRemoveNote:e.mutation({query:e=>({url:`/api/v1/admin/reports/${e.reportId}/remove-note`,method:"POST",params:{index:e.index}})}),postApiV1AdminReportsByReportIdReopen:e.mutation({query:e=>({url:`/api/v1/admin/reports/${e.reportId}/reopen`,method:"POST"})}),postApiV1AdminReportsByReportIdResolve:e.mutation({query:e=>({url:`/api/v1/admin/reports/${e.reportId}/resolve`,method:"POST"})}),postApiV1AdminReportsByReportIdUnassign:e.mutation({query:e=>({url:`/api/v1/admin/reports/${e.reportId}/unassign`,method:"POST"})}),postApiV1AdminRestartApDelivery:e.mutation({query:e=>({url:"/api/v1/admin/restart-ap-delivery",method:"POST",params:{domain:e.domain}})}),getApiV1AdminSearch:e.query({query:e=>({url:"/api/v1/admin/search",params:{accountId:e.accountId,actorType:e.actorType,country:e.country,displayName:e.displayName,domain:e.domain,email:e.email,ip:e.ip,kind:e.kind,lastId:e.lastId,limit:e.limit,offset:e.offset,role:e.role,search:e.search,sortBy:e.sortBy,sortOrder:e.sortOrder,state:e.state,untilId:e.untilId,userId:e.userId,username:e.username}})}),putApiV1AdminSignupRequestsApproveByHash:e.mutation({query:e=>({url:`/api/v1/admin/signup_requests/approve/${e.hash}`,method:"PUT"})}),deleteApiV1AdminSignupRequestsDeleteByHash:e.mutation({query:e=>({url:`/api/v1/admin/signup_requests/delete/${e.hash}`,method:"DELETE"})}),getApiV1AdminSignupRequestsList:e.query({query:e=>({url:"/api/v1/admin/signup_requests/list",params:{email:e.email,hash:e.hash,ip:e.ip,lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),putApiV1AdminSignupRequestsRejectByHash:e.mutation({query:e=>({url:`/api/v1/admin/signup_requests/reject/${e.hash}`,method:"PUT",params:{reason:e.reason}})}),getApiV1AdminUploadsJobsQueueByQueueName:e.query({query:e=>({url:`/api/v1/admin/uploads/jobs/queue/${e.queueName}`,params:{limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,uploadType:e.uploadType}})}),getApiV1AdminUploadsJobsSummary:e.query({query:()=>({url:"/api/v1/admin/uploads/jobs/summary"})}),getApiV1AdminUploadsSearch:e.query({query:e=>({url:"/api/v1/admin/uploads/search",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,tag:e.tag,untilId:e.untilId,uploadType:e.uploadType,userId:e.userId}})}),getApiV1AdminUploadsStorageByUserId:e.query({query:e=>({url:`/api/v1/admin/uploads/storage/${e.userId}`})}),postApiV1AdminUserChangeState:e.mutation({query:e=>({url:"/api/v1/admin/user/change-state",method:"POST",body:e.changeUserState})}),postApiV1AdminUserChangeStateBulk:e.mutation({query:e=>({url:"/api/v1/admin/user/change-state-bulk",method:"POST",body:e.changeUserStateBulk})}),getApiV1AdminUserByUserId:e.query({query:e=>({url:`/api/v1/admin/user/${e.userId}`})}),getApiV1AiAgentsAssignments:e.query({query:e=>({url:"/api/v1/ai-agents/assignments",params:{resourceId:e.resourceId,type:e.type}})}),deleteApiV1AiAgentsAssignments:e.mutation({query:e=>({url:"/api/v1/ai-agents/assignments",method:"DELETE",params:{id:e.id}})}),postApiV1AiAgentsAssignments:e.mutation({query:e=>({url:"/api/v1/ai-agents/assignments",method:"POST",body:e.aiAgentAssignmentCreate})}),getApiV1AiAgentsPosts:e.query({query:e=>({url:"/api/v1/ai-agents/posts",params:{limit:e.limit,ownerId:e.ownerId,since:e.since,htmlContent:e.htmlContent}})}),getApiV1AiModels:e.query({query:e=>({url:"/api/v1/ai-models",params:{capabilities:e.capabilities,deprecated:e.deprecated,enabled:e.enabled,maxContextWindow:e.maxContextWindow,maxInputPrice:e.maxInputPrice,maxMaxOutputTokens:e.maxMaxOutputTokens,maxOutputPrice:e.maxOutputPrice,minContextWindow:e.minContextWindow,minMaxOutputTokens:e.minMaxOutputTokens,modalities:e.modalities,openWeights:e.openWeights,page:e.page,pageSize:e.pageSize,providerId:e.providerId,search:e.search}})}),putApiV1AiModelsByModelId:e.mutation({query:e=>({url:`/api/v1/ai-models/${e.modelId}`,method:"PUT",body:e.aiModelUpdate,params:{scope:e.scope}})}),getApiV1AiModelsByModelId:e.query({query:e=>({url:`/api/v1/ai-models/${e.modelId}`})}),deleteApiV1AiModelsByModelId:e.mutation({query:e=>({url:`/api/v1/ai-models/${e.modelId}`,method:"DELETE",params:{scope:e.scope}})}),getApiV1AiModelsByModelIdMigrationPath:e.query({query:e=>({url:`/api/v1/ai-models/${e.modelId}/migration-path`})}),getApiV1AiModelsByModelIdResolve:e.query({query:e=>({url:`/api/v1/ai-models/${e.modelId}/resolve`})}),getApiV1AiProviders:e.query({query:e=>({url:"/api/v1/ai-providers",params:{enabledOnly:e.enabledOnly,scope:e.scope}})}),postApiV1AiProviders:e.mutation({query:e=>({url:"/api/v1/ai-providers",method:"POST",body:e.aiProviderCreate,params:{scope:e.scope}})}),putApiV1AiProvidersByProviderId:e.mutation({query:e=>({url:`/api/v1/ai-providers/${e.providerId}`,method:"PUT",body:e.aiProviderUpdate,params:{scope:e.scope}})}),getApiV1AiProvidersByProviderId:e.query({query:e=>({url:`/api/v1/ai-providers/${e.providerId}`,params:{scope:e.scope}})}),deleteApiV1AiProvidersByProviderId:e.mutation({query:e=>({url:`/api/v1/ai-providers/${e.providerId}`,method:"DELETE",params:{scope:e.scope}})}),getApiV1AiProvidersByProviderIdModels:e.query({query:e=>({url:`/api/v1/ai-providers/${e.providerId}/models`,params:{enabledOnly:e.enabledOnly,includeDeprecated:e.includeDeprecated}})}),postApiV1AiProvidersByProviderIdModels:e.mutation({query:e=>({url:`/api/v1/ai-providers/${e.providerId}/models`,method:"POST",body:e.aiModelCreate,params:{scope:e.scope}})}),postApiV1Apps:e.mutation({query:e=>({url:"/api/v1/apps",method:"POST",body:e.body,params:{enable:e.enable}})}),getApiV1Apps:e.query({query:()=>({url:"/api/v1/apps"})}),getApiV1AppsEnabled:e.query({query:()=>({url:"/api/v1/apps/enabled"})}),getApiV1AppsInstalled:e.query({query:()=>({url:"/api/v1/apps/installed"})}),getApiV1AppsUser:e.query({query:()=>({url:"/api/v1/apps/user"})}),deleteApiV1AppsUserByAppId:e.mutation({query:e=>({url:`/api/v1/apps/user/${e.appId}`,method:"DELETE"})}),putApiV1AppsUserByAppId:e.mutation({query:e=>({url:`/api/v1/apps/user/${e.appId}`,method:"PUT"})}),putApiV1AppsByAppId:e.mutation({query:e=>({url:`/api/v1/apps/${e.appId}`,method:"PUT",body:e.body,params:{enable:e.enable}})}),getApiV1AppsByAppId:e.query({query:e=>({url:`/api/v1/apps/${e.appId}`})}),deleteApiV1AppsByAppId:e.mutation({query:e=>({url:`/api/v1/apps/${e.appId}`,method:"DELETE"})}),getApiV1AppsByAppIdData:e.query({query:e=>({url:`/api/v1/apps/${e.appId}/data`,params:{owner:e.owner,tags:e.tags,type:e.type}})}),postApiV1AppsByAppIdData:e.mutation({query:e=>({url:`/api/v1/apps/${e.appId}/data`,method:"POST",body:e.dataCreate})}),putApiV1AppsByAppIdDataAndId:e.mutation({query:e=>({url:`/api/v1/apps/${e.appId}/data/${e.id}`,method:"PUT",body:e.dataCreate})}),deleteApiV1AppsByAppIdDataAndId:e.mutation({query:e=>({url:`/api/v1/apps/${e.appId}/data/${e.id}`,method:"DELETE"})}),putApiV1AppsByAppIdDefault:e.mutation({query:e=>({url:`/api/v1/apps/${e.appId}/default`,method:"PUT"})}),putApiV1AppsByAppIdDisable:e.mutation({query:e=>({url:`/api/v1/apps/${e.appId}/disable`,method:"PUT"})}),putApiV1AppsByAppIdEnable:e.mutation({query:e=>({url:`/api/v1/apps/${e.appId}/enable`,method:"PUT"})}),getApiV1AppsByAppIdStats:e.query({query:e=>({url:`/api/v1/apps/${e.appId}/stats`})}),putApiV1AppsByAppIdUserDefault:e.mutation({query:e=>({url:`/api/v1/apps/${e.appId}/user-default`,method:"PUT"})}),deleteApiV1AppsByAppIdUserDefault:e.mutation({query:e=>({url:`/api/v1/apps/${e.appId}/user-default`,method:"DELETE"})}),getApiV1Block:e.query({query:e=>({url:"/api/v1/block",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),getApiV1BlockBy:e.query({query:e=>({url:"/api/v1/block/by",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),deleteApiV1BlockByUserId:e.mutation({query:e=>({url:`/api/v1/block/${e.userId}`,method:"DELETE"})}),postApiV1BlockByUserId:e.mutation({query:e=>({url:`/api/v1/block/${e.userId}`,method:"POST"})}),getApiV1CustomEmojis:e.query({query:e=>({url:"/api/v1/custom_emojis",params:{category:e.category,lastId:e.lastId,limit:e.limit,offset:e.offset,shortcode:e.shortcode,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),deleteApiV1CustomEmojis:e.mutation({query:e=>({url:"/api/v1/custom_emojis",method:"DELETE",params:{category:e.category,shortcode:e.shortcode}})}),postApiV1CustomEmojis:e.mutation({query:e=>({url:"/api/v1/custom_emojis",method:"POST",body:e.emoji,params:{overwrite:e.overwrite}})}),getApiV1CustomEmojisCategories:e.query({query:e=>({url:"/api/v1/custom_emojis/categories",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,q:e.q,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),getApiV1CustomEmojisExport:e.query({query:e=>({url:"/api/v1/custom_emojis/export",params:{category:e.category}})}),postApiV1CustomEmojisImport:e.mutation({query:e=>({url:"/api/v1/custom_emojis/import",method:"POST",body:e.body,params:{category:e.category,domain:e.domain,overwrite:e.overwrite,visible:e.visible}})}),postApiV1CustomEmojisImportUpload:e.mutation({query:e=>({url:"/api/v1/custom_emojis/import/upload",method:"POST",params:{category:e.category,domain:e.domain,overwrite:e.overwrite,uploadId:e.uploadId,visible:e.visible}})}),getApiV1CustomEmojisSearch:e.query({query:e=>({url:"/api/v1/custom_emojis/search",params:{category:e.category,lastId:e.lastId,limit:e.limit,offset:e.offset,shortcode:e.shortcode,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),postApiV1CustomEmojisUpload:e.mutation({query:e=>({url:"/api/v1/custom_emojis/upload",method:"POST",params:{category:e.category,domain:e.domain,overwrite:e.overwrite,shortcode:e.shortcode,uploadId:e.uploadId,visible:e.visible}})}),patchApiV1CustomEmojisByShortcode:e.mutation({query:e=>({url:`/api/v1/custom_emojis/${e.shortcode}`,method:"PATCH",body:e.emojiPatchRequest})}),getApiV1Data:e.query({query:e=>({url:"/api/v1/data",params:{owner:e.owner,tags:e.tags,type:e.type}})}),postApiV1Data:e.mutation({query:e=>({url:"/api/v1/data",method:"POST",body:e.dataCreate})}),putApiV1DataById:e.mutation({query:e=>({url:`/api/v1/data/${e.id}`,method:"PUT",body:e.dataCreate})}),deleteApiV1DataById:e.mutation({query:e=>({url:`/api/v1/data/${e.id}`,method:"DELETE"})}),putApiV1Devices:e.mutation({query:e=>({url:"/api/v1/devices",method:"PUT",body:e.deviceRegistrationRequest})}),getApiV1Devices:e.query({query:()=>({url:"/api/v1/devices"})}),deleteApiV1DevicesAll:e.mutation({query:()=>({url:"/api/v1/devices/all",method:"DELETE"})}),getApiV1DevicesVapidPublicKey:e.query({query:()=>({url:"/api/v1/devices/vapid-public-key"})}),deleteApiV1DevicesByDeviceId:e.mutation({query:e=>({url:`/api/v1/devices/${e.deviceId}`,method:"DELETE"})}),getApiV1DomainBlock:e.query({query:e=>({url:"/api/v1/domain-block",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),getApiV1Drafts:e.query({query:e=>({url:"/api/v1/drafts",params:{ownerId:e.ownerId}})}),postApiV1Drafts:e.mutation({query:e=>({url:"/api/v1/drafts",method:"POST",body:e.createDraftRequest,params:{ownerId:e.ownerId}})}),getApiV1DraftsPostByPostId:e.query({query:e=>({url:`/api/v1/drafts/post/${e.postId}`})}),putApiV1DraftsByDraftId:e.mutation({query:e=>({url:`/api/v1/drafts/${e.draftId}`,method:"PUT",body:e.updateDraftRequest})}),getApiV1DraftsByDraftId:e.query({query:e=>({url:`/api/v1/drafts/${e.draftId}`})}),deleteApiV1DraftsByDraftId:e.mutation({query:e=>({url:`/api/v1/drafts/${e.draftId}`,method:"DELETE"})}),postApiV1DraftsByDraftIdPublish:e.mutation({query:e=>({url:`/api/v1/drafts/${e.draftId}/publish`,method:"POST",params:{htmlContent:e.htmlContent}})}),getApiV1Events:e.query({query:e=>({url:"/api/v1/events",params:{groupId:e.groupId,limit:e.limit,offset:e.offset,organizerId:e.organizerId,username:e.username,withTranslation:e.withTranslation}})}),postApiV1Events:e.mutation({query:e=>({url:"/api/v1/events",method:"POST",body:e.createEvent})}),getApiV1EventsCalendarGByGroupnameIcs:e.query({query:e=>({url:`/api/v1/events/calendar/g/${e.groupname}.ics`})}),getApiV1EventsCalendarPByIdIcs:e.query({query:e=>({url:`/api/v1/events/calendar/p/${e.id}.ics`})}),getApiV1EventsCalendarUByUsernameIcs:e.query({query:e=>({url:`/api/v1/events/calendar/u/${e.username}.ics`})}),getApiV1EventsFollowing:e.query({query:e=>({url:"/api/v1/events/following",params:{limit:e.limit,offset:e.offset,withTranslation:e.withTranslation}})}),getApiV1EventsMy:e.query({query:e=>({url:"/api/v1/events/my",params:{limit:e.limit,notRespondedOnly:e.notRespondedOnly,offset:e.offset,organizedOnly:e.organizedOnly,past:e.past,withTranslation:e.withTranslation}})}),getApiV1EventsSettings:e.query({query:e=>({url:"/api/v1/events/settings",params:{ownerId:e.ownerId}})}),postApiV1EventsSettingsRegeneratePrivateId:e.mutation({query:e=>({url:"/api/v1/events/settings/regeneratePrivateId",method:"POST",params:{ownerId:e.ownerId}})}),postApiV1EventsSettingsUpdate:e.mutation({query:e=>({url:"/api/v1/events/settings/update",method:"POST",body:e.updateEventsSettings,params:{ownerId:e.ownerId}})}),putApiV1EventsByEventId:e.mutation({query:e=>({url:`/api/v1/events/${e.eventId}`,method:"PUT",body:e.updateEvent})}),getApiV1EventsByEventId:e.query({query:e=>({url:`/api/v1/events/${e.eventId}`,params:{withTranslation:e.withTranslation}})}),deleteApiV1EventsByEventId:e.mutation({query:e=>({url:`/api/v1/events/${e.eventId}`,method:"DELETE"})}),getApiV1EventsByEventIdIcs:e.query({query:e=>({url:`/api/v1/events/${e.eventId}.ics`})}),postApiV1EventsByEventIdAccept:e.mutation({query:e=>({url:`/api/v1/events/${e.eventId}/accept`,method:"POST"})}),getApiV1EventsByEventIdAttendees:e.query({query:e=>({url:`/api/v1/events/${e.eventId}/attendees`,params:{limit:e.limit,offset:e.offset}})}),deleteApiV1EventsByEventIdAttendeesAndUserId:e.mutation({query:e=>({url:`/api/v1/events/${e.eventId}/attendees/${e.userId}`,method:"DELETE"})}),postApiV1EventsByEventIdAttendeesAndUserId:e.mutation({query:e=>({url:`/api/v1/events/${e.eventId}/attendees/${e.userId}`,method:"POST"})}),postApiV1EventsByEventIdCancel:e.mutation({query:e=>({url:`/api/v1/events/${e.eventId}/cancel`,method:"POST"})}),postApiV1EventsByEventIdInterested:e.mutation({query:e=>({url:`/api/v1/events/${e.eventId}/interested`,method:"POST"})}),postApiV1EventsByEventIdJoin:e.mutation({query:e=>({url:`/api/v1/events/${e.eventId}/join`,method:"POST"})}),deleteApiV1EventsByEventIdJoinOrInterested:e.mutation({query:e=>({url:`/api/v1/events/${e.eventId}/joinOrInterested`,method:"DELETE"})}),postApiV1EventsByEventIdMaybe:e.mutation({query:e=>({url:`/api/v1/events/${e.eventId}/maybe`,method:"POST"})}),getApiV1EventsByEventIdMutual:e.query({query:e=>({url:`/api/v1/events/${e.eventId}/mutual`,params:{limit:e.limit,offset:e.offset}})}),postApiV1EventsByEventIdReject:e.mutation({query:e=>({url:`/api/v1/events/${e.eventId}/reject`,method:"POST"})}),postApiV1EventsByEventIdTranslate:e.mutation({query:e=>({url:`/api/v1/events/${e.eventId}/translate`,method:"POST",params:{lang:e.lang}})}),postApiV1FaspClear:e.mutation({query:()=>({url:"/api/v1/fasp/clear",method:"POST"})}),getApiV1FaspDebugV0CallbackCallbacks:e.query({query:()=>({url:"/api/v1/fasp/debug/v0/callback/callbacks"})}),deleteApiV1FaspDebugV0CallbackCallbacksById:e.mutation({query:e=>({url:`/api/v1/fasp/debug/v0/callback/callbacks/${e.id}`,method:"DELETE"})}),postApiV1FaspRegistration:e.mutation({query:e=>({url:"/api/v1/fasp/registration",method:"POST",body:e.registrationRequest})}),postApiV1FaspByProviderIdCapabilities:e.mutation({query:e=>({url:`/api/v1/fasp/${e.providerId}/capabilities`,method:"POST",body:e.body})}),postApiV1FaspByProviderIdDebugCall:e.mutation({query:e=>({url:`/api/v1/fasp/${e.providerId}/debug-call`,method:"POST",body:e.body})}),getApiV1FaspByProviderIdRegistrationFinish:e.query({query:e=>({url:`/api/v1/fasp/${e.providerId}/registration-finish`})}),postApiV1FaspByProviderIdRegistrationFinish:e.mutation({query:e=>({url:`/api/v1/fasp/${e.providerId}/registration-finish`,method:"POST"})}),postApiV1FaspByProviderIdRequestBackfill:e.mutation({query:e=>({url:`/api/v1/fasp/${e.providerId}/request_backfill`,method:"POST",params:{category:e.category}})}),postApiV1FederationTokens:e.mutation({query:e=>({url:"/api/v1/federation/tokens",method:"POST",body:e.groupFederationTokenRequest})}),getApiV1Geo:e.query({query:e=>({url:"/api/v1/geo",params:{latitude:e.latitude,longitude:e.longitude}})}),getApiV1Groups:e.query({query:e=>({url:"/api/v1/groups",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),postApiV1Groups:e.mutation({query:e=>({url:"/api/v1/groups",method:"POST",body:e.groupCreate})}),getApiV1GroupsApps:e.query({query:()=>({url:"/api/v1/groups/apps"})}),getApiV1GroupsInvites:e.query({query:e=>({url:"/api/v1/groups/invites",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,status:e.status,untilId:e.untilId}})}),getApiV1GroupsInvitesByGroupInviteId:e.query({query:e=>({url:`/api/v1/groups/invites/${e.groupInviteId}`})}),getApiV1GroupsMemberByUserId:e.query({query:e=>({url:`/api/v1/groups/member/${e.userId}`,params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),getApiV1GroupsMemberByUserIdGroups:e.query({query:e=>({url:`/api/v1/groups/member/${e.userId}/groups`,params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),getApiV1GroupsMyGroups:e.query({query:e=>({url:"/api/v1/groups/my-groups",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),getApiV1GroupsNameByGroupname:e.query({query:e=>({url:`/api/v1/groups/name/${e.groupname}`})}),getApiV1GroupsOwned:e.query({query:e=>({url:"/api/v1/groups/owned",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),getApiV1GroupsPinned:e.query({query:e=>({url:"/api/v1/groups/pinned",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),getApiV1GroupsSearch:e.query({query:e=>({url:"/api/v1/groups/search",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,substring:e.substring,untilId:e.untilId}})}),getApiV1GroupsUsersByUserIdMutual:e.query({query:e=>({url:`/api/v1/groups/users/${e.userId}/mutual`})}),putApiV1GroupsByGroupId:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}`,method:"PUT",body:e.groupUpdate})}),getApiV1GroupsByGroupId:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}`})}),deleteApiV1GroupsByGroupId:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}`,method:"DELETE"})}),getApiV1GroupsByGroupIdAiAgentsAssignments:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/ai-agents/assignments`,params:{resourceId:e.resourceId,type:e.type}})}),deleteApiV1GroupsByGroupIdAiAgentsAssignments:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/ai-agents/assignments`,method:"DELETE",params:{assignmentId:e.assignmentId}})}),postApiV1GroupsByGroupIdAiAgentsAssignments:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/ai-agents/assignments`,method:"POST",body:e.aiAgentAssignmentCreate})}),getApiV1GroupsByGroupIdApps:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/apps`})}),deleteApiV1GroupsByGroupIdAppsAndAppId:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/apps/${e.appId}`,method:"DELETE"})}),putApiV1GroupsByGroupIdAppsAndAppId:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/apps/${e.appId}`,method:"PUT"})}),putApiV1GroupsByGroupIdBranding:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/branding`,method:"PUT",body:e.groupBrandingUpdate})}),getApiV1GroupsByGroupIdCategories:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/categories`,params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),postApiV1GroupsByGroupIdCategories:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/categories`,method:"POST",body:e.categoryCreate})}),getApiV1GroupsByGroupIdCategoriesNameAndCategoryName:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/categories/name/${e.categoryName}`})}),putApiV1GroupsByGroupIdCategoriesAndCategoryId:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/categories/${e.categoryId}`,method:"PUT",body:e.categoryUpdate})}),getApiV1GroupsByGroupIdCategoriesAndCategoryId:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/categories/${e.categoryId}`})}),deleteApiV1GroupsByGroupIdCategoriesAndCategoryId:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/categories/${e.categoryId}`,method:"DELETE"})}),getApiV1GroupsByGroupIdChannels:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/channels`})}),postApiV1GroupsByGroupIdChannels:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/channels`,method:"POST",body:e.body,params:{htmlContent:e.htmlContent}})}),getApiV1GroupsByGroupIdChannelsDefault:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/channels/default`})}),getApiV1GroupsByGroupIdChannelsLookup:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/channels/lookup`,params:{full:e.full,username:e.username,htmlContent:e.htmlContent}})}),getApiV1GroupsByGroupIdChannelsMain:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/channels/main`,params:{htmlContent:e.htmlContent}})}),getApiV1GroupsByGroupIdChannelsPublic:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/channels/public`})}),putApiV1GroupsByGroupIdChannelsAndChannelId:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/channels/${e.channelId}`,method:"PUT",body:e.body,params:{htmlContent:e.htmlContent}})}),getApiV1GroupsByGroupIdChannelsAndChannelId:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/channels/${e.channelId}`,params:{full:e.full,htmlContent:e.htmlContent}})}),deleteApiV1GroupsByGroupIdChannelsAndChannelId:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/channels/${e.channelId}`,method:"DELETE"})}),putApiV1GroupsByGroupIdChannelsAndChannelIdDefault:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/channels/${e.channelId}/default`,method:"PUT",params:{isDefault:e.isDefault,htmlContent:e.htmlContent}})}),putApiV1GroupsByGroupIdChannelsAndChannelIdMain:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/channels/${e.channelId}/main`,method:"PUT",params:{htmlContent:e.htmlContent}})}),putApiV1GroupsByGroupIdChannelsAndChannelIdUsername:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/channels/${e.channelId}/username`,method:"PUT",body:e.body,params:{htmlContent:e.htmlContent}})}),postApiV1GroupsByGroupIdFederationToken:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/federation-token`,method:"POST"})}),putApiV1GroupsByGroupIdForum:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/forum`,method:"PUT",body:e.forumUpdate})}),getApiV1GroupsByGroupIdForum:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/forum`})}),deleteApiV1GroupsByGroupIdForum:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/forum`,method:"DELETE"})}),deleteApiV1GroupsByGroupIdForumHard:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/forum/hard`,method:"DELETE"})}),getApiV1GroupsByGroupIdForumStats:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/forum/stats`})}),getApiV1GroupsByGroupIdForumTags:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/forum/tags`,params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),getApiV1GroupsByGroupIdForumTagsSearch:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/forum/tags/search`,params:{lastId:e.lastId,limit:e.limit,offset:e.offset,q:e.q,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),getApiV1GroupsByGroupIdInvites:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/invites`,params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,status:e.status,untilId:e.untilId}})}),postApiV1GroupsByGroupIdInvites:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/invites`,method:"POST",body:e.groupInviteCreate})}),deleteApiV1GroupsByGroupIdInvitesAndGroupInviteId:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/invites/${e.groupInviteId}`,method:"DELETE"})}),postApiV1GroupsByGroupIdInvitesAndGroupInviteIdAccept:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/invites/${e.groupInviteId}/accept`,method:"POST"})}),postApiV1GroupsByGroupIdInvitesAndGroupInviteIdReject:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/invites/${e.groupInviteId}/reject`,method:"POST"})}),postApiV1GroupsByGroupIdJoin:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/join`,method:"POST",params:{answerToken:e.answerToken}})}),deleteApiV1GroupsByGroupIdJoin:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/join`,method:"DELETE"})}),getApiV1GroupsByGroupIdJoinRequests:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/join-requests`,params:{createdFrom:e.createdFrom,createdTo:e.createdTo,lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,status:e.status,untilId:e.untilId,username:e.username}})}),deleteApiV1GroupsByGroupIdJoinRequestsAndGroupJoinRequestId:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/join-requests/${e.groupJoinRequestId}`,method:"DELETE",params:{purge:e.purge,reason:e.reason}})}),putApiV1GroupsByGroupIdJoinRequestsAndGroupJoinRequestId:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/join-requests/${e.groupJoinRequestId}`,method:"PUT",params:{reason:e.reason}})}),putApiV1GroupsByGroupIdMemberSettings:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/member-settings`,method:"PUT",body:e.groupMemberSettings})}),getApiV1GroupsByGroupIdMemberSettings:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/member-settings`,params:{keys:e.keys}})}),deleteApiV1GroupsByGroupIdMemberSettings:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/member-settings`,method:"DELETE",params:{keys:e.keys}})}),getApiV1GroupsByGroupIdMembers:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/members`,params:{actorType:e.actorType,createdAfter:e.createdAfter,displayName:e.displayName,domain:e.domain,limit:e.limit,offset:e.offset,order:e.order,role:e.role,sort:e.sort,username:e.username}})}),postApiV1GroupsByGroupIdMembers:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/members`,method:"POST",body:e.groupMemberCreate})}),getApiV1GroupsByGroupIdMembersSearch:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/members/search`,params:{actorType:e.actorType,country:e.country,createdAfter:e.createdAfter,displayName:e.displayName,domain:e.domain,ip:e.ip,lastId:e.lastId,limit:e.limit,offset:e.offset,role:e.role,roles:e.roles,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,username:e.username}})}),putApiV1GroupsByGroupIdMembersAndMemberId:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/members/${e.memberId}`,method:"PUT",body:e.groupMemberUpdate})}),deleteApiV1GroupsByGroupIdMembersAndMemberId:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/members/${e.memberId}`,method:"DELETE",params:{reason:e.reason}})}),deleteApiV1GroupsByGroupIdMembership:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/membership`,method:"DELETE"})}),getApiV1GroupsByGroupIdMembership:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/membership`})}),deleteApiV1GroupsByGroupIdPin:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/pin`,method:"DELETE"})}),putApiV1GroupsByGroupIdPin:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/pin`,method:"PUT",params:{pin:e.pin}})}),getApiV1GroupsByGroupIdQuestions:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/questions`})}),postApiV1GroupsByGroupIdQuestions:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/questions`,method:"POST",body:e.questionCreate})}),postApiV1GroupsByGroupIdQuestionsAnswers:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/questions/answers`,method:"POST",body:e.questionAnswerCreate})}),putApiV1GroupsByGroupIdQuestionsAndQuestionId:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/questions/${e.questionId}`,method:"PUT",body:e.questionUpdate})}),deleteApiV1GroupsByGroupIdQuestionsAndQuestionId:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/questions/${e.questionId}`,method:"DELETE"})}),postApiV1GroupsByGroupIdReportsDeletePosts:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/reports/delete-posts`,method:"POST",body:e.body})}),getApiV1GroupsByGroupIdReportsList:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/reports/list`,params:{lastId:e.lastId,limit:e.limit,offset:e.offset,open:e.open,postId:e.postId,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,userId:e.userId}})}),getApiV1GroupsByGroupIdReportsAndReportId:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/reports/${e.reportId}`})}),postApiV1GroupsByGroupIdReportsAndReportIdAddNote:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/reports/${e.reportId}/add-note`,method:"POST",body:e.body})}),postApiV1GroupsByGroupIdReportsAndReportIdRemoveNote:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/reports/${e.reportId}/remove-note`,method:"POST",params:{index:e.index}})}),postApiV1GroupsByGroupIdReportsAndReportIdReopen:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/reports/${e.reportId}/reopen`,method:"POST"})}),postApiV1GroupsByGroupIdReportsAndReportIdResolve:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/reports/${e.reportId}/resolve`,method:"POST"})}),getApiV1GroupsByGroupIdRules:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/rules`})}),postApiV1GroupsByGroupIdRules:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/rules`,method:"POST",params:{hint:e.hint,ordering:e.ordering,text:e.text}})}),postApiV1GroupsByGroupIdRulesReorder:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/rules/reorder`,method:"POST",body:e.body})}),deleteApiV1GroupsByGroupIdRulesAndId:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/rules/${e.id}`,method:"DELETE"})}),putApiV1GroupsByGroupIdRulesAndRuleId:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/rules/${e.ruleId}`,method:"PUT",body:e.ruleUpdate})}),putApiV1GroupsByGroupIdSettings:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/settings`,method:"PUT",body:e.groupSettings})}),getApiV1GroupsByGroupIdSettings:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/settings`,params:{keys:e.keys}})}),deleteApiV1GroupsByGroupIdSettings:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/settings`,method:"DELETE",params:{keys:e.keys}})}),getApiV1GroupsByGroupIdUsers:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/users`,params:{lastId:e.lastId,limit:e.limit,offset:e.offset,order:e.order,role:e.role,sort:e.sort,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),getApiV1Import:e.query({query:()=>({url:"/api/v1/import"})}),postApiV1Import:e.mutation({query:e=>({url:"/api/v1/import",method:"POST",body:e.body,params:{overwrite:e.overwrite,type:e.type}})}),postApiV1ImportStartById:e.mutation({query:e=>({url:`/api/v1/import/start/${e.id}`,method:"POST"})}),getApiV1ImportById:e.query({query:e=>({url:`/api/v1/import/${e.id}`})}),getApiV1Instance:e.query({query:()=>({url:"/api/v1/instance"})}),getApiV1InstanceCountries:e.query({query:()=>({url:"/api/v1/instance/countries"})}),getApiV1InstanceDomains:e.query({query:e=>({url:"/api/v1/instance/domains",params:{domain:e.domain,limit:e.limit,software:e.software}})}),getApiV1InstanceExtendedDescription:e.query({query:()=>({url:"/api/v1/instance/extended_description"})}),getApiV1InstanceSupportedLanguages:e.query({query:()=>({url:"/api/v1/instance/supported_languages"})}),getApiV1InstanceTimezones:e.query({query:()=>({url:"/api/v1/instance/timezones"})}),getApiV1JobsListJobs:e.query({query:e=>({url:"/api/v1/jobs/list-jobs",params:{limit:e.limit,offset:e.offset}})}),getApiV1JobsListStats:e.query({query:e=>({url:"/api/v1/jobs/list-stats",params:{queue:e.queue}})}),getApiV1JobsListStatsAll:e.query({query:()=>({url:"/api/v1/jobs/list-stats-all"})}),getApiV1JobsLists:e.query({query:e=>({url:"/api/v1/jobs/lists",params:{limit:e.limit,listKind:e.listKind,offset:e.offset,queue:e.queue}})}),getApiV1JobsStats:e.query({query:()=>({url:"/api/v1/jobs/stats"})}),getApiV1JobsStatsPerDay:e.query({query:e=>({url:"/api/v1/jobs/stats-per-day",params:{lastDays:e.lastDays,queue:e.queue}})}),getApiV1Links:e.query({query:e=>({url:"/api/v1/links",params:{url:e.url}})}),getApiV1Lists:e.query({query:()=>({url:"/api/v1/lists"})}),postApiV1Lists:e.mutation({query:e=>({url:"/api/v1/lists",method:"POST",body:e.userListCreate})}),putApiV1ListsByListId:e.mutation({query:e=>({url:`/api/v1/lists/${e.listId}`,method:"PUT",body:e.userListCreate})}),getApiV1ListsByListId:e.query({query:e=>({url:`/api/v1/lists/${e.listId}`})}),deleteApiV1ListsByListId:e.mutation({query:e=>({url:`/api/v1/lists/${e.listId}`,method:"DELETE"})}),getApiV1ListsByListIdUsers:e.query({query:e=>({url:`/api/v1/lists/${e.listId}/users`})}),deleteApiV1ListsByListIdUsersAndUserId:e.mutation({query:e=>({url:`/api/v1/lists/${e.listId}/users/${e.userId}`,method:"DELETE"})}),postApiV1ListsByListIdUsersAndUserId:e.mutation({query:e=>({url:`/api/v1/lists/${e.listId}/users/${e.userId}`,method:"POST"})}),getApiV1Metrics:e.query({query:e=>({url:"/api/v1/metrics",params:{from:e.from,period:e.period,to:e.to}})}),getApiV1MetricsTotals:e.query({query:()=>({url:"/api/v1/metrics/totals"})}),getApiV1Mute:e.query({query:e=>({url:"/api/v1/mute",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),deleteApiV1MuteByUserId:e.mutation({query:e=>({url:`/api/v1/mute/${e.userId}`,method:"DELETE"})}),postApiV1MuteByUserId:e.mutation({query:e=>({url:`/api/v1/mute/${e.userId}`,method:"POST",params:{duration:e.duration}})}),getApiV1NamesCheck:e.query({query:e=>({url:"/api/v1/names/check",params:{name:e.name,nameScope:e.nameScope,scope:e.scope}})}),putApiV1Notes:e.mutation({query:e=>({url:"/api/v1/notes",method:"PUT",body:e.noteUpdate})}),getApiV1Notes:e.query({query:e=>({url:"/api/v1/notes",params:{userIds:e.userIds}})}),deleteApiV1NotesByUserId:e.mutation({query:e=>({url:`/api/v1/notes/${e.userId}`,method:"DELETE"})}),getApiV1Notifications:e.query({query:e=>({url:"/api/v1/notifications",params:{excludeTypes:e.excludeTypes,lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,status:e.status,types:e.types,untilId:e.untilId,htmlContent:e.htmlContent}})}),getApiV1NotificationsCount:e.query({query:e=>({url:"/api/v1/notifications/count",params:{excludeTypes:e.excludeTypes,status:e.status,types:e.types}})}),postApiV1NotificationsMarkAll:e.mutation({query:e=>({url:"/api/v1/notifications/mark-all",method:"POST",params:{status:e.status}})}),getApiV1NotificationsById:e.query({query:e=>({url:`/api/v1/notifications/${e.id}`,params:{htmlContent:e.htmlContent}})}),postApiV1NotificationsByIdMark:e.mutation({query:e=>({url:`/api/v1/notifications/${e.id}/mark`,method:"POST",params:{status:e.status,htmlContent:e.htmlContent}})}),getApiV1Passkeys:e.query({query:()=>({url:"/api/v1/passkeys"})}),getApiV1PasskeysBeginAuth:e.query({query:e=>({url:"/api/v1/passkeys/begin-auth",params:{username:e.username}})}),getApiV1PasskeysBeginRegister:e.query({query:()=>({url:"/api/v1/passkeys/begin-register"})}),postApiV1PasskeysFinishAuth:e.mutation({query:e=>({url:"/api/v1/passkeys/finish-auth",method:"POST",body:e.jsonObject})}),postApiV1PasskeysFinishRegister:e.mutation({query:e=>({url:"/api/v1/passkeys/finish-register",method:"POST",body:e.jsonObject})}),deleteApiV1PasskeysByCredentialId:e.mutation({query:e=>({url:`/api/v1/passkeys/${e.credentialId}`,method:"DELETE"})}),postApiV1PollsByPollIdRefresh:e.mutation({query:e=>({url:`/api/v1/polls/${e.pollId}/refresh`,method:"POST"})}),postApiV1PollsByPollIdVote:e.mutation({query:e=>({url:`/api/v1/polls/${e.pollId}/vote`,method:"POST",body:e.body})}),getApiV1Posts:e.query({query:e=>({url:"/api/v1/posts",params:{all:e.all,bookmarkedOnly:e.bookmarkedOnly,forumTags:e.forumTags,includeBookmarkStatus:e.includeBookmarkStatus,includeComments:e.includeComments,includeFollowStatus:e.includeFollowStatus,includePinnedStatus:e.includePinnedStatus,includeReply:e.includeReply,lastId:e.lastId,limit:e.limit,limitFirstLevelComments:e.limitFirstLevelComments,limitSecondLevelComments:e.limitSecondLevelComments,listId:e.listId,maxLevel:e.maxLevel,minLevel:e.minLevel,offset:e.offset,ownerId:e.ownerId,pinned:e.pinned,repostKind:e.repostKind,repostOf:e.repostOf,repostsOnly:e.repostsOnly,search:e.search,skipReposts:e.skipReposts,sortBy:e.sortBy,sortOrder:e.sortOrder,tag:e.tag,untilId:e.untilId,userId:e.userId,username:e.username,withRepostedBy:e.withRepostedBy,withTranslation:e.withTranslation,withTrends:e.withTrends,htmlContent:e.htmlContent}})}),postApiV1Posts:e.mutation({query:e=>({url:"/api/v1/posts",method:"POST",body:e.createPost,params:{ownerId:e.ownerId,htmlContent:e.htmlContent}})}),getApiV1PostsBookmarked:e.query({query:e=>({url:"/api/v1/posts/bookmarked",params:{includeComments:e.includeComments,includeReply:e.includeReply,lastId:e.lastId,limit:e.limit,my:e.my,offset:e.offset,ownerId:e.ownerId,search:e.search,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,htmlContent:e.htmlContent}})}),getApiV1PostsFeedsFollowing:e.query({query:e=>({url:"/api/v1/posts/feeds/following",params:{ignoreCache:e.ignoreCache,includeBookmarkStatus:e.includeBookmarkStatus,includeFollowStatus:e.includeFollowStatus,lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,withRepostedBy:e.withRepostedBy,withTranslation:e.withTranslation,htmlContent:e.htmlContent}})}),getApiV1PostsFeedsPublic:e.query({query:e=>({url:"/api/v1/posts/feeds/public",params:{includeBookmarkStatus:e.includeBookmarkStatus,includeFollowStatus:e.includeFollowStatus,lastId:e.lastId,limit:e.limit,local:e.local,offset:e.offset,skipReposts:e.skipReposts,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,withRepostedBy:e.withRepostedBy,withTranslation:e.withTranslation,withTrends:e.withTrends,htmlContent:e.htmlContent}})}),getApiV1PostsLiked:e.query({query:e=>({url:"/api/v1/posts/liked",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,ownerId:e.ownerId,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,htmlContent:e.htmlContent}})}),putApiV1PostsMarkdown2Html:e.mutation({query:e=>({url:"/api/v1/posts/markdown2html",method:"PUT",body:e.body})}),getApiV1PostsMentioned:e.query({query:e=>({url:"/api/v1/posts/mentioned",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,ownerId:e.ownerId,private:e.private,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,htmlContent:e.htmlContent}})}),getApiV1PostsMy:e.query({query:e=>({url:"/api/v1/posts/my",params:{bookmarkedOnly:e.bookmarkedOnly,includeBookmarkStatus:e.includeBookmarkStatus,includeComments:e.includeComments,lastId:e.lastId,limit:e.limit,offset:e.offset,ownerId:e.ownerId,repostsOnly:e.repostsOnly,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,htmlContent:e.htmlContent}})}),getApiV1PostsPins:e.query({query:e=>({url:"/api/v1/posts/pins",params:{ownerId:e.ownerId,postOnly:e.postOnly}})}),deleteApiV1PostsPinsByPostId:e.mutation({query:e=>({url:`/api/v1/posts/pins/${e.postId}`,method:"DELETE"})}),postApiV1PostsPinsByPostId:e.mutation({query:e=>({url:`/api/v1/posts/pins/${e.postId}`,method:"POST"})}),getApiV1PostsReplies:e.query({query:e=>({url:"/api/v1/posts/replies",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,ownerId:e.ownerId,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,userId:e.userId,username:e.username,htmlContent:e.htmlContent}})}),getApiV1PostsSubscribe:e.query({query:e=>({url:"/api/v1/posts/subscribe",params:{all:e.all,ownerId:e.ownerId,htmlContent:e.htmlContent}})}),putApiV1PostsByPostId:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}`,method:"PUT",body:e.createPost,params:{htmlContent:e.htmlContent}})}),getApiV1PostsByPostId:e.query({query:e=>({url:`/api/v1/posts/${e.postId}`,params:{includeBookmarkStatus:e.includeBookmarkStatus,limitFirstLevelComments:e.limitFirstLevelComments,limitSecondLevelComments:e.limitSecondLevelComments,maxLevel:e.maxLevel,minLevel:e.minLevel,withComments:e.withComments,withParents:e.withParents,withRepostedBy:e.withRepostedBy,withRootParent:e.withRootParent,withTranslation:e.withTranslation,withTrends:e.withTrends,htmlContent:e.htmlContent}})}),deleteApiV1PostsByPostId:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}`,method:"DELETE"})}),getApiV1PostsByPostIdActiveUsers:e.query({query:e=>({url:`/api/v1/posts/${e.postId}/active-users`,params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),deleteApiV1PostsByPostIdBookmark:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/bookmark`,method:"DELETE"})}),postApiV1PostsByPostIdBookmark:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/bookmark`,method:"POST"})}),getApiV1PostsByPostIdComments:e.query({query:e=>({url:`/api/v1/posts/${e.postId}/comments`,params:{lastId:e.lastId,limit:e.limit,limitFirstLevelComments:e.limitFirstLevelComments,maxLevel:e.maxLevel,minLevel:e.minLevel,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,htmlContent:e.htmlContent}})}),postApiV1PostsByPostIdComments:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/comments`,method:"POST",body:e.createPost,params:{htmlContent:e.htmlContent}})}),putApiV1PostsByPostIdCommentsAndCommentId:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/comments/${e.commentId}`,method:"PUT",body:e.createPost,params:{htmlContent:e.htmlContent}})}),deleteApiV1PostsByPostIdCommentsAndCommentId:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/comments/${e.commentId}`,method:"DELETE"})}),postApiV1PostsByPostIdDetach:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/detach`,method:"POST"})}),postApiV1PostsByPostIdDownvote:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/downvote`,method:"POST",params:{htmlContent:e.htmlContent}})}),getApiV1PostsByPostIdEdits:e.query({query:e=>({url:`/api/v1/posts/${e.postId}/edits`,params:{htmlContent:e.htmlContent}})}),getApiV1PostsByPostIdLikes:e.query({query:e=>({url:`/api/v1/posts/${e.postId}/likes`,params:{includeFollowedStatus:e.includeFollowedStatus,includeFollowingStatus:e.includeFollowingStatus,lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,htmlContent:e.htmlContent}})}),deleteApiV1PostsByPostIdLikes:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/likes`,method:"DELETE"})}),postApiV1PostsByPostIdLikes:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/likes`,method:"POST"})}),postApiV1PostsByPostIdRefreshCard:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/refresh-card`,method:"POST"})}),deleteApiV1PostsByPostIdRepost:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/repost`,method:"DELETE"})}),postApiV1PostsByPostIdRepost:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/repost`,method:"POST",body:e.createPost,params:{htmlContent:e.htmlContent}})}),getApiV1PostsByPostIdReposts:e.query({query:e=>({url:`/api/v1/posts/${e.postId}/reposts`,params:{includeFollowedStatus:e.includeFollowedStatus,includeFollowingStatus:e.includeFollowingStatus,kind:e.kind,lastId:e.lastId,limit:e.limit,offset:e.offset,skipDuplicates:e.skipDuplicates,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,htmlContent:e.htmlContent}})}),postApiV1PostsByPostIdSubscribe:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/subscribe`,method:"POST"})}),deleteApiV1PostsByPostIdSubscribe:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/subscribe`,method:"DELETE"})}),postApiV1PostsByPostIdTrackView:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/track-view`,method:"POST"})}),postApiV1PostsByPostIdTranslate:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/translate`,method:"POST",params:{htmlContent:e.htmlContent,lang:e.lang}})}),postApiV1PostsByPostIdUpvote:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/upvote`,method:"POST",params:{htmlContent:e.htmlContent}})}),getApiV1PostsByPostIdVotes:e.query({query:e=>({url:`/api/v1/posts/${e.postId}/votes`,params:{htmlContent:e.htmlContent}})}),getApiV1Rbac:e.query({query:()=>({url:"/api/v1/rbac"})}),getApiV1RbacActorsByActorIdPermissions:e.query({query:e=>({url:`/api/v1/rbac/actors/${e.actorId}/permissions`,params:{targetScope:e.targetScope}})}),getApiV1RbacActorsByActorIdRoles:e.query({query:e=>({url:`/api/v1/rbac/actors/${e.actorId}/roles`,params:{targetScope:e.targetScope}})}),putApiV1RbacRolesByRoleId:e.mutation({query:e=>({url:`/api/v1/rbac/roles/${e.roleId}`,method:"PUT",body:e.rbacRoleTemplate})}),getApiV1RbacScopesByScopeRoles:e.query({query:e=>({url:`/api/v1/rbac/scopes/${e.scope}/roles`})}),postApiV1RbacScopesByScopeRoles:e.mutation({query:e=>({url:`/api/v1/rbac/scopes/${e.scope}/roles`,method:"POST",body:e.rbacRoleTemplate})}),deleteApiV1RbacScopesByScopeRolesAndRoleName:e.mutation({query:e=>({url:`/api/v1/rbac/scopes/${e.scope}/roles/${e.roleName}`,method:"DELETE"})}),getApiV1RbacByResource:e.query({query:e=>({url:`/api/v1/rbac/${e.resource}`})}),postApiV1Reports:e.mutation({query:e=>({url:"/api/v1/reports",method:"POST",body:e.createReport})}),putApiV1Rules:e.mutation({query:e=>({url:"/api/v1/rules",method:"PUT",body:e.rule})}),getApiV1Rules:e.query({query:()=>({url:"/api/v1/rules"})}),postApiV1Rules:e.mutation({query:e=>({url:"/api/v1/rules",method:"POST",body:e.ruleCreate})}),postApiV1RulesReorder:e.mutation({query:e=>({url:"/api/v1/rules/reorder",method:"POST",body:e.body})}),deleteApiV1RulesById:e.mutation({query:e=>({url:`/api/v1/rules/${e.id}`,method:"DELETE"})}),getApiV1Search:e.query({query:e=>({url:"/api/v1/search",params:{actorType:e.actorType,fasp:e.fasp,faspHydrated:e.faspHydrated,filter:e.filter,followStatus:e.followStatus,followers:e.followers,following:e.following,groupId:e.groupId,groupMemberRole:e.groupMemberRole,includeRelations:e.includeRelations,lastId:e.lastId,limit:e.limit,offset:e.offset,ownerId:e.ownerId,q:e.q,resolve:e.resolve,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,withComments:e.withComments,withParent:e.withParent,htmlContent:e.htmlContent}})}),deleteApiV1SessionsAll:e.mutation({query:()=>({url:"/api/v1/sessions/all",method:"DELETE"})}),getApiV1SessionsList:e.query({query:()=>({url:"/api/v1/sessions/list"})}),putApiV1SessionsRevokeAll:e.mutation({query:()=>({url:"/api/v1/sessions/revoke/all",method:"PUT"})}),putApiV1SessionsRevokeBySessionKey:e.mutation({query:e=>({url:`/api/v1/sessions/revoke/${e.sessionKey}`,method:"PUT"})}),deleteApiV1SessionsBySessionKey:e.mutation({query:e=>({url:`/api/v1/sessions/${e.sessionKey}`,method:"DELETE"})}),putApiV1Settings:e.mutation({query:e=>({url:"/api/v1/settings",method:"PUT",body:e.platformSettings})}),getApiV1Settings:e.query({query:e=>({url:"/api/v1/settings",params:{keys:e.keys}})}),deleteApiV1Settings:e.mutation({query:e=>({url:"/api/v1/settings",method:"DELETE",params:{keys:e.keys}})}),getApiV1SettingsNames:e.query({query:e=>({url:"/api/v1/settings/names",params:{type:e.type}})}),putApiV1SettingsUser:e.mutation({query:e=>({url:"/api/v1/settings/user",method:"PUT",body:e.userSettings})}),getApiV1SettingsUser:e.query({query:e=>({url:"/api/v1/settings/user",params:{keys:e.keys}})}),deleteApiV1SettingsUser:e.mutation({query:e=>({url:"/api/v1/settings/user",method:"DELETE",params:{keys:e.keys}})}),getApiV1TagsFeatured:e.query({query:e=>({url:"/api/v1/tags/featured",params:{scope:e.scope,userId:e.userId}})}),deleteApiV1TagsFeaturedByName:e.mutation({query:e=>({url:`/api/v1/tags/featured/${e.name}`,method:"DELETE",params:{scope:e.scope}})}),postApiV1TagsFeaturedByName:e.mutation({query:e=>({url:`/api/v1/tags/featured/${e.name}`,method:"POST",params:{scope:e.scope}})}),postApiV1TagsFollowByName:e.mutation({query:e=>({url:`/api/v1/tags/follow/${e.name}`,method:"POST",params:{scope:e.scope}})}),getApiV1TagsFollowed:e.query({query:e=>({url:"/api/v1/tags/followed",params:{scope:e.scope}})}),putApiV1TagsList:e.mutation({query:e=>({url:"/api/v1/tags/list",method:"PUT",body:e.body,params:{scope:e.scope,soft:e.soft,type:e.type}})}),patchApiV1TagsList:e.mutation({query:e=>({url:"/api/v1/tags/list",method:"PATCH",body:e.body,params:{scope:e.scope,soft:e.soft,type:e.type}})}),getApiV1TagsList:e.query({query:e=>({url:"/api/v1/tags/list",params:{scope:e.scope,soft:e.soft,type:e.type}})}),deleteApiV1TagsList:e.mutation({query:e=>({url:"/api/v1/tags/list",method:"DELETE",body:e.body,params:{scope:e.scope,soft:e.soft,type:e.type}})}),putApiV1TagsPolicy:e.mutation({query:e=>({url:"/api/v1/tags/policy",method:"PUT",body:e.setTagPolicyRequest,params:{scope:e.scope}})}),getApiV1TagsPolicy:e.query({query:e=>({url:"/api/v1/tags/policy",params:{scope:e.scope}})}),postApiV1TagsReport:e.mutation({query:e=>({url:"/api/v1/tags/report",method:"POST",body:e.createTagReportRequest,params:{name:e.name,scope:e.scope}})}),getApiV1TagsReports:e.query({query:e=>({url:"/api/v1/tags/reports",params:{scope:e.scope}})}),getApiV1TagsSearch:e.query({query:e=>({url:"/api/v1/tags/search",params:{limit:e.limit,name:e.name,offset:e.offset,scope:e.scope}})}),getApiV1TagsTrending:e.query({query:e=>({url:"/api/v1/tags/trending",params:{limit:e.limit,offset:e.offset,scope:e.scope,sortBy:e.sortBy,sortOrder:e.sortOrder}})}),postApiV1TagsUnfollowByName:e.mutation({query:e=>({url:`/api/v1/tags/unfollow/${e.name}`,method:"POST",params:{scope:e.scope}})}),getApiV1TagsByName:e.query({query:e=>({url:`/api/v1/tags/${e.name}`,params:{historySince:e.historySince,scope:e.scope}})}),postApiV1TranslateText:e.mutation({query:e=>({url:"/api/v1/translate/text",method:"POST",body:e.translationRequest})}),getApiV1TrendsLinks:e.query({query:()=>({url:"/api/v1/trends/links"})}),getApiV1TrendsPosts:e.query({query:e=>({url:"/api/v1/trends/posts",params:{htmlContent:e.htmlContent}})}),getApiV1TrendsTags:e.query({query:e=>({url:"/api/v1/trends/tags",params:{scope:e.scope}})}),postApiV1Uploads:e.mutation({query:e=>({url:"/api/v1/uploads",method:"POST",body:e.createUpload})}),postApiV1UploadsBatch:e.mutation({query:e=>({url:"/api/v1/uploads/batch",method:"POST",body:e.body})}),postApiV1UploadsList:e.mutation({query:e=>({url:"/api/v1/uploads/list",method:"POST",body:e.uploadList})}),getApiV1UploadsSearch:e.query({query:e=>({url:"/api/v1/uploads/search",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,tag:e.tag,untilId:e.untilId,uploadType:e.uploadType}})}),getApiV1UploadsUsages:e.query({query:e=>({url:"/api/v1/uploads/usages",params:{ids:e.ids}})}),getApiV1UploadsById:e.query({query:e=>({url:`/api/v1/uploads/${e.id}`})}),deleteApiV1UploadsById:e.mutation({query:e=>({url:`/api/v1/uploads/${e.id}`,method:"DELETE"})}),postApiV1UploadsByIdMeta:e.mutation({query:e=>({url:`/api/v1/uploads/${e.id}/meta`,method:"POST",body:e.body})}),putApiV1UploadsByIdMeta:e.mutation({query:e=>({url:`/api/v1/uploads/${e.id}/meta`,method:"PUT",body:e.body})}),postApiV1UploadsByIdPrivacy:e.mutation({query:e=>({url:`/api/v1/uploads/${e.id}/privacy`,method:"POST",body:e.updateUploadPrivacy})}),postApiV1UploadsByIdTags:e.mutation({query:e=>({url:`/api/v1/uploads/${e.id}/tags`,method:"POST",body:e.body})}),putApiV1UploadsByIdTags:e.mutation({query:e=>({url:`/api/v1/uploads/${e.id}/tags`,method:"PUT",body:e.body})}),postApiV1UploadsByIdThumbnail:e.mutation({query:e=>({url:`/api/v1/uploads/${e.id}/thumbnail`,method:"POST",body:e.changeVideoThumbnail})}),getApiV1UserAlias:e.query({query:()=>({url:"/api/v1/user-alias"})}),deleteApiV1UserAlias:e.mutation({query:e=>({url:"/api/v1/user-alias",method:"DELETE",params:{uri:e.uri}})}),postApiV1UserAlias:e.mutation({query:e=>({url:"/api/v1/user-alias",method:"POST",params:{acct:e.acct}})}),getApiV1UserDomainBlock:e.query({query:()=>({url:"/api/v1/user-domain-block"})}),deleteApiV1UserDomainBlockByDomain:e.mutation({query:e=>({url:`/api/v1/user-domain-block/${e.domain}`,method:"DELETE"})}),postApiV1UserDomainBlockByDomain:e.mutation({query:e=>({url:`/api/v1/user-domain-block/${e.domain}`,method:"POST"})}),deleteApiV1Users:e.mutation({query:e=>({url:"/api/v1/users",method:"DELETE",params:{id:e.id,name:e.name}})}),postApiV1Users:e.mutation({query:e=>({url:"/api/v1/users",method:"POST",body:e.userCreate,params:{htmlContent:e.htmlContent}})}),getApiV1Users:e.query({query:e=>({url:"/api/v1/users",params:{full:e.full,includeBlockedByStatus:e.includeBlockedByStatus,includeBlockedStatus:e.includeBlockedStatus,includeFollowedStatus:e.includeFollowedStatus,includeFollowingStatus:e.includeFollowingStatus,includeMutedStatus:e.includeMutedStatus,relations:e.relations,username:e.username,htmlContent:e.htmlContent}})}),getApiV1UsersConnections:e.query({query:e=>({url:"/api/v1/users/connections",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,status:e.status,untilId:e.untilId}})}),postApiV1UsersFollowByUsername:e.mutation({query:e=>({url:`/api/v1/users/follow/${e.username}`,method:"POST",params:{domain:e.domain,mutual:e.mutual,scheme:e.scheme}})}),postApiV1UsersFollowByUsernameAccept:e.mutation({query:e=>({url:`/api/v1/users/follow/${e.username}/accept`,method:"POST"})}),postApiV1UsersFollowByUsernamePend:e.mutation({query:e=>({url:`/api/v1/users/follow/${e.username}/pend`,method:"POST"})}),postApiV1UsersFollowByUsernameReject:e.mutation({query:e=>({url:`/api/v1/users/follow/${e.username}/reject`,method:"POST"})}),postApiV1UsersFollowByUsernameUndo:e.mutation({query:e=>({url:`/api/v1/users/follow/${e.username}/undo`,method:"POST",params:{domain:e.domain,mutual:e.mutual,scheme:e.scheme}})}),getApiV1UsersFollowees:e.query({query:e=>({url:"/api/v1/users/followees",params:{anyStatus:e.anyStatus,lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,status:e.status,untilId:e.untilId}})}),getApiV1UsersFollowers:e.query({query:e=>({url:"/api/v1/users/followers",params:{anyStatus:e.anyStatus,lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,status:e.status,untilId:e.untilId}})}),getApiV1UsersInviteLinks:e.query({query:e=>({url:"/api/v1/users/invite-links",params:{active:e.active,lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),postApiV1UsersInviteLinks:e.mutation({query:e=>({url:"/api/v1/users/invite-links",method:"POST",body:e.signupInviteLinkCreate})}),putApiV1UsersInviteLinksDeactivateByCode:e.mutation({query:e=>({url:`/api/v1/users/invite-links/deactivate/${e.code}`,method:"PUT"})}),getApiV1UsersProfile:e.query({query:e=>({url:"/api/v1/users/profile",params:{htmlContent:e.htmlContent}})}),getApiV1UsersRelationships:e.query({query:e=>({url:"/api/v1/users/relationships",params:{filter:e.filter,targets:e.targets}})}),getApiV1UsersRemoteByUserNameFullFollowers:e.query({query:e=>({url:`/api/v1/users/remote/${e.userNameFull}/followers`,params:{limit:e.limit,offset:e.offset}})}),getApiV1UsersRemoteByUserNameFullFollowing:e.query({query:e=>({url:`/api/v1/users/remote/${e.userNameFull}/following`,params:{limit:e.limit,offset:e.offset}})}),getApiV1UsersRenameHistory:e.query({query:()=>({url:"/api/v1/users/rename-history"})}),putApiV1UsersByUserId:e.mutation({query:e=>({url:`/api/v1/users/${e.userId}`,method:"PUT",body:e.userUpdate,params:{htmlContent:e.htmlContent}})}),getApiV1UsersByUserId:e.query({query:e=>({url:`/api/v1/users/${e.userId}`,params:{full:e.full,includeBlockedByStatus:e.includeBlockedByStatus,includeBlockedStatus:e.includeBlockedStatus,includeFollowedStatus:e.includeFollowedStatus,includeFollowingStatus:e.includeFollowingStatus,includeMutedStatus:e.includeMutedStatus,relations:e.relations,htmlContent:e.htmlContent}})}),getApiV1UsersByUserIdFollowers:e.query({query:e=>({url:`/api/v1/users/${e.userId}/followers`,params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),getApiV1UsersByUserIdFollowing:e.query({query:e=>({url:`/api/v1/users/${e.userId}/following`,params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),putApiV1UsersByUserIdMedia:e.mutation({query:e=>({url:`/api/v1/users/${e.userId}/media`,method:"PUT",body:e.userUpdateMedia,params:{htmlContent:e.htmlContent}})}),getRoot:e.query({query:e=>({url:"/",params:{format:e.format}})}),getUser:e.query({query:e=>({url:`/@${e.username}`,params:{format:e.format}})}),getUserEvent:e.query({query:e=>({url:`/@${e.username}/events/${e.eventId}`,params:{format:e.format}})}),getUserPost:e.query({query:e=>({url:`/@${e.username}/posts/${e.postId}`,params:{format:e.format}})}),getAbout:e.query({query:e=>({url:"/about",params:{format:e.format}})}),getFeed:e.query({query:e=>({url:"/feed",params:{format:e.format}})}),getFeedDiscover:e.query({query:e=>({url:"/feed/discover",params:{format:e.format}})}),getFeedFollowing:e.query({query:e=>({url:"/feed/following",params:{format:e.format}})}),getGroup:e.query({query:e=>({url:`/g/${e.groupName}`,params:{format:e.format}})}),getGroupChannel:e.query({query:e=>({url:`/g/${e.groupName}/@${e.channelName}`,params:{format:e.format}})}),getGroupChannelPost:e.query({query:e=>({url:`/g/${e.groupName}/@${e.channelName}/posts/${e.postId}`,params:{format:e.format}})}),getGroupEvent:e.query({query:e=>({url:`/g/${e.groupName}/events/${e.eventId}`,params:{format:e.format}})}),getGroupForumCategory:e.query({query:e=>({url:`/g/${e.groupName}/forum/c/${e.categoryName}`,params:{format:e.format}})}),getGroupForumPost:e.query({query:e=>({url:`/g/${e.groupName}/forum/posts/${e.postId}`,params:{format:e.format}})}),getForumTag:e.query({query:e=>({url:`/g/${e.groupName}/forum/tag/${e.tagName}`,params:{format:e.format}})}),getPrivacy:e.query({query:e=>({url:"/privacy",params:{format:e.format}})}),getTerms:e.query({query:e=>({url:"/terms",params:{format:e.format}})})}),overrideExisting:!1}),O2={forgotPasswordStep:"request",forgotPasswordFields:null,signupStep:"rules",signupFields:null,token:null,newEmail:null,isPending:!!J$.getToken(),isAuthenticated:!1,isAskLoginOpen:!1},mX=oo({name:"auth",initialState:O2,reducers:{setAskLoginOpen:(e,t)=>{e.isAskLoginOpen=t.payload},login:(e,t)=>{e.isAuthenticated=!0,e.token=t.payload||null,e.isPending=!1},logout:()=>({...O2,isPending:!1}),setNewEmail:(e,t)=>{e.newEmail=t.payload},setForgotPasswordStep:(e,t)=>{e.forgotPasswordStep=t.payload},updateForgotPasswordFields:(e,t)=>{e.forgotPasswordFields={...e.forgotPasswordFields,...t.payload}},resetForgotPasswordFields:e=>{e.forgotPasswordFields=null},setSignupStep:(e,t)=>{e.signupStep=t.payload},updateSignupFields:(e,t)=>{e.signupFields={...e.signupFields,...t.payload}},resetSignupFields:e=>{e.signupFields=null},setPending:(e,t)=>{e.isPending=t.payload}},selectors:{selectAskLoginOpen:e=>e.isAskLoginOpen,selectToken:e=>e.token,selectNewEmail:e=>e.newEmail,selectForgotPasswordStep:e=>e.forgotPasswordStep,selectForgotPasswordFields:e=>e.forgotPasswordFields,selectSignupStep:e=>e.signupStep,selectSignupFields:e=>e.signupFields,selectPending:e=>e.isPending,selectIsAuthenticated:e=>e.isAuthenticated}}),hX={data:null,isPending:!1,isSuccess:!1},vX=oo({name:"userNoHTML",initialState:hX,reducers:{setUser:(e,t)=>{e.data=t.payload},setPending:(e,t)=>{e.isPending=t.payload},setSuccess:(e,{payload:t})=>{e.isSuccess=t},setError:(e,{payload:t})=>{e.error=t}},selectors:{selectUser:e=>e.data,selectPending:e=>e.isPending,selectError:e=>e.error,selectSuccess:e=>e.isSuccess}}),A2={data:null,isError:!1,isPending:!1,isSuccess:!1},gX=oo({name:"user",initialState:A2,reducers:{reset:e=>{Object.assign(e,A2)}},extraReducers:e=>{e.addCase(BH,((e,{payload:t})=>{e.data=t})).addCase(jH,((e,{payload:t})=>{e.data&&Object.assign(e.data,t||{})})).addCase(FH,((e,{payload:t})=>{e.isSuccess=t})).addCase(LH,((e,{payload:t})=>{e.isPending=t})).addCase(kH,((e,{payload:t})=>{e.isError=t})).addCase(NH,((e,{payload:t})=>{e.error=t})).addCase(zH,((e,{payload:t})=>{var n;null!=(n=e.data)&&n.users&&(e.data.users=e.data.users.map((e=>t.id===e.id?t:e)))}))},selectors:{selectIsError:e=>e.isError,selectError:e=>e.error,selectPending:e=>e.isPending,selectData:e=>e.data,selectAccount:e=>{var t;return null==(t=e.data)?void 0:t.account},selectAccountId:e=>{var t;return null==(t=e.data)?void 0:t.account.id},selectUsers:e=>{var t;return null==(t=e.data)?void 0:t.users},selectUserById:(e,t)=>{var n;return null==(n=e.data)?void 0:n.users.find((({id:e})=>e===t))},selectCurrentUser:e=>{var t;return null==(t=e.data)?void 0:t.users.find((({id:t})=>{var n;return t===(null==(n=e.data)?void 0:n.selectedUserId)}))},selectSelectedUserId:e=>{var t;return null==(t=e.data)?void 0:t.selectedUserId},selectSuccess:e=>e.isSuccess}});var L2;const yX={value:(null==(L2=Z$())?void 0:L2.initialState)??null},wX=oo({name:"initialState",initialState:yX,reducers:{setInitialState:(e,t)=>{e.value=t.payload},clearInitialState:e=>{e.value=null}},selectors:{selectInitialState:e=>e.value}}),eC=e=>e,r0=Zn(eC,(e=>e.data)),bX=Zn(eC,(e=>e.error)),_X=Zn(eC,(e=>e.isPending)),xX=Zn(r0,(e=>null==e?void 0:e.rules)),SX=Zn(r0,(e=>null==e?void 0:e.contact_account)),EX=Zn(r0,(e=>(null==e?void 0:e.stats)&&Object.fromEntries(Object.entries(e.stats).map((([e,t])=>[e,t??0]))))),$X={data:null,isPending:!1},CX=oo({name:"instanceInfo",initialState:$X,reducers:{},extraReducers:e=>{e.addCase(JH,((e,{payload:t})=>{e.data=t})).addCase(ZH,((e,{payload:t})=>{e.isPending=t})).addCase(eK,((e,{payload:t})=>{e.error=t}))},selectors:{selectInstanceInfo:r0,selectInstanceInfoError:bX,selectInstanceInfoPending:_X,selectPlatformRules:xX,selectInstanceContacts:SX,selectInstanceStats:EX,selectDescription:e=>{var t;return null==(t=e.data)?void 0:t.description},selectStats:e=>{var t;return null==(t=e.data)?void 0:t.stats},selectRegistrations:e=>{var t;return null==(t=e.data)?void 0:t.configuration.registrations}}}),IX={data:null,isPending:!1,isSuccess:!1},RX=oo({name:"profileSettings",initialState:IX,reducers:{setPending:(e,t)=>{e.isPending=t.payload},setSuccess:(e,{payload:t})=>{e.isSuccess=t},setError:(e,{payload:t})=>{e.error=t}},extraReducers:e=>{e.addCase(nK,((e,{payload:t})=>{e.data=t}))},selectors:{selectProfileSettings:e=>e.data,selectPending:e=>e.isPending,selectError:e=>e.error,selectSuccess:e=>e.isSuccess}}),PX={sms:"wellesley.admin.sms",openai:"wellesley.admin.openai",uploads:"wellesley.admin.uploads",captcha:"wellesley.admin.captcha",language:"wellesley.admin.language",mediacache:"wellesley.admin.mediacache",translation:"wellesley.admin.translation",link_service:"wellesley.admin.link_service"},sE={posts:"wellesley.posts",translation:"wellesley.translation",registration:"wellesley.registration",confirmationCode:"wellesley.confirmationCode",uploadsPolicyDoc:"wellesley.uploads.policy.doc",uploadsPolicyAudio:"wellesley.uploads.policy.audio",uploadsPolicyImage:"wellesley.uploads.policy.image",uploadsPolicyVideo:"wellesley.uploads.policy.video",captcha:"wellesley.captcha",access:"wellesley.access",branding:"wellesley.branding",instanceAdmin:"wellesley.instance.admin",legal:"wellesley.instance.legal",domainBlocks:"wellesley.instance.domainBlocks",contacts:"wellesley.instance.contacts"},Im=e=>(null==e?void 0:e.map((e=>e.value||e)))||[],TX={data:null,isPending:!1},{posts:mS,uploadsPolicyDoc:M2,uploadsPolicyAudio:hS,uploadsPolicyImage:jg,uploadsPolicyVideo:Kh,registration:M3,captcha:OX,instanceAdmin:AX,branding:MX,translation:DX,domainBlocks:NX,access:kX}=sE,{captcha:LX,language:FX,translation:BX,openai:jX,link_service:zX}=PX,sp=e=>e.data,VX=Zn(sp,(e=>{var t,n,r;return{max_characters:(null==(t=null==e?void 0:e[mS])?void 0:t.max_characters)||0,max_media_attachments:(null==(n=null==e?void 0:e[mS])?void 0:n.max_media_attachments)||0,max_pins:(null==(r=null==e?void 0:e[mS])?void 0:r.max_pins)||0}})),tC=Zn(sp,(e=>{var t,n,r;return{...null==e?void 0:e[jg],maxSize:(null==(t=null==e?void 0:e[jg])?void 0:t.maxSize)||0,maxMatrix:(null==(n=null==e?void 0:e[jg])?void 0:n.maxMatrix)||0,maxResolution:(null==(r=null==e?void 0:e[jg])?void 0:r.maxResolution)||0}})),UX=Zn(tC,(e=>Im(e.extensions))),nC=Zn(sp,(e=>{var t,n,r,o;return{...null==e?void 0:e[Kh],maxSize:(null==(t=null==e?void 0:e[Kh])?void 0:t.maxSize)||0,maxMatrix:(null==(n=null==e?void 0:e[Kh])?void 0:n.maxMatrix)||0,maxDuration:(null==(r=null==e?void 0:e[Kh])?void 0:r.maxDuration)||0,maxResolution:(null==(o=null==e?void 0:e[Kh])?void 0:o.maxResolution)||0}})),WX=Zn(nC,(e=>Im(e.extensions))),D3=Zn(sp,(e=>{var t,n;return{...null==e?void 0:e[hS],maxSize:null==(t=null==e?void 0:e[hS])?void 0:t.maxSize,keepOriginal:(null==(n=null==e?void 0:e[hS])?void 0:n.keepOriginal)||0}})),N3=Zn(sp,(e=>{var t;return{...null==e?void 0:e[M2],maxSize:(null==(t=null==e?void 0:e[M2])?void 0:t.maxSize)||0}})),k3=Zn([tC,nC,D3,N3],((e,t,n,r)=>({IMAGE:Im(null==e?void 0:e.extensions),VIDEO:Im(null==t?void 0:t.extensions),AUDIO:Im(null==n?void 0:n.extensions),DOCUMENT:Im(null==r?void 0:r.extensions)}))),qX=Zn(k3,(e=>Object.keys(e).reduce(((t,n)=>[...t,...e[n]||[]]),[]))),GX=Zn(sp,(e=>{var t;return null==(t=null==e?void 0:e[M3])?void 0:t.invites})),HX=oo({name:"platformSettings",initialState:TX,reducers:{setError:(e,t)=>{e.error=t.payload},setPending:(e,t)=>{e.isPending=t.payload}},extraReducers:e=>{e.addCase(tK,((e,{payload:t})=>{e.data={...e.data,...t}}))},selectors:{selectSettings:sp,selectPostConfig:VX,selectDocPolicy:N3,selectImagePolicy:tC,selectVideoPolicy:nC,selectAudioPolicy:D3,selectInvitesEnabled:GX,selectImageExtensions:UX,selectVideoExtensions:WX,selectSupportedExtensions:k3,selectFullExtensionsList:qX,selectRegistration:e=>{var t;return null==(t=e.data)?void 0:t[M3]},selectLanguageDetection:e=>{var t;return null==(t=e.data)?void 0:t[FX]},selectLanguageTranslation:e=>{var t;return null==(t=e.data)?void 0:t[BX]},selectOpenai:e=>{var t;return null==(t=e.data)?void 0:t[jX]},selectCaptcha:e=>{var t;return null==(t=e.data)?void 0:t[OX]},selectAdminCaptcha:e=>{var t;return null==(t=e.data)?void 0:t[LX]},selectPlatformTranslation:e=>{var t;return null==(t=e.data)?void 0:t[DX]},selectAccess:e=>{var t;return null==(t=e.data)?void 0:t[kX]},selectBranding:e=>{var t;return null==(t=e.data)?void 0:t[MX]},selectLinkService:e=>{var t;return null==(t=e.data)?void 0:t[zX]},selectInstanceAdmin:e=>{var t;return null==(t=e.data)?void 0:t[AX]},selectLegal:e=>{var t;return null==(t=e.data)?void 0:t[sE.legal]},selectDomainBlocks:e=>{var t;return null==(t=e.data)?void 0:t[NX]},selectContacts:e=>{var t;return null==(t=e.data)?void 0:t[sE.contacts]}}}),D2={data:{userId:"",list:[]},count:{},isPending:!1},KX=e=>e,YX=e=>e.error,QX=e=>e.isPending,XX=e=>{var t;return null==(t=e.count)?void 0:t.total},JX=e=>{var t;return null==(t=e.count)?void 0:t.unread},ZX=e=>e.data.userId,rC=Zn(KX,(e=>e.data.list)),eJ=Zn(rC,(e=>null==e?void 0:e.filter((e=>"UNREAD"===e.status)))),tJ=Zn(rC,(e=>null==e?void 0:e.at(-1))),nJ=oo({name:"notifications",initialState:D2,reducers:{updateNotification:(e,t)=>{var n;if(!e.data.list)return;const r=t.payload;e.data.list=null==(n=e.data.list)?void 0:n.map((e=>e.id===r.id?{...e,...r}:e))},readAll:e=>{var t;e.data.list&&(e.data.list=null==(t=e.data.list)?void 0:t.map((e=>({...e,status:"READ"}))))}},extraReducers:e=>{e.addCase(GH,((e,t)=>{e.isPending=t.payload})).addCase(WH,((e,t)=>{e.error=t.payload})).addCase(qH,((e,t)=>{const n=t.payload.userId,r=t.payload.list;e.data={userId:n,list:[...e.data.list||[],...r.filter((t=>{var n;return!(null!=(n=e.data.list)&&n.some((e=>e.id===t.id)))}))]}})).addCase(VH,((e,t)=>{e.count.unread=(e.count.unread||0)+1,e.data.list&&(e.data.list=[t.payload,...e.data.list||[]])})).addCase(UH,((e,t)=>{e.data.list&&(e.data.list=e.data.list.map((e=>e.id===t.payload.id?{...e,status:t.payload.status}:e)))})).addCase(HH,((e,t)=>{e.count.total=t.payload})).addCase(KH,((e,t)=>{e.count.unread=t.payload})).addCase(QH,(()=>D2)).addCase(XH,((e,t)=>{var n,r,o;const a=t.payload;"UNREAD"===(null==(r=null==(n=e.data.list)?void 0:n.find((e=>e.id===a)))?void 0:r.status)&&e.count.unread&&(e.count.unread-=1),e.data.list=(null==(o=e.data.list)?void 0:o.filter((e=>e.id!==a)))||[]})).addCase(YH,(e=>{e.data.list&&(e.data.list=e.data.list.map((e=>"FOLLOW_REQUEST"===e.type?{...e,followResponse:"Accepted"}:e)))}))},selectors:{selectError:YX,selectIsPending:QX,selectTotalCount:XX,selectUnreadCount:JX,selectNotifications:rC,selectUnreadNotifications:eJ,selectLastNotification:tJ,selectNotificationsOwner:ZX}}),L3=KL(pX,Kg,t3,mX,gX,vX,wX,CX,nJ,RX,HX);Vn("app/hydrate");var N2,ev={exports:{}},rJ=ev.exports;
88
+ */function K8(){if(eR)return nn;eR=1;var e,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen");function v(e){if("object"==typeof e&&null!==e){var m=e.$$typeof;switch(m){case t:switch(e=e.type){case r:case a:case o:case c:case d:return e;default:switch(e=e&&e.$$typeof){case u:case s:case l:case p:case f:case i:return e;default:return m}}case n:return m}}}return e=Symbol.for("react.module.reference"),nn.ContextConsumer=s,nn.ContextProvider=i,nn.Element=t,nn.ForwardRef=l,nn.Fragment=r,nn.Lazy=p,nn.Memo=f,nn.Portal=n,nn.Profiler=a,nn.StrictMode=o,nn.Suspense=c,nn.SuspenseList=d,nn.isAsyncMode=function(){return!1},nn.isConcurrentMode=function(){return!1},nn.isContextConsumer=function(e){return v(e)===s},nn.isContextProvider=function(e){return v(e)===i},nn.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},nn.isForwardRef=function(e){return v(e)===l},nn.isFragment=function(e){return v(e)===r},nn.isLazy=function(e){return v(e)===p},nn.isMemo=function(e){return v(e)===f},nn.isPortal=function(e){return v(e)===n},nn.isProfiler=function(e){return v(e)===a},nn.isStrictMode=function(e){return v(e)===o},nn.isSuspense=function(e){return v(e)===c},nn.isSuspenseList=function(e){return v(e)===d},nn.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===r||t===a||t===o||t===c||t===d||t===m||"object"==typeof t&&null!==t&&(t.$$typeof===p||t.$$typeof===f||t.$$typeof===i||t.$$typeof===s||t.$$typeof===l||t.$$typeof===e||void 0!==t.getModuleId)},nn.typeOf=v,nn}function Y8(){return tR||(tR=1,Jw.exports=K8()),Jw.exports}function hM(){if(nR)return Zw;nR=1;var e=Cl(),t=ta();return Zw=function(n){return"number"==typeof n||t(n)&&"[object Number]"==e(n)}}function Q8(){if(rR)return eb;rR=1;var e=hM();return eb=function(t){return e(t)&&t!=+t}}Y8(),Q8(),hM();var nb,oR,rb,iR,ob,aR,ib,sR,ab,uR,sb,lR,ub,cR,lb,dR,cb,fR,db,pR,fb,mR,pb,hR,mb,vR,hb,gR,vb,yR,gb,wR,yb,bR,wb,_R,bb,xR,_b,SR,xb,ER,Sb,$R,Eb,CR,$b,IR,Eg=function(e){return H8(e)&&e.indexOf("%")===e.length-1},X8=function(e){return"string"==typeof e?e:e?e.displayName||e.name||"Component":""},tb=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o]};function J8(){if(oR)return nb;oR=1;var e=Ty();return nb=function(){this.__data__=new e,this.size=0}}function Z8(){if(iR)return rb;return iR=1,rb=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}}function e9(){if(aR)return ob;return aR=1,ob=function(e){return this.__data__.get(e)}}function t9(){if(sR)return ib;return sR=1,ib=function(e){return this.__data__.has(e)}}function n9(){if(uR)return ab;uR=1;var e=Ty(),t=NE(),n=kE();return ab=function(r,o){var a=this.__data__;if(a instanceof e){var i=a.__data__;if(!t||i.length<199)return i.push([r,o]),this.size=++a.size,this;a=this.__data__=new n(i)}return a.set(r,o),this.size=a.size,this}}function LE(){if(lR)return sb;lR=1;var e=Ty(),t=J8(),n=Z8(),r=e9(),o=t9(),a=n9();function i(t){var n=this.__data__=new e(t);this.size=n.size}return i.prototype.clear=t,i.prototype.delete=n,i.prototype.get=r,i.prototype.has=o,i.prototype.set=a,sb=i}function r9(){if(cR)return ub;cR=1;return ub=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}}function o9(){if(dR)return lb;return dR=1,lb=function(e){return this.__data__.has(e)}}function i9(){if(fR)return cb;fR=1;var e=kE(),t=r9(),n=o9();function r(t){var n=-1,r=null==t?0:t.length;for(this.__data__=new e;++n<r;)this.add(t[n])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,cb=r}function a9(){if(pR)return db;return pR=1,db=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}}function s9(){if(mR)return fb;return mR=1,fb=function(e,t){return e.has(t)}}function vM(){if(hR)return pb;hR=1;var e=i9(),t=a9(),n=s9();return pb=function(r,o,a,i,s,u){var l=1&a,c=r.length,d=o.length;if(c!=d&&!(l&&d>c))return!1;var f=u.get(r),p=u.get(o);if(f&&p)return f==o&&p==r;var m=-1,v=!0,h=2&a?new e:void 0;for(u.set(r,o),u.set(o,r);++m<c;){var g=r[m],y=o[m];if(i)var b=l?i(y,g,m,o,r,u):i(g,y,m,r,o,u);if(void 0!==b){if(b)continue;v=!1;break}if(h){if(!t(o,(function(e,t){if(!n(h,t)&&(g===e||s(g,e,a,i,u)))return h.push(t)}))){v=!1;break}}else if(g!==y&&!s(g,y,a,i,u)){v=!1;break}}return u.delete(r),u.delete(o),v}}function gM(){if(vR)return mb;vR=1;var e=ri().Uint8Array;return mb=e}function u9(){if(gR)return hb;return gR=1,hb=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}}function l9(){if(yR)return vb;return yR=1,vb=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}}function c9(){if(wR)return gb;wR=1;var e=zm(),t=gM(),n=DE(),r=vM(),o=u9(),a=l9(),i=e?e.prototype:void 0,s=i?i.valueOf:void 0;return gb=function(e,i,u,l,c,d,f){switch(u){case"[object DataView]":if(e.byteLength!=i.byteLength||e.byteOffset!=i.byteOffset)return!1;e=e.buffer,i=i.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=i.byteLength||!d(new t(e),new t(i)));case"[object Boolean]":case"[object Date]":case"[object Number]":return n(+e,+i);case"[object Error]":return e.name==i.name&&e.message==i.message;case"[object RegExp]":case"[object String]":return e==i+"";case"[object Map]":var p=o;case"[object Set]":var m=1&l;if(p||(p=a),e.size!=i.size&&!m)return!1;var v=f.get(e);if(v)return v==i;l|=2,f.set(e,i);var h=r(p(e),p(i),l,c,d,f);return f.delete(e),h;case"[object Symbol]":if(s)return s.call(e)==s.call(i)}return!1}}function FE(){if(bR)return yb;return bR=1,yb=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}}function yM(){if(_R)return wb;_R=1;var e=FE(),t=Ei();return wb=function(n,r,o){var a=r(n);return t(n)?a:e(a,o(n))}}function d9(){if(xR)return bb;return xR=1,bb=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,a=[];++n<r;){var i=e[n];t(i,n,e)&&(a[o++]=i)}return a}}function wM(){if(SR)return _b;return SR=1,_b=function(){return[]}}function BE(){if(ER)return xb;ER=1;var e=d9(),t=wM(),n=Object.prototype.propertyIsEnumerable,r=Object.getOwnPropertySymbols;return xb=r?function(t){return null==t?[]:(t=Object(t),e(r(t),(function(e){return n.call(t,e)})))}:t}function f9(){if($R)return Sb;return $R=1,Sb=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}}function p9(){if(CR)return Eb;CR=1;var e=Cl(),t=ta();return Eb=function(n){return t(n)&&"[object Arguments]"==e(n)}}function jE(){if(IR)return $b;IR=1;var e=p9(),t=ta(),n=Object.prototype,r=n.hasOwnProperty,o=n.propertyIsEnumerable,a=e(function(){return arguments}())?e:function(e){return t(e)&&r.call(e,"callee")&&!o.call(e,"callee")};return $b=a}var Cb,RR,PR,Ib,TR,Rb,OR,Pb,AR,Tb,MR,Xh={exports:{}};function m9(){if(RR)return Cb;return RR=1,Cb=function(){return!1}}function zE(){return PR||(PR=1,e=Xh,t=Xh.exports,n=ri(),r=m9(),o=t&&!t.nodeType&&t,a=o&&e&&!e.nodeType&&e,i=a&&a.exports===o?n.Buffer:void 0,s=(i?i.isBuffer:void 0)||r,e.exports=s),Xh.exports;var e,t,n,r,o,a,i,s}function VE(){if(TR)return Ib;TR=1;var e=/^(?:0|[1-9]\d*)$/;return Ib=function(t,n){var r=typeof t;return!!(n=n??9007199254740991)&&("number"==r||"symbol"!=r&&e.test(t))&&t>-1&&t%1==0&&t<n}}function UE(){if(OR)return Rb;OR=1;return Rb=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}}function h9(){if(AR)return Pb;AR=1;var e=Cl(),t=UE(),n=ta(),r={};return r["[object Float32Array]"]=r["[object Float64Array]"]=r["[object Int8Array]"]=r["[object Int16Array]"]=r["[object Int32Array]"]=r["[object Uint8Array]"]=r["[object Uint8ClampedArray]"]=r["[object Uint16Array]"]=r["[object Uint32Array]"]=!0,r["[object Arguments]"]=r["[object Array]"]=r["[object ArrayBuffer]"]=r["[object Boolean]"]=r["[object DataView]"]=r["[object Date]"]=r["[object Error]"]=r["[object Function]"]=r["[object Map]"]=r["[object Number]"]=r["[object Object]"]=r["[object RegExp]"]=r["[object Set]"]=r["[object String]"]=r["[object WeakMap]"]=!1,Pb=function(o){return n(o)&&t(o.length)&&!!r[e(o)]}}function WE(){if(MR)return Tb;return MR=1,Tb=function(e){return function(t){return e(t)}}}Xh.exports;var DR,Ob,NR,Ab,kR,Mb,LR,Db,FR,Nb,BR,kb,jR,Lb,zR,Fb,VR,Bb,UR,jb,WR,zb,qR,Vb,GR,Ub,HR,Wb,KR,qb,YR,Gb,QR,Hb,XR,Kb,JR,Yb,ZR,Qb,eP,Xb,tP,Jb,nP,Zb,rP,e_,oP,t_,iP,n_,aP,r_,sP,o_,uP,i_,lP,a_,cP,s_,dP,u_,fP,l_,pP,c_,mP,d_,hP,f_,vP,p_,gP,m_,yP,h_,wP,v_,bP,g_,_P,y_,xP,w_,SP,b_,EP,__,$P,x_,CP,S_,IP,E_,RP,$_,PP,C_,TP,I_,OP,R_,AP,Jh={exports:{}};function qE(){return DR||(DR=1,e=Jh,t=Jh.exports,n=sM(),r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,a=o&&o.exports===r&&n.process,i=function(){try{return o&&o.require&&o.require("util").types||a&&a.binding&&a.binding("util")}catch{}}(),e.exports=i),Jh.exports;var e,t,n,r,o,a,i}function bM(){if(NR)return Ob;NR=1;var e=h9(),t=WE(),n=qE(),r=n&&n.isTypedArray,o=r?t(r):e;return Ob=o}function _M(){if(kR)return Ab;kR=1;var e=f9(),t=jE(),n=Ei(),r=zE(),o=VE(),a=bM(),i=Object.prototype.hasOwnProperty;return Ab=function(s,u){var l=n(s),c=!l&&t(s),d=!l&&!c&&r(s),f=!l&&!c&&!d&&a(s),p=l||c||d||f,m=p?e(s.length,String):[],v=m.length;for(var h in s)(u||i.call(s,h))&&(!p||!("length"==h||d&&("offset"==h||"parent"==h)||f&&("buffer"==h||"byteLength"==h||"byteOffset"==h)||o(h,v)))&&m.push(h);return m}}function GE(){if(LR)return Mb;LR=1;var e=Object.prototype;return Mb=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}}function xM(){if(FR)return Db;return FR=1,Db=function(e,t){return function(n){return e(t(n))}}}function v9(){if(BR)return Nb;BR=1;var e=xM()(Object.keys,Object);return Nb=e}function SM(){if(jR)return kb;jR=1;var e=GE(),t=v9(),n=Object.prototype.hasOwnProperty;return kb=function(r){if(!e(r))return t(r);var o=[];for(var a in Object(r))n.call(r,a)&&"constructor"!=a&&o.push(a);return o}}function EM(){if(zR)return Lb;zR=1;var e=Iy(),t=UE();return Lb=function(n){return null!=n&&t(n.length)&&!e(n)}}function Ay(){if(VR)return Fb;VR=1;var e=_M(),t=SM(),n=EM();return Fb=function(r){return n(r)?e(r):t(r)}}function $M(){if(UR)return Bb;UR=1;var e=yM(),t=BE(),n=Ay();return Bb=function(r){return e(r,n,t)}}function g9(){if(WR)return jb;WR=1;var e=$M(),t=Object.prototype.hasOwnProperty;return jb=function(n,r,o,a,i,s){var u=1&o,l=e(n),c=l.length;if(c!=e(r).length&&!u)return!1;for(var d=c;d--;){var f=l[d];if(!(u?f in r:t.call(r,f)))return!1}var p=s.get(n),m=s.get(r);if(p&&m)return p==r&&m==n;var v=!0;s.set(n,r),s.set(r,n);for(var h=u;++d<c;){var g=n[f=l[d]],y=r[f];if(a)var b=u?a(y,g,f,r,n,s):a(g,y,f,n,r,s);if(!(void 0===b?g===y||i(g,y,o,a,s):b)){v=!1;break}h||(h="constructor"==f)}if(v&&!h){var w=n.constructor,x=r.constructor;w!=x&&"constructor"in n&&"constructor"in r&&!("function"==typeof w&&w instanceof w&&"function"==typeof x&&x instanceof x)&&(v=!1)}return s.delete(n),s.delete(r),v}}function y9(){if(qR)return zb;qR=1;var e=Zf()(ri(),"DataView");return zb=e}function w9(){if(GR)return Vb;GR=1;var e=Zf()(ri(),"Promise");return Vb=e}function b9(){if(HR)return Ub;HR=1;var e=Zf()(ri(),"Set");return Ub=e}function CM(){if(KR)return Wb;KR=1;var e=Zf()(ri(),"WeakMap");return Wb=e}function kv(){if(YR)return qb;YR=1;var e=y9(),t=NE(),n=w9(),r=b9(),o=CM(),a=Cl(),i=uM(),s="[object Map]",u="[object Promise]",l="[object Set]",c="[object WeakMap]",d="[object DataView]",f=i(e),p=i(t),m=i(n),v=i(r),h=i(o),g=a;return(e&&g(new e(new ArrayBuffer(1)))!=d||t&&g(new t)!=s||n&&g(n.resolve())!=u||r&&g(new r)!=l||o&&g(new o)!=c)&&(g=function(e){var t=a(e),n="[object Object]"==t?e.constructor:void 0,r=n?i(n):"";if(r)switch(r){case f:return d;case p:return s;case m:return u;case v:return l;case h:return c}return t}),qb=g}function _9(){if(QR)return Gb;QR=1;var e=LE(),t=vM(),n=c9(),r=g9(),o=kv(),a=Ei(),i=zE(),s=bM(),u="[object Arguments]",l="[object Array]",c="[object Object]",d=Object.prototype.hasOwnProperty;return Gb=function(f,p,m,v,h,g){var y=a(f),b=a(p),w=y?l:o(f),x=b?l:o(p),_=(w=w==u?c:w)==c,E=(x=x==u?c:x)==c,S=w==x;if(S&&i(f)){if(!i(p))return!1;y=!0,_=!1}if(S&&!_)return g||(g=new e),y||s(f)?t(f,p,m,v,h,g):n(f,p,w,m,v,h,g);if(!(1&m)){var I=_&&d.call(f,"__wrapped__"),A=E&&d.call(p,"__wrapped__");if(I||A){var k=I?f.value():f,C=A?p.value():p;return g||(g=new e),h(k,C,m,v,g)}}return!!S&&(g||(g=new e),r(f,p,m,v,h,g))}}function IM(){if(XR)return Hb;XR=1;var e=_9(),t=ta();return Hb=function n(r,o,a,i,s){return r===o||(null==r||null==o||!t(r)&&!t(o)?r!=r&&o!=o:e(r,o,a,i,n,s))},Hb}function x9(){if(JR)return Kb;JR=1;var e=LE(),t=IM();return Kb=function(n,r,o,a){var i=o.length,s=i,u=!a;if(null==n)return!s;for(n=Object(n);i--;){var l=o[i];if(u&&l[2]?l[1]!==n[l[0]]:!(l[0]in n))return!1}for(;++i<s;){var c=(l=o[i])[0],d=n[c],f=l[1];if(u&&l[2]){if(void 0===d&&!(c in n))return!1}else{var p=new e;if(a)var m=a(d,f,c,n,r,p);if(!(void 0===m?t(f,d,3,a,p):m))return!1}}return!0}}function RM(){if(ZR)return Yb;ZR=1;var e=bs();return Yb=function(t){return t==t&&!e(t)}}function S9(){if(eP)return Qb;eP=1;var e=RM(),t=Ay();return Qb=function(n){for(var r=t(n),o=r.length;o--;){var a=r[o],i=n[a];r[o]=[a,i,e(i)]}return r}}function PM(){if(tP)return Xb;return tP=1,Xb=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}}function E9(){if(nP)return Jb;nP=1;var e=x9(),t=S9(),n=PM();return Jb=function(r){var o=t(r);return 1==o.length&&o[0][2]?n(o[0][0],o[0][1]):function(t){return t===r||e(t,r,o)}}}function $9(){if(rP)return Zb;return rP=1,Zb=function(e,t){return null!=e&&t in Object(e)}}function C9(){if(oP)return e_;oP=1;var e=fM(),t=jE(),n=Ei(),r=VE(),o=UE(),a=Nv();return e_=function(i,s,u){for(var l=-1,c=(s=e(s,i)).length,d=!1;++l<c;){var f=a(s[l]);if(!(d=null!=i&&u(i,f)))break;i=i[f]}return d||++l!=c?d:!!(c=null==i?0:i.length)&&o(c)&&r(f,c)&&(n(i)||t(i))}}function I9(){if(iP)return t_;iP=1;var e=$9(),t=C9();return t_=function(n,r){return null!=n&&t(n,r,e)}}function R9(){if(aP)return n_;aP=1;var e=IM(),t=mM(),n=I9(),r=ME(),o=RM(),a=PM(),i=Nv();return n_=function(s,u){return r(s)&&o(u)?a(i(s),u):function(r){var o=t(r,s);return void 0===o&&o===u?n(r,s):e(u,o,3)}}}function HE(){if(sP)return r_;return sP=1,r_=function(e){return e}}function P9(){if(uP)return o_;return uP=1,o_=function(e){return function(t){return null==t?void 0:t[e]}}}function T9(){if(lP)return i_;lP=1;var e=pM();return i_=function(t){return function(n){return e(n,t)}}}function O9(){if(cP)return a_;cP=1;var e=P9(),t=T9(),n=ME(),r=Nv();return a_=function(o){return n(o)?e(r(o)):t(o)}}function A9(){if(dP)return s_;dP=1;var e=E9(),t=R9(),n=HE(),r=Ei(),o=O9();return s_=function(a){return"function"==typeof a?a:null==a?n:"object"==typeof a?r(a)?t(a[0],a[1]):e(a):o(a)}}function M9(){if(fP)return u_;return fP=1,u_=function(e,t,n,r){for(var o=e.length,a=n+(r?1:-1);r?a--:++a<o;)if(t(e[a],a,e))return a;return-1}}function D9(){if(pP)return l_;return pP=1,l_=function(e){return e!=e}}function N9(){if(mP)return c_;return mP=1,c_=function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}}function k9(){if(hP)return d_;hP=1;var e=M9(),t=D9(),n=N9();return d_=function(r,o,a){return o==o?n(r,o,a):e(r,t,a)}}function L9(){if(vP)return f_;vP=1;var e=k9();return f_=function(t,n){return!!(null==t?0:t.length)&&e(t,n,0)>-1}}function F9(){if(gP)return p_;return gP=1,p_=function(){}}function B9(){if(yP)return m_;yP=1;var e=zm(),t=jE(),n=Ei(),r=e?e.isConcatSpreadable:void 0;return m_=function(e){return n(e)||t(e)||!!(r&&e&&e[r])}}function j9(){if(wP)return h_;wP=1;var e=FE(),t=B9();return h_=function n(r,o,a,i,s){var u=-1,l=r.length;for(a||(a=t),s||(s=[]);++u<l;){var c=r[u];o>0&&a(c)?o>1?n(c,o-1,a,i,s):e(s,c):i||(s[s.length]=c)}return s},h_}function KE(){if(bP)return v_;return bP=1,v_=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}}function z9(){if(_P)return g_;_P=1;var e=KE(),t=Math.max;return g_=function(n,r,o){return r=t(void 0===r?n.length-1:r,0),function(){for(var a=arguments,i=-1,s=t(a.length-r,0),u=Array(s);++i<s;)u[i]=a[r+i];i=-1;for(var l=Array(r+1);++i<r;)l[i]=a[i];return l[r]=o(u),e(n,this,l)}},g_}function V9(){if(xP)return y_;return xP=1,y_=function(e){return function(){return e}}}function TM(){if(SP)return w_;SP=1;var e=Zf(),t=function(){try{var t=e(Object,"defineProperty");return t({},"",{}),t}catch{}}();return w_=t}function U9(){if(EP)return b_;EP=1;var e=V9(),t=TM(),n=HE();return b_=t?function(n,r){return t(n,"toString",{configurable:!0,enumerable:!1,value:e(r),writable:!0})}:n}function OM(){if($P)return __;$P=1;var e=Date.now;return __=function(t){var n=0,r=0;return function(){var o=e(),a=16-(o-r);if(r=o,a>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}},__}function AM(){if(CP)return x_;CP=1;var e=U9(),t=OM()(e);return x_=t}function W9(){if(IP)return S_;IP=1;var e=ri();return S_=function(){return e.Date.now()}}function q9(){if(RP)return E_;RP=1;var e=/\s/;return E_=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}}function G9(){if(PP)return $_;PP=1;var e=q9(),t=/^\s+/;return $_=function(n){return n&&n.slice(0,e(n)+1).replace(t,"")}}function MM(){if(TP)return C_;TP=1;var e=G9(),t=bs(),n=Dv(),r=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,i=parseInt;return C_=function(s){if("number"==typeof s)return s;if(n(s))return NaN;if(t(s)){var u="function"==typeof s.valueOf?s.valueOf():s;s=t(u)?u+"":u}if("string"!=typeof s)return 0===s?s:+s;s=e(s);var l=o.test(s);return l||a.test(s)?i(s.slice(2),l?2:8):r.test(s)?NaN:+s}}function DM(){if(OP)return I_;OP=1;var e=bs(),t=W9(),n=MM(),r=Math.max,o=Math.min;return I_=function(a,i,s){var u,l,c,d,f,p,m=0,v=!1,h=!1,g=!0;if("function"!=typeof a)throw new TypeError("Expected a function");function y(e){var t=u,n=l;return u=l=void 0,m=e,d=a.apply(n,t)}function b(e){var t=e-p;return void 0===p||t>=i||t<0||h&&e-m>=c}function w(){var e=t();if(b(e))return x(e);f=setTimeout(w,function(e){var t=i-(e-p);return h?o(t,c-(e-m)):t}(e))}function x(e){return f=void 0,g&&u?y(e):(u=l=void 0,d)}function _(){var e=t(),n=b(e);if(u=arguments,l=this,p=e,n){if(void 0===f)return function(e){return m=e,f=setTimeout(w,i),v?y(e):d}(p);if(h)return clearTimeout(f),f=setTimeout(w,i),y(p)}return void 0===f&&(f=setTimeout(w,i)),d}return i=n(i)||0,e(s)&&(v=!!s.leading,c=(h="maxWait"in s)?r(n(s.maxWait)||0,i):c,g="trailing"in s?!!s.trailing:g),_.cancel=function(){void 0!==f&&clearTimeout(f),m=0,u=p=l=f=void 0},_.flush=function(){return void 0===f?d:x(t())},_},I_}function H9(){if(AP)return R_;AP=1;var e=DM(),t=bs();return R_=function(n,r,o){var a=!0,i=!0;if("function"!=typeof n)throw new TypeError("Expected a function");return t(o)&&(a="leading"in o?!!o.leading:a,i="trailing"in o?!!o.trailing:i),e(n,r,{leading:a,maxWait:r,trailing:i})}}Jh.exports;var K9=H9();const Y9=my(K9);function vv(e){return(vv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function MP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?MP(Object(n),!0).forEach((function(t){Q9(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):MP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Q9(e,t,n){return(t=X9(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function X9(e){var t=J9(e,"string");return"symbol"==vv(t)?t:t+""}function J9(e,t){if("object"!=vv(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=vv(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Z9(e,t){return rF(e)||nF(e,t)||tF(e,t)||eF()}function eF(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function tF(e,t){if(e){if("string"==typeof e)return DP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return DP(e,t)}}function DP(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function nF(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,s=[],u=!0,l=!1;try{if(a=(n=n.call(e)).next,0!==t)for(;!(u=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){l=!0,o=e}finally{try{if(!u&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(l)throw o}}return s}}function rF(e){if(Array.isArray(e))return e}var P_,NP,T_,kP,O_,LP,A_,FP,M_,BP,D_,jP,N_,zP,k_,VP,L_,UP,F_,WP,B_,qP,j_,GP,z_,HP,oF=v.forwardRef((function(e,t){var n=e.aspect,r=e.initialDimension,o=void 0===r?{width:-1,height:-1}:r,a=e.width,i=void 0===a?"100%":a,s=e.height,u=void 0===s?"100%":s,l=e.minWidth,c=void 0===l?0:l,d=e.minHeight,f=e.maxHeight,p=e.children,m=e.debounce,h=void 0===m?0:m,g=e.id,y=e.className,b=e.onResize,w=e.style,x=void 0===w?{}:w,_=v.useRef(null),E=v.useRef();E.current=b,v.useImperativeHandle(t,(function(){return Object.defineProperty(_.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),_.current},configurable:!0})}));var S=Z9(v.useState({containerWidth:o.width,containerHeight:o.height}),2),I=S[0],A=S[1],k=v.useCallback((function(e,t){A((function(n){var r=Math.round(e),o=Math.round(t);return n.containerWidth===r&&n.containerHeight===o?n:{containerWidth:r,containerHeight:o}}))}),[]);v.useEffect((function(){var e=function(e){var t,n=e[0].contentRect,r=n.width,o=n.height;k(r,o),null===(t=E.current)||void 0===t||t.call(E,r,o)};h>0&&(e=Y9(e,h,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),n=_.current.getBoundingClientRect(),r=n.width,o=n.height;return k(r,o),t.observe(_.current),function(){t.disconnect()}}),[k,h]);var C=v.useMemo((function(){var e=I.containerWidth,t=I.containerHeight;if(e<0||t<0)return null;tb(Eg(i)||Eg(u),"The width(%s) and height(%s) are both fixed numbers,\n maybe you don't need to use a ResponsiveContainer.",i,u),tb(!n||n>0,"The aspect(%s) must be greater than zero.",n);var r=Eg(i)?e:i,o=Eg(u)?t:u;n&&n>0&&(r?o=r/n:o&&(r=o*n),f&&o>f&&(o=f)),tb(r>0||o>0,"The width(%s) and height(%s) of chart should be greater than 0,\n please check the style of container, or the props width(%s) and height(%s),\n or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the\n height and width.",r,o,i,u,c,d,n);var a=!Array.isArray(p)&&X8(p.type).endsWith("Chart");return Ue.Children.map(p,(function(e){return Ue.isValidElement(e)?v.cloneElement(e,$g({width:r,height:o},a?{style:$g({height:"100%",width:"100%",maxHeight:o,maxWidth:r},e.props.style)}:{})):e}))}),[n,p,u,f,d,c,I,i]);return Ue.createElement("div",{id:g?"".concat(g):void 0,className:cA("recharts-responsive-container",y),style:$g($g({},x),{},{width:i,height:u,minWidth:c,minHeight:d,maxHeight:f}),ref:_},C)}));function YE(){if(NP)return P_;NP=1;var e=xM()(Object.getPrototypeOf,Object);return P_=e}function iF(){if(kP)return T_;kP=1;var e=Cl(),t=YE(),n=ta(),r=Function.prototype,o=Object.prototype,a=r.toString,i=o.hasOwnProperty,s=a.call(Object);return T_=function(r){if(!n(r)||"[object Object]"!=e(r))return!1;var o=t(r);if(null===o)return!0;var u=i.call(o,"constructor")&&o.constructor;return"function"==typeof u&&u instanceof u&&a.call(u)==s}}function aF(){if(LP)return O_;LP=1;var e=MM(),t=1/0;return O_=function(n){return n?(n=e(n))===t||n===-t?17976931348623157e292*(n<0?-1:1):n==n?n:0:0===n?n:0}}function NM(){if(FP)return A_;FP=1;var e=TM();return A_=function(t,n,r){"__proto__"==n&&e?e(t,n,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[n]=r}}function kM(){if(BP)return M_;BP=1;var e=aF();return M_=function(t){var n=e(t),r=n%1;return n==n?r?n-r:n:0}}function QE(){if(jP)return D_;return jP=1,D_=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}}function LM(){if(zP)return N_;zP=1;var e=NM(),t=DE(),n=Object.prototype.hasOwnProperty;return N_=function(r,o,a){var i=r[o];(!n.call(r,o)||!t(i,a)||void 0===a&&!(o in r))&&e(r,o,a)}}function My(){if(VP)return k_;VP=1;var e=LM(),t=NM();return k_=function(n,r,o,a){var i=!o;o||(o={});for(var s=-1,u=r.length;++s<u;){var l=r[s],c=a?a(o[l],n[l],l,o,n):void 0;void 0===c&&(c=n[l]),i?t(o,l,c):e(o,l,c)}return o}}function FM(){if(UP)return L_;UP=1;var e=My(),t=Ay();return L_=function(n,r){return n&&e(r,t(r),n)}}function sF(){if(WP)return F_;return WP=1,F_=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}}function uF(){if(qP)return B_;qP=1;var e=bs(),t=GE(),n=sF(),r=Object.prototype.hasOwnProperty;return B_=function(o){if(!e(o))return n(o);var a=t(o),i=[];for(var s in o)"constructor"==s&&(a||!r.call(o,s))||i.push(s);return i}}function XE(){if(GP)return j_;GP=1;var e=_M(),t=uF(),n=EM();return j_=function(r){return n(r)?e(r,!0):t(r)}}function lF(){if(HP)return z_;HP=1;var e=My(),t=XE();return z_=function(n,r){return n&&e(r,t(r),n)}}var KP,V_,YP,U_,QP,W_,XP,q_,JP,G_,ZP,H_,eT,K_,tT,Y_,nT,Q_,rT,X_,oT,J_,iT,Z_,aT,ex,sT,tx,uT,nx,lT,rx,cT,ox,dT,ix,fT,ax,pT,sx,mT,ux,hT,Zh={exports:{}};function cF(){return KP||(KP=1,e=Zh,t=Zh.exports,n=ri(),r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,a=o&&o.exports===r?n.Buffer:void 0,i=a?a.allocUnsafe:void 0,e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=i?i(n):new e.constructor(n);return e.copy(r),r}),Zh.exports;var e,t,n,r,o,a,i}function Dy(){if(YP)return V_;return YP=1,V_=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}}function dF(){if(QP)return U_;QP=1;var e=My(),t=BE();return U_=function(n,r){return e(n,t(n),r)}}function BM(){if(XP)return W_;XP=1;var e=FE(),t=YE(),n=BE(),r=wM(),o=Object.getOwnPropertySymbols;return W_=o?function(r){for(var o=[];r;)e(o,n(r)),r=t(r);return o}:r}function fF(){if(JP)return q_;JP=1;var e=My(),t=BM();return q_=function(n,r){return e(n,t(n),r)}}function pF(){if(ZP)return G_;ZP=1;var e=yM(),t=BM(),n=XE();return G_=function(r){return e(r,n,t)}}function mF(){if(eT)return H_;eT=1;var e=Object.prototype.hasOwnProperty;return H_=function(t){var n=t.length,r=new t.constructor(n);return n&&"string"==typeof t[0]&&e.call(t,"index")&&(r.index=t.index,r.input=t.input),r}}function JE(){if(tT)return K_;tT=1;var e=gM();return K_=function(t){var n=new t.constructor(t.byteLength);return new e(n).set(new e(t)),n}}function hF(){if(nT)return Y_;nT=1;var e=JE();return Y_=function(t,n){var r=n?e(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}}function vF(){if(rT)return Q_;rT=1;var e=/\w*$/;return Q_=function(t){var n=new t.constructor(t.source,e.exec(t));return n.lastIndex=t.lastIndex,n}}function gF(){if(oT)return X_;oT=1;var e=zm(),t=e?e.prototype:void 0,n=t?t.valueOf:void 0;return X_=function(e){return n?Object(n.call(e)):{}}}function yF(){if(iT)return J_;iT=1;var e=JE();return J_=function(t,n){var r=n?e(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}}function wF(){if(aT)return Z_;aT=1;var e=JE(),t=hF(),n=vF(),r=gF(),o=yF();return Z_=function(a,i,s){var u=a.constructor;switch(i){case"[object ArrayBuffer]":return e(a);case"[object Boolean]":case"[object Date]":return new u(+a);case"[object DataView]":return t(a,s);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return o(a,s);case"[object Map]":case"[object Set]":return new u;case"[object Number]":case"[object String]":return new u(a);case"[object RegExp]":return n(a);case"[object Symbol]":return r(a)}}}function Ny(){if(sT)return ex;sT=1;var e=bs(),t=Object.create;return ex=function(){function n(){}return function(r){if(!e(r))return{};if(t)return t(r);n.prototype=r;var o=new n;return n.prototype=void 0,o}}()}function bF(){if(uT)return tx;uT=1;var e=Ny(),t=YE(),n=GE();return tx=function(r){return"function"!=typeof r.constructor||n(r)?{}:e(t(r))}}function _F(){if(lT)return nx;lT=1;var e=kv(),t=ta();return nx=function(n){return t(n)&&"[object Map]"==e(n)}}function xF(){if(cT)return rx;cT=1;var e=_F(),t=WE(),n=qE(),r=n&&n.isMap,o=r?t(r):e;return rx=o}function SF(){if(dT)return ox;dT=1;var e=kv(),t=ta();return ox=function(n){return t(n)&&"[object Set]"==e(n)}}function EF(){if(fT)return ix;fT=1;var e=SF(),t=WE(),n=qE(),r=n&&n.isSet,o=r?t(r):e;return ix=o}function jM(){if(pT)return ax;pT=1;var e=LE(),t=QE(),n=LM(),r=FM(),o=lF(),a=cF(),i=Dy(),s=dF(),u=fF(),l=$M(),c=pF(),d=kv(),f=mF(),p=wF(),m=bF(),v=Ei(),h=zE(),g=xF(),y=bs(),b=EF(),w=Ay(),x=XE(),_="[object Arguments]",E="[object Function]",S="[object Object]",I={};return I[_]=I["[object Array]"]=I["[object ArrayBuffer]"]=I["[object DataView]"]=I["[object Boolean]"]=I["[object Date]"]=I["[object Float32Array]"]=I["[object Float64Array]"]=I["[object Int8Array]"]=I["[object Int16Array]"]=I["[object Int32Array]"]=I["[object Map]"]=I["[object Number]"]=I[S]=I["[object RegExp]"]=I["[object Set]"]=I["[object String]"]=I["[object Symbol]"]=I["[object Uint8Array]"]=I["[object Uint8ClampedArray]"]=I["[object Uint16Array]"]=I["[object Uint32Array]"]=!0,I["[object Error]"]=I[E]=I["[object WeakMap]"]=!1,ax=function A(k,C,P,R,O,T){var N,M=1&C,j=2&C,D=4&C;if(P&&(N=O?P(k,R,O,T):P(k)),void 0!==N)return N;if(!y(k))return k;var q=v(k);if(q){if(N=f(k),!M)return i(k,N)}else{var z=d(k),L=z==E||"[object GeneratorFunction]"==z;if(h(k))return a(k,M);if(z==S||z==_||L&&!O){if(N=j||L?{}:m(k),!M)return j?u(k,o(N,k)):s(k,r(N,k))}else{if(!I[z])return O?k:{};N=p(k,z,M)}}T||(T=new e);var $=T.get(k);if($)return $;T.set(k,N),b(k)?k.forEach((function(e){N.add(A(e,C,P,e,k,T))})):g(k)&&k.forEach((function(e,t){N.set(t,A(e,C,P,t,k,T))}));var V=q?void 0:(D?j?c:l:j?x:w)(k);return t(V||k,(function(e,t){V&&(e=k[t=e]),n(N,t,A(e,C,P,t,k,T))})),N},ax}function $F(){if(mT)return sx;mT=1;var e=j9();return sx=function(t){return(null==t?0:t.length)?e(t,1):[]}}function CF(){if(hT)return ux;hT=1;var e=$F(),t=z9(),n=AM();return ux=function(r){return n(t(r,void 0,e),r+"")}}Zh.exports;const IF={light:"",dark:".dark"},zM=v.createContext(null);function VM(){const e=v.useContext(zM);if(!e)throw new Error("useChart must be used within a <ChartContainer />");return e}const RF=v.forwardRef((({id:e,className:t,children:n,config:r,...o},a)=>{const i=v.useId(),s=`chart-${e||i.replace(/:/g,"")}`;return G.jsx(zM.Provider,{value:{config:r},children:G.jsxs("div",{"data-chart":s,ref:a,className:_e("flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none",t),...o,children:[G.jsx(PF,{id:s,config:r}),G.jsx(oF,{children:n})]})})}));RF.displayName="Chart";const PF=({id:e,config:t})=>{const n=Object.entries(t).filter((([,e])=>e.theme||e.color));return n.length?G.jsx("style",{dangerouslySetInnerHTML:{__html:Object.entries(IF).map((([t,r])=>`\n${r} [data-chart=${e}] {\n${n.map((([e,n])=>{var r;const o=(null==(r=n.theme)?void 0:r[t])||n.color;return o?` --color-${e}: ${o};`:null})).join("\n")}\n}\n`)).join("\n")}}):null},TF=v.forwardRef((({active:e,payload:t,className:n,indicator:r="dot",hideLabel:o=!1,hideIndicator:a=!1,label:i,labelFormatter:s,labelClassName:u,formatter:l,color:c,nameKey:d,labelKey:f,hoveredItem:p,onItemHover:m},h)=>{const{config:g}=VM(),y=v.useMemo((()=>{var e;if(o||null==t||!t.length)return null;const[n]=t,r=`${f||(null==n?void 0:n.dataKey)||(null==n?void 0:n.name)||"value"}`,a=kS(g,n,r),l=f||"string"!=typeof i?null==a?void 0:a.label:(null==(e=g[i])?void 0:e.label)||i;return s?G.jsx("div",{className:_e("font-medium",u),children:s(l,t)}):l?G.jsx("div",{className:_e("font-medium",u),children:l}):null}),[i,s,t,o,u,g,f]);if(!e||null==t||!t.length)return null;const b=1===t.length&&"dot"!==r,w=t.length>10;return G.jsxs("div",{ref:h,className:_e("grid min-w-[8rem] items-start gap-xxs rounded-sm border border-border/50 bg-background px-xs py-xxs text-xs shadow-xl",w&&"min-w-[16rem]",n),children:[b?null:y,G.jsx("div",{className:_e("grid gap-xxs",w&&"grid-cols-2 gap-x-s"),children:t.map(((e,t)=>{var n;const o=`${d||e.name||e.dataKey||"value"}`,i=kS(g,e,o),s=c||(null==(n=e.payload)?void 0:n.fill)||e.color||"",u=o===p;return G.jsx("div",{className:_e("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground","dot"===r&&"items-center",u?"":p?"opacity-40":""),onMouseEnter:()=>null==m?void 0:m(o),onMouseLeave:()=>null==m?void 0:m(null),children:l&&void 0!==(null==e?void 0:e.value)&&void 0!==(null==e?void 0:e.payload)&&e.name?l(e.value,e.name,e,t,[e.payload]):G.jsxs(G.Fragment,{children:[null!=i&&i.icon?G.jsx(i.icon,{}):!a&&G.jsx("div",{className:_e("shrink-0 rounded-full border-[--color-border] bg-[--color-bg]",{"h-2.5 w-2.5":"dot"===r,"w-1":"line"===r,"w-0 border border-dashed bg-transparent":"dashed"===r,"my-0.5":b&&"dashed"===r}),style:{"--color-bg":s,"--color-border":s}}),G.jsxs("div",{className:_e("flex flex-1 justify-between leading-none",b?"items-end":"items-center"),children:[G.jsxs("div",{className:"grid gap-xxs",children:[b?y:null,G.jsx("span",{className:_e("text-muted-foreground",u&&"font-medium text-foreground"),children:(null==i?void 0:i.label)||e.name})]}),e.value&&G.jsx("span",{className:_e("font-mono font-medium tabular-nums text-foreground",u&&"font-bold"),children:e.value.toLocaleString()})]})]})},e.dataKey)}))})]})}));TF.displayName="ChartTooltip";const OF=v.forwardRef((({className:e,hideIcon:t=!1,payload:n,nameKey:r,onItemHover:o,hoveredItem:a},i)=>{const{config:s}=VM(),u=v.useRef({});return v.useEffect((()=>{if(a&&u.current[a]){const e=u.current[a];e&&e.scrollIntoView({behavior:"smooth",block:"nearest"})}}),[a]),null!=n&&n.length?G.jsx("div",{ref:i,className:_e("flex h-[150px] w-full flex-wrap items-center justify-center gap-l overflow-y-auto pb-xl",e),children:n.map((e=>{var n;const i=`${r||e.dataKey||"value"}`,l=kS(s,e,i),c=!!o&&i===a;return G.jsxs("div",{ref:e=>{e?u.current[i]=e:delete u.current[i]},className:_e("group flex cursor-pointer select-none items-center gap-xs text-base transition-all duration-150",c?"scale-105 text-black":a?"text-gray-700 opacity-40":"text-gray-700"),onMouseEnter:()=>null==o?void 0:o(e.dataKey),onMouseLeave:()=>null==o?void 0:o(null),children:[null!=l&&l.icon&&!t?G.jsx(l.icon,{}):G.jsx("div",{className:"h-2 w-2 shrink-0 rounded-full",style:{backgroundColor:e.color||""}}),G.jsx("span",{className:"min-w-[max-content]",children:(null==l?void 0:l.label)||e.name})]},(null==(n=e.value)?void 0:n.toString())||i)}))}):null}));function kS(e,t,n){if("object"!=typeof t||null===t)return;const r="payload"in t&&"object"==typeof t.payload&&null!==t.payload?t.payload:void 0;let o=n;return n in t&&"string"==typeof t[n]?o=t[n]:r&&n in r&&"string"==typeof r[n]&&(o=r[n]),o in e?e[o]:e[n]}OF.displayName="ChartLegend";const AF=({children:e,className:t})=>G.jsx("div",{className:_e("flex flex-wrap gap-xxxs",t),children:e}),UM=({text:e,icon:t,disabled:n,isLoading:r,avatarSrc:o,onClick:a,onRemove:i,className:s})=>G.jsxs("div",{onClick:n?void 0:a,className:_e("flex cursor-pointer items-center gap-xxxs rounded-sm bg-gray-100 p-xxs text-sm font-medium text-gray-900 transition-all hover:bg-gray-200 [&_svg]:size-4",n&&"cursor-not-allowed bg-gray-100 text-gray-300",s),children:[o&&G.jsxs(JA,{className:_e("size-6 text-[10px]"),children:[G.jsx(ZA,{src:o,alt:e}),G.jsx(eM,{className:"text-xs",children:e.charAt(0).toUpperCase()})]}),t,G.jsx("span",{children:e}),i&&!r&&G.jsx("span",{role:"button",tabIndex:-1,onClick:e=>{e.stopPropagation(),e.preventDefault(),!n&&(null==i||i())},onPointerDown:e=>{e.stopPropagation(),e.preventDefault()},className:_e("pointer-events-auto cursor-pointer",n&&"pointer-events-none cursor-not-allowed opacity-50"),children:G.jsx(gy,{size:16})}),r&&G.jsx(sA,{size:16,className:"animate-spin"})]});function ky(e){const t=v.useRef({value:e,previous:e});return v.useMemo((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}function Ly(e){const[t,n]=v.useState(void 0);return Vo((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t)||!t.length)return;const r=t[0];let o,a;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,a=t.blockSize}else o=e.offsetWidth,a=e.offsetHeight;n({width:o,height:a})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}const WM="Checkbox",[MF,eZ]=ni(WM),[DF,NF]=MF(WM),kF=v.forwardRef(((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:a,required:i,disabled:s,value:u="on",onCheckedChange:l,...c}=e,[d,f]=v.useState(null),p=Vt(t,(e=>f(e))),m=v.useRef(!1),h=!d||!!d.closest("form"),[g=!1,y]=fd({prop:o,defaultProp:a,onChange:l}),b=v.useRef(g);return v.useEffect((()=>{const e=null==d?void 0:d.form;if(e){const t=()=>y(b.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}}),[d,y]),v.createElement(DF,{scope:n,state:g,disabled:s},v.createElement(lt.button,Pe({type:"button",role:"checkbox","aria-checked":Bf(g)?"mixed":g,"aria-required":i,"data-state":qM(g),"data-disabled":s?"":void 0,disabled:s,value:u},c,{ref:p,onKeyDown:et(e.onKeyDown,(e=>{"Enter"===e.key&&e.preventDefault()})),onClick:et(e.onClick,(e=>{y((e=>!!Bf(e)||!e)),h&&(m.current=e.isPropagationStopped(),m.current||e.stopPropagation())}))})),h&&v.createElement(BF,{control:d,bubbles:!m.current,name:r,value:u,checked:g,required:i,disabled:s,style:{transform:"translateX(-100%)"}}))})),LF="CheckboxIndicator",FF=v.forwardRef(((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,a=NF(LF,n);return v.createElement(ea,{present:r||Bf(a.state)||!0===a.state},v.createElement(lt.span,Pe({"data-state":qM(a.state),"data-disabled":a.disabled?"":void 0},o,{ref:t,style:{pointerEvents:"none",...e.style}})))})),BF=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,a=v.useRef(null),i=ky(n),s=Ly(t);return v.useEffect((()=>{const e=a.current,t=window.HTMLInputElement.prototype,o=Object.getOwnPropertyDescriptor(t,"checked").set;if(i!==n&&o){const t=new Event("click",{bubbles:r});e.indeterminate=Bf(n),o.call(e,!Bf(n)&&n),e.dispatchEvent(t)}}),[i,n,r]),v.createElement("input",Pe({type:"checkbox","aria-hidden":!0,defaultChecked:!Bf(n)&&n},o,{tabIndex:-1,ref:a,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function Bf(e){return"indeterminate"===e}function qM(e){return Bf(e)?"indeterminate":e?"checked":"unchecked"}const GM=kF,jF=FF,zF=gu("relative overflow-hidden ",{variants:{size:{default:"size-xs"},variant:{default:"peer shrink-0 rounded-sm border disabled:cursor-not-allowed disabled:!border-0 disabled:!bg-gray-100"}},defaultVariants:{size:"default",variant:"default"}}),ZE=v.forwardRef((({className:e,size:t,variant:n,iconType:r,...o},a)=>{const i=o.checked,[s]=v.useState(i),[u,l]=v.useState(!1);v.useEffect((()=>{s!==i&&l(!0)}),[i]);const c=e=>"minus"===r?G.jsx(q5,{...e}):G.jsx(gE,{...e});return G.jsxs(GM,{ref:a,className:_e(zF({size:t,variant:n}),"transition-[border] duration-100 ease-linear",i?"border-0":"border-gray-300 hover:border-2",e),...o,children:[G.jsx("div",{className:_e("transform-origin-center absolute left-0 top-0 size-full rounded-full bg-blue_100",i?"scale-[1.2]":"scale-0",{"animate-fill-in":i&&u,"animate-fill-out":!i&&u})}),G.jsx(jF,{className:"relative flex items-center justify-center text-current",children:G.jsx(c,{className:"size-xxxs",color:o.disabled?"var(--gray-300)":"white"})})]})}));ZE.displayName=GM.displayName;var vT=1,VF=.9,UF=.8,WF=.17,lx=.1,cx=.999,qF=.9999,GF=.99,HF=/[\\\/_+.#"@\[\(\{&]/,KF=/[\\\/_+.#"@\[\(\{&]/g,YF=/[\s-]/,HM=/[\s-]/g;function LS(e,t,n,r,o,a,i){if(a===t.length)return o===e.length?vT:GF;var s=`${o},${a}`;if(void 0!==i[s])return i[s];for(var u,l,c,d,f=r.charAt(a),p=n.indexOf(f,o),m=0;p>=0;)(u=LS(e,t,n,r,p+1,a+1,i))>m&&(p===o?u*=vT:HF.test(e.charAt(p-1))?(u*=UF,(c=e.slice(o,p-1).match(KF))&&o>0&&(u*=Math.pow(cx,c.length))):YF.test(e.charAt(p-1))?(u*=VF,(d=e.slice(o,p-1).match(HM))&&o>0&&(u*=Math.pow(cx,d.length))):(u*=WF,o>0&&(u*=Math.pow(cx,p-o))),e.charAt(p)!==t.charAt(a)&&(u*=qF)),(u<lx&&n.charAt(p-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(p-1)!==r.charAt(a))&&((l=LS(e,t,n,r,p+1,a+2,i))*lx>u&&(u=l*lx)),u>m&&(m=u),p=n.indexOf(f,p+1);return i[s]=m,m}function gT(e){return e.toLowerCase().replace(HM," ")}function QF(e,t,n){return LS(e=n&&n.length>0?""+(e+" "+n.join(" ")):e,t,gT(e),gT(t),0,0,{})}var Wh='[cmdk-group=""]',dx='[cmdk-group-items=""]',XF='[cmdk-group-heading=""]',e$='[cmdk-item=""]',yT=`${e$}:not([aria-disabled="true"])`,FS="cmdk-item-select",Nf="data-value",JF=(e,t,n)=>QF(e,t,n),KM=v.createContext(void 0),Lv=()=>v.useContext(KM),YM=v.createContext(void 0),t$=()=>v.useContext(YM),QM=v.createContext(void 0),XM=v.forwardRef(((e,t)=>{let n=$m((()=>{var t,n;return{search:"",value:null!=(n=null!=(t=e.value)?t:e.defaultValue)?n:"",filtered:{count:0,items:new Map,groups:new Set}}})),r=$m((()=>new Set)),o=$m((()=>new Map)),a=$m((()=>new Map)),i=$m((()=>new Set)),s=JM(e),{label:u,children:l,value:c,onValueChange:d,filter:f,shouldFilter:p,loop:m,disablePointerSelection:h=!1,vimBindings:g=!0,...y}=e,b=v.useId(),w=v.useId(),x=v.useId(),_=v.useRef(null),E=lB();Hf((()=>{if(void 0!==c){let e=c.trim();n.current.value=e,S.emit()}}),[c]),Hf((()=>{E(6,R)}),[]);let S=v.useMemo((()=>({subscribe:e=>(i.current.add(e),()=>i.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var o,a,i;if(!Object.is(n.current[e],t)){if(n.current[e]=t,"search"===e)P(),k(),E(1,C);else if("value"===e&&(r||E(5,R),void 0!==(null==(o=s.current)?void 0:o.value))){let e=t??"";return void(null==(i=(a=s.current).onValueChange)||i.call(a,e))}S.emit()}},emit:()=>{i.current.forEach((e=>e()))}})),[]),I=v.useMemo((()=>({value:(e,t,r)=>{var o;t!==(null==(o=a.current.get(e))?void 0:o.value)&&(a.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,A(t,r)),E(2,(()=>{k(),S.emit()})))},item:(e,t)=>(r.current.add(e),t&&(o.current.has(t)?o.current.get(t).add(e):o.current.set(t,new Set([e]))),E(3,(()=>{P(),k(),n.current.value||C(),S.emit()})),()=>{a.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=O();E(4,(()=>{P(),(null==t?void 0:t.getAttribute("id"))===e&&C(),S.emit()}))}),group:e=>(o.current.has(e)||o.current.set(e,new Set),()=>{a.current.delete(e),o.current.delete(e)}),filter:()=>s.current.shouldFilter,label:u||e["aria-label"],disablePointerSelection:h,listId:b,inputId:x,labelId:w,listInnerRef:_})),[]);function A(e,t){var r,o;let a=null!=(o=null==(r=s.current)?void 0:r.filter)?o:JF;return e?a(e,n.current.search,t):0}function k(){if(!n.current.search||!1===s.current.shouldFilter)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach((n=>{let r=o.current.get(n),a=0;r.forEach((t=>{let n=e.get(t);a=Math.max(n,a)})),t.push([n,a])}));let r=_.current;T().sort(((t,n)=>{var r,o;let a=t.getAttribute("id"),i=n.getAttribute("id");return(null!=(r=e.get(i))?r:0)-(null!=(o=e.get(a))?o:0)})).forEach((e=>{let t=e.closest(dx);t?t.appendChild(e.parentElement===t?e:e.closest(`${dx} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${dx} > *`))})),t.sort(((e,t)=>t[1]-e[1])).forEach((e=>{let t=_.current.querySelector(`${Wh}[${Nf}="${encodeURIComponent(e[0])}"]`);null==t||t.parentElement.appendChild(t)}))}function C(){let e=T().find((e=>"true"!==e.getAttribute("aria-disabled"))),t=null==e?void 0:e.getAttribute(Nf);S.setState("value",t||void 0)}function P(){var e,t,i,u;if(!n.current.search||!1===s.current.shouldFilter)return void(n.current.filtered.count=r.current.size);n.current.filtered.groups=new Set;let l=0;for(let o of r.current){let r=A(null!=(t=null==(e=a.current.get(o))?void 0:e.value)?t:"",null!=(u=null==(i=a.current.get(o))?void 0:i.keywords)?u:[]);n.current.filtered.items.set(o,r),r>0&&l++}for(let[e,t]of o.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=l}function R(){var e,t,n;let r=O();r&&((null==(e=r.parentElement)?void 0:e.firstChild)===r&&(null==(n=null==(t=r.closest(Wh))?void 0:t.querySelector(XF))||n.scrollIntoView({block:"nearest"})),r.scrollIntoView({block:"nearest"}))}function O(){var e;return null==(e=_.current)?void 0:e.querySelector(`${e$}[aria-selected="true"]`)}function T(){var e;return Array.from(null==(e=_.current)?void 0:e.querySelectorAll(yT))}function N(e){let t=T()[e];t&&S.setState("value",t.getAttribute(Nf))}function M(e){var t;let n=O(),r=T(),o=r.findIndex((e=>e===n)),a=r[o+e];null!=(t=s.current)&&t.loop&&(a=o+e<0?r[r.length-1]:o+e===r.length?r[0]:r[o+e]),a&&S.setState("value",a.getAttribute(Nf))}function j(e){let t,n=O(),r=null==n?void 0:n.closest(Wh);for(;r&&!t;)r=e>0?sB(r,Wh):uB(r,Wh),t=null==r?void 0:r.querySelector(yT);t?S.setState("value",t.getAttribute(Nf)):M(e)}let D=()=>N(T().length-1),q=e=>{e.preventDefault(),e.metaKey?D():e.altKey?j(1):M(1)},z=e=>{e.preventDefault(),e.metaKey?N(0):e.altKey?j(-1):M(-1)};return v.createElement(lt.div,{ref:t,tabIndex:-1,...y,"cmdk-root":"",onKeyDown:e=>{var t;if(null==(t=y.onKeyDown)||t.call(y,e),!e.defaultPrevented)switch(e.key){case"n":case"j":g&&e.ctrlKey&&q(e);break;case"ArrowDown":q(e);break;case"p":case"k":g&&e.ctrlKey&&z(e);break;case"ArrowUp":z(e);break;case"Home":e.preventDefault(),N(0);break;case"End":e.preventDefault(),D();break;case"Enter":if(!e.nativeEvent.isComposing&&229!==e.keyCode){e.preventDefault();let t=O();if(t){let e=new Event(FS);t.dispatchEvent(e)}}}}},v.createElement("label",{"cmdk-label":"",htmlFor:I.inputId,id:I.labelId,style:dB},u),Fy(e,(e=>v.createElement(YM.Provider,{value:S},v.createElement(KM.Provider,{value:I},e)))))})),ZF=v.forwardRef(((e,t)=>{var n,r;let o=v.useId(),a=v.useRef(null),i=v.useContext(QM),s=Lv(),u=JM(e),l=null!=(r=null==(n=u.current)?void 0:n.forceMount)?r:null==i?void 0:i.forceMount;Hf((()=>{if(!l)return s.item(o,null==i?void 0:i.id)}),[l]);let c=ZM(o,a,[e.value,e.children,a],e.keywords),d=t$(),f=Kf((e=>e.value&&e.value===c.current)),p=Kf((e=>!(!l&&!1!==s.filter())||(!e.search||e.filtered.items.get(o)>0)));function m(){var e,t;h(),null==(t=(e=u.current).onSelect)||t.call(e,c.current)}function h(){d.setState("value",c.current,!0)}if(v.useEffect((()=>{let t=a.current;if(t&&!e.disabled)return t.addEventListener(FS,m),()=>t.removeEventListener(FS,m)}),[p,e.onSelect,e.disabled]),!p)return null;let{disabled:g,value:y,onSelect:b,forceMount:w,keywords:x,..._}=e;return v.createElement(lt.div,{ref:gv([a,t]),..._,id:o,"cmdk-item":"",role:"option","aria-disabled":!!g,"aria-selected":!!f,"data-disabled":!!g,"data-selected":!!f,onPointerMove:g||s.disablePointerSelection?void 0:h,onClick:g?void 0:m},e.children)})),eB=v.forwardRef(((e,t)=>{let{heading:n,children:r,forceMount:o,...a}=e,i=v.useId(),s=v.useRef(null),u=v.useRef(null),l=v.useId(),c=Lv(),d=Kf((e=>!(!o&&!1!==c.filter())||(!e.search||e.filtered.groups.has(i))));Hf((()=>c.group(i)),[]),ZM(i,s,[e.value,e.heading,u]);let f=v.useMemo((()=>({id:i,forceMount:o})),[o]);return v.createElement(lt.div,{ref:gv([s,t]),...a,"cmdk-group":"",role:"presentation",hidden:!d||void 0},n&&v.createElement("div",{ref:u,"cmdk-group-heading":"","aria-hidden":!0,id:l},n),Fy(e,(e=>v.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?l:void 0},v.createElement(QM.Provider,{value:f},e)))))})),tB=v.forwardRef(((e,t)=>{let{alwaysRender:n,...r}=e,o=v.useRef(null),a=Kf((e=>!e.search));return n||a?v.createElement(lt.div,{ref:gv([o,t]),...r,"cmdk-separator":"",role:"separator"}):null})),nB=v.forwardRef(((e,t)=>{let{onValueChange:n,...r}=e,o=null!=e.value,a=t$(),i=Kf((e=>e.search)),s=Kf((e=>e.value)),u=Lv(),l=v.useMemo((()=>{var e;let t=null==(e=u.listInnerRef.current)?void 0:e.querySelector(`${e$}[${Nf}="${encodeURIComponent(s)}"]`);return null==t?void 0:t.getAttribute("id")}),[]);return v.useEffect((()=>{null!=e.value&&a.setState("search",e.value)}),[e.value]),v.createElement(lt.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":u.listId,"aria-labelledby":u.labelId,"aria-activedescendant":l,id:u.inputId,type:"text",value:o?e.value:i,onChange:e=>{o||a.setState("search",e.target.value),null==n||n(e.target.value)}})})),rB=v.forwardRef(((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,a=v.useRef(null),i=v.useRef(null),s=Lv();return v.useEffect((()=>{if(i.current&&a.current){let e,t=i.current,n=a.current,r=new ResizeObserver((()=>{e=requestAnimationFrame((()=>{let e=t.offsetHeight;n.style.setProperty("--cmdk-list-height",e.toFixed(1)+"px")}))}));return r.observe(t),()=>{cancelAnimationFrame(e),r.unobserve(t)}}}),[]),v.createElement(lt.div,{ref:gv([a,t]),...o,"cmdk-list":"",role:"listbox","aria-label":r,id:s.listId},Fy(e,(e=>v.createElement("div",{ref:gv([i,s.listInnerRef]),"cmdk-list-sizer":""},e))))})),oB=v.forwardRef(((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:a,container:i,...s}=e;return v.createElement(FA,{open:n,onOpenChange:r},v.createElement(Ey,{container:i},v.createElement(Bm,{"cmdk-overlay":"",className:o}),v.createElement(jm,{"aria-label":e.label,"cmdk-dialog":"",className:a},v.createElement(XM,{ref:t,...s}))))})),iB=v.forwardRef(((e,t)=>Kf((e=>0===e.filtered.count))?v.createElement(lt.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null)),aB=v.forwardRef(((e,t)=>{let{progress:n,children:r,label:o="Loading...",...a}=e;return v.createElement(lt.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},Fy(e,(e=>v.createElement("div",{"aria-hidden":!0},e))))})),$i=Object.assign(XM,{List:rB,Item:ZF,Input:nB,Group:eB,Separator:tB,Dialog:oB,Empty:iB,Loading:aB});function sB(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function uB(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function JM(e){let t=v.useRef(e);return Hf((()=>{t.current=e})),t}var Hf=typeof window>"u"?v.useEffect:v.useLayoutEffect;function $m(e){let t=v.useRef();return void 0===t.current&&(t.current=e()),t}function gv(e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}function Kf(e){let t=t$(),n=()=>e(t.snapshot());return v.useSyncExternalStore(t.subscribe,n,n)}function ZM(e,t,n,r=[]){let o=v.useRef(),a=Lv();return Hf((()=>{var i;let s=(()=>{var e;for(let t of n){if("string"==typeof t)return t.trim();if("object"==typeof t&&"current"in t)return t.current?null==(e=t.current.textContent)?void 0:e.trim():o.current}})(),u=r.map((e=>e.trim()));a.value(e,s,u),null==(i=t.current)||i.setAttribute(Nf,s),o.current=s})),o}var lB=()=>{let[e,t]=v.useState(),n=$m((()=>new Map));return Hf((()=>{n.current.forEach((e=>e())),n.current=new Map}),[e]),(e,r)=>{n.current.set(e,r),t({})}};function cB(e){let t=e.type;return"function"==typeof t?t(e.props):"render"in t?t.render(e.props):e}function Fy({asChild:e,children:t},n){return e&&v.isValidElement(t)?v.cloneElement(cB(t),{ref:t.ref},n(t.props.children)):n(t)}var dB={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const fB=Ey,eD=v.forwardRef((({className:e,...t},n)=>(v.useEffect((()=>{const e=document.querySelectorAll(".blured-modal-overlay");return e.forEach((e=>e&&(e.style.filter="blur(5px)"))),()=>{0===Array.from(document.querySelectorAll('[role="dialog"]')).length&&e.forEach((e=>e&&(e.style.filter="none")))}}),[]),G.jsx(Bm,{ref:n,"data-testid":"dialog_overlay",className:_e("fixed inset-0 z-dialog bg-black opacity-[0.8] data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}))));eD.displayName=Bm.displayName;const pB=gu("",{variants:{closeVariant:{none:"",insideCard:"absolute right-m top-m rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground text-gray-400",outsideCard:"fixed right-[30px] top-[30px] z-100 text-gray-400",mobileGallery:"fixed right-m top-[62px] text-white z-[110]"}},defaultVariants:{closeVariant:"outsideCard"}}),mB=gu("",{variants:{closeSize:{small:"size-6",big:"size-[42px]","18x18":"size-[18px]"}},defaultVariants:{closeSize:"small"}}),hB=v.forwardRef((({title:e,titleIcon:t,className:n,dialogName:r,showClose:o=!0,closeVariant:a="outsideCard",closeSize:i="big",children:s,titleClassName:u,overlayClassName:l,childrenClassName:c,footerClassName:d,onBack:f,onCloseModal:p,renderFooter:m,onScroll:v,...h},g)=>{const y=G.jsxs($y,{className:_e(pB({closeVariant:a})),children:[G.jsx(gy,{onClick:p,fill:"currentColor",className:_e(mB({closeSize:i}))}),G.jsx("span",{className:"sr-only",children:"Close"})]});return G.jsxs(fB,{children:[G.jsx(eD,{className:l,onClick:p}),o&&"insideCard"!==a&&y,G.jsxs(jm,{ref:g,className:_e("fixed left-[50%] top-[50%] z-[101] grid max-w-[600px] translate-x-[-50%] translate-y-[-50%] !overflow-visible rounded-sm bg-background shadow-lg outline-none duration-200 data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] max-md:w-[calc(100vw-32px)] md:w-full [&>div]:min-w-0",n),...h,children:[e&&G.jsxs("h3",{className:_e("flex items-center justify-center gap-xxs border-b border-gray-200 p-m text-center text-lg font-semibold text-gray-700",u),children:[t,e]}),G.jsx("div",{id:r||"dialog-content",className:_e("p-m",c),onScroll:v,children:s}),o&&"insideCard"===a&&y,f&&G.jsx("button",{"data-testid":"dialog-back-button","aria-label":"Back",onClick:f,className:"absolute left-m top-m",children:G.jsx(iA,{color:"var(--gray-400)",size:24})}),G.jsx(tD,{className:_e("empty:hidden",d),children:null==m?void 0:m()})]})]})}));hB.displayName=jm.displayName;const tD=({className:e,...t})=>G.jsx("div",{className:_e("flex border-t border-gray-200 p-m",e),...t});tD.displayName="DialogFooter";const vB=v.forwardRef((({className:e,...t},n)=>G.jsx(Ov,{ref:n,className:_e("text-lg font-semibold leading-none tracking-tight",e),...t})));vB.displayName=Ov.displayName;const gB=v.forwardRef((({className:e,...t},n)=>G.jsx(Av,{ref:n,className:_e("text-sm text-muted-foreground",e),...t})));gB.displayName=Av.displayName;const yB=v.forwardRef((({className:e,...t},n)=>G.jsx($i,{ref:n,className:_e("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t})));yB.displayName=$i.displayName;const wB=v.forwardRef((({className:e,...t},n)=>G.jsx("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:G.jsx($i.Input,{ref:n,className:_e("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})})));wB.displayName=$i.Input.displayName;const bB=v.forwardRef((({className:e,...t},n)=>G.jsx($i.List,{ref:n,className:_e("mt-2 max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t})));bB.displayName=$i.List.displayName;const _B=v.forwardRef(((e,t)=>G.jsx($i.Empty,{ref:t,className:"py-6 text-center text-sm",...e})));_B.displayName=$i.Empty.displayName;const xB=v.forwardRef((({className:e,...t},n)=>G.jsx($i.Group,{ref:n,className:_e("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t})));xB.displayName=$i.Group.displayName;const SB=v.forwardRef((({className:e,...t},n)=>G.jsx($i.Separator,{ref:n,className:_e("-mx-1 h-px bg-border",e),...t})));SB.displayName=$i.Separator.displayName;const EB=v.forwardRef((({className:e,...t},n)=>G.jsx($i.Item,{ref:n,className:_e("relative flex max-w-[215px] cursor-default select-none items-center rounded-xs px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50",e),...t})));function sd(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function wT(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function nD(...e){return t=>{let n=!1;const r=e.map((e=>{const r=wT(e,t);return!n&&"function"==typeof r&&(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():wT(e[t],null)}}}}function ep(...e){return v.useCallback(nD(...e),e)}function $B(e,t){const n=v.createContext(t),r=e=>{const{children:t,...r}=e,o=v.useMemo((()=>r),Object.values(r));return G.jsx(n.Provider,{value:o,children:t})};return r.displayName=e+"Provider",[r,function(r){const o=v.useContext(n);if(o)return o;if(void 0!==t)return t;throw new Error(`\`${r}\` must be used within \`${e}\``)}]}function CB(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>v.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return v.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=v.createContext(r),a=n.length;n=[...n,r];const i=t=>{var n;const{scope:r,children:i,...s}=t,u=(null==(n=null==r?void 0:r[e])?void 0:n[a])||o,l=v.useMemo((()=>s),Object.values(s));return G.jsx(u.Provider,{value:l,children:i})};return i.displayName=t+"Provider",[i,function(n,i){var s;const u=(null==(s=null==i?void 0:i[e])?void 0:s[a])||o,l=v.useContext(u);if(l)return l;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},IB(r,...t)]}function IB(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return v.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}EB.displayName=$i.Item.displayName;var Xg=null!=globalThis&&globalThis.document?v.useLayoutEffect:()=>{},RB=Yg[" useId ".trim().toString()]||(()=>{}),PB=0;function fx(e){const[t,n]=v.useState(RB());return Xg((()=>{e||n((e=>e??String(PB++)))}),[e]),e||(t?`radix-${t}`:"")}function Yf(e){const t=v.useRef(e);return v.useEffect((()=>{t.current=e})),v.useMemo((()=>(...e)=>{var n;return null==(n=t.current)?void 0:n.call(t,...e)}),[])}function TB({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=OB({defaultProp:t,onChange:n}),a=void 0!==e,i=a?e:r,s=Yf(n);return[i,v.useCallback((t=>{if(a){const n="function"==typeof t?t(e):t;n!==e&&s(n)}else o(t)}),[a,e,o,s])]}function OB({defaultProp:e,onChange:t}){const n=v.useState(e),[r]=n,o=v.useRef(r),a=Yf(t);return v.useEffect((()=>{o.current!==r&&(a(r),o.current=r)}),[r,o,a]),n}function rD(e){const t=AB(e),n=v.forwardRef(((e,n)=>{const{children:r,...o}=e,a=v.Children.toArray(r),i=a.find(DB);if(i){const e=i.props.children,r=a.map((t=>t===i?v.Children.count(e)>1?v.Children.only(null):v.isValidElement(e)?e.props.children:null:t));return G.jsx(t,{...o,ref:n,children:v.isValidElement(e)?v.cloneElement(e,void 0,r):null})}return G.jsx(t,{...o,ref:n,children:r})}));return n.displayName=`${e}.Slot`,n}function AB(e){const t=v.forwardRef(((e,t)=>{const{children:n,...r}=e;if(v.isValidElement(n)){const e=kB(n),o=NB(r,n.props);return n.type!==v.Fragment&&(o.ref=t?nD(t,e):e),v.cloneElement(n,o)}return v.Children.count(n)>1?v.Children.only(null):null}));return t.displayName=`${e}.SlotClone`,t}var MB=Symbol("radix.slottable");function DB(e){return v.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===MB}function NB(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{a(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function kB(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?e.ref:(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var LB=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Il=LB.reduce(((e,t)=>{const n=rD(`Primitive.${t}`),r=v.forwardRef(((e,r)=>{const{asChild:o,...a}=e,i=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),G.jsx(i,{...a,ref:r})}));return r.displayName=`Primitive.${t}`,{...e,[t]:r}}),{});function FB(e,t){e&&vu.flushSync((()=>e.dispatchEvent(t)))}function BB(e,t=(null==globalThis?void 0:globalThis.document)){const n=Yf(e);v.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})}),[n,t])}var bT,jB="DismissableLayer",BS="dismissableLayer.update",zB="dismissableLayer.pointerDownOutside",VB="dismissableLayer.focusOutside",oD=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),iD=v.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...u}=e,l=v.useContext(oD),[c,d]=v.useState(null),f=(null==c?void 0:c.ownerDocument)??(null==globalThis?void 0:globalThis.document),[,p]=v.useState({}),m=ep(t,(e=>d(e))),h=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),y=h.indexOf(g),b=c?h.indexOf(c):-1,w=l.layersWithOutsidePointerEventsDisabled.size>0,x=b>=y,_=qB((e=>{const t=e.target,n=[...l.branches].some((e=>e.contains(t)));!x||n||(null==o||o(e),null==i||i(e),e.defaultPrevented||null==s||s())}),f),E=GB((e=>{const t=e.target;[...l.branches].some((e=>e.contains(t)))||(null==a||a(e),null==i||i(e),e.defaultPrevented||null==s||s())}),f);return BB((e=>{b===l.layers.size-1&&(null==r||r(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))}),f),v.useEffect((()=>{if(c)return n&&(0===l.layersWithOutsidePointerEventsDisabled.size&&(bT=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(c)),l.layers.add(c),_T(),()=>{n&&1===l.layersWithOutsidePointerEventsDisabled.size&&(f.body.style.pointerEvents=bT)}}),[c,f,n,l]),v.useEffect((()=>()=>{c&&(l.layers.delete(c),l.layersWithOutsidePointerEventsDisabled.delete(c),_T())}),[c,l]),v.useEffect((()=>{const e=()=>p({});return document.addEventListener(BS,e),()=>document.removeEventListener(BS,e)}),[]),G.jsx(Il.div,{...u,ref:m,style:{pointerEvents:w?x?"auto":"none":void 0,...e.style},onFocusCapture:sd(e.onFocusCapture,E.onFocusCapture),onBlurCapture:sd(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:sd(e.onPointerDownCapture,_.onPointerDownCapture)})}));iD.displayName=jB;var UB="DismissableLayerBranch",WB=v.forwardRef(((e,t)=>{const n=v.useContext(oD),r=v.useRef(null),o=ep(t,r);return v.useEffect((()=>{const e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),G.jsx(Il.div,{...e,ref:o})}));function qB(e,t=(null==globalThis?void 0:globalThis.document)){const n=Yf(e),r=v.useRef(!1),o=v.useRef((()=>{}));return v.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){aD(zB,n,a,{discrete:!0})};const a={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}function GB(e,t=(null==globalThis?void 0:globalThis.document)){const n=Yf(e),r=v.useRef(!1);return v.useEffect((()=>{const e=e=>{e.target&&!r.current&&aD(VB,n,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function _T(){const e=new CustomEvent(BS);document.dispatchEvent(e)}function aD(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?FB(o,a):o.dispatchEvent(a)}WB.displayName=UB;var px="focusScope.autoFocusOnMount",mx="focusScope.autoFocusOnUnmount",xT={bubbles:!1,cancelable:!0},HB="FocusScope",sD=v.forwardRef(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[s,u]=v.useState(null),l=Yf(o),c=Yf(a),d=v.useRef(null),f=ep(t,(e=>u(e))),p=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect((()=>{if(r){let e=function(e){if(p.paused||!s)return;const t=e.target;s.contains(t)?d.current=t:id(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;const t=e.relatedTarget;null!==t&&(s.contains(t)||id(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&id(s)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}}),[r,s,p.paused]),v.useEffect((()=>{if(s){ET.add(p);const e=document.activeElement;if(!s.contains(e)){const t=new CustomEvent(px,xT);s.addEventListener(px,l),s.dispatchEvent(t),t.defaultPrevented||(KB(ZB(uD(s)),{select:!0}),document.activeElement===e&&id(s))}return()=>{s.removeEventListener(px,l),setTimeout((()=>{const t=new CustomEvent(mx,xT);s.addEventListener(mx,c),s.dispatchEvent(t),t.defaultPrevented||id(e??document.body,{select:!0}),s.removeEventListener(mx,c),ET.remove(p)}),0)}}}),[s,l,c,p]);const m=v.useCallback((e=>{if(!n&&!r||p.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){const t=e.currentTarget,[r,a]=YB(t);r&&a?e.shiftKey||o!==a?e.shiftKey&&o===r&&(e.preventDefault(),n&&id(a,{select:!0})):(e.preventDefault(),n&&id(r,{select:!0})):o===t&&e.preventDefault()}}),[n,r,p.paused]);return G.jsx(Il.div,{tabIndex:-1,...i,ref:f,onKeyDown:m})}));function KB(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(id(r,{select:t}),document.activeElement!==n)return}function YB(e){const t=uD(e);return[ST(t,e),ST(t.reverse(),e)]}function uD(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ST(e,t){for(const n of e)if(!QB(n,{upTo:t}))return n}function QB(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function XB(e){return e instanceof HTMLInputElement&&"select"in e}function id(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&XB(e)&&t&&e.select()}}sD.displayName=HB;var ET=JB();function JB(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=$T(e,t),e.unshift(t)},remove(t){var n;e=$T(e,t),null==(n=e[0])||n.resume()}}}function $T(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}function ZB(e){return e.filter((e=>"A"!==e.tagName))}var ej="Portal",lD=v.forwardRef(((e,t)=>{var n;const{container:r,...o}=e,[a,i]=v.useState(!1);Xg((()=>i(!0)),[]);const s=r||a&&(null==(n=null==globalThis?void 0:globalThis.document)?void 0:n.body);return s?eA.createPortal(G.jsx(Il.div,{...o,ref:t}),s):null}));function tj(e,t){return v.useReducer(((e,n)=>t[e][n]??e),e)}lD.displayName=ej;var By=e=>{const{present:t,children:n}=e,r=nj(t),o="function"==typeof n?n({present:r.isPresent}):v.Children.only(n),a=ep(r.ref,rj(o));return"function"==typeof n||r.isPresent?v.cloneElement(o,{ref:a}):null};function nj(e){const[t,n]=v.useState(),r=v.useRef({}),o=v.useRef(e),a=v.useRef("none"),i=e?"mounted":"unmounted",[s,u]=tj(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect((()=>{const e=Cg(r.current);a.current="mounted"===s?e:"none"}),[s]),Xg((()=>{const t=r.current,n=o.current;if(n!==e){const r=a.current,i=Cg(t);e?u("MOUNT"):"none"===i||"none"===(null==t?void 0:t.display)?u("UNMOUNT"):u(n&&r!==i?"ANIMATION_OUT":"UNMOUNT"),o.current=e}}),[e,u]),Xg((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,i=a=>{const i=Cg(r.current).includes(a.animationName);if(a.target===t&&i&&(u("ANIMATION_END"),!o.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout((()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)}))}},s=e=>{e.target===t&&(a.current=Cg(r.current))};return t.addEventListener("animationstart",s),t.addEventListener("animationcancel",i),t.addEventListener("animationend",i),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",s),t.removeEventListener("animationcancel",i),t.removeEventListener("animationend",i)}}u("ANIMATION_END")}),[t,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:v.useCallback((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}function Cg(e){return(null==e?void 0:e.animationName)||"none"}function rj(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?e.ref:(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}By.displayName="Presence";var hx=0;function oj(){v.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??CT()),document.body.insertAdjacentElement("beforeend",e[1]??CT()),hx++,()=>{1===hx&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),hx--}}),[])}function CT(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var cD=_A(),vx=function(){},jy=v.forwardRef((function(e,t){var n=v.useRef(null),r=v.useState({onScrollCapture:vx,onWheelCapture:vx,onTouchMoveCapture:vx}),o=r[0],a=r[1],i=e.forwardProps,s=e.children,u=e.className,l=e.removeScrollBar,c=e.enabled,d=e.shards,f=e.sideCar,p=e.noIsolation,m=e.inert,h=e.allowPinchZoom,g=e.as,y=void 0===g?"div":g,b=e.gapMode,w=$E(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),x=f,_=bA([n,t]),E=zo(zo({},w),o);return v.createElement(v.Fragment,null,c&&v.createElement(x,{sideCar:cD,removeScrollBar:l,shards:d,noIsolation:p,inert:m,setCallbacks:a,allowPinchZoom:!!h,lockRef:n,gapMode:b}),i?v.cloneElement(v.Children.only(s),zo(zo({},E),{ref:_})):v.createElement(y,zo({},E,{className:u,ref:_}),s))}));jy.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},jy.classNames={fullWidth:iv,zeroRight:ov};var jS=!1;if(typeof window<"u")try{var Ig=Object.defineProperty({},"passive",{get:function(){return jS=!0,!0}});window.addEventListener("test",Ig,Ig),window.removeEventListener("test",Ig,Ig)}catch{jS=!1}var _m=!!jS&&{passive:!1},ij=function(e){return"TEXTAREA"===e.tagName},dD=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!ij(e)&&"visible"===n[t])},aj=function(e){return dD(e,"overflowY")},sj=function(e){return dD(e,"overflowX")},IT=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host),fD(e,r)){var o=pD(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},uj=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},lj=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},fD=function(e,t){return"v"===e?aj(t):sj(t)},pD=function(e,t){return"v"===e?uj(t):lj(t)},cj=function(e,t){return"h"===e&&"rtl"===t?-1:1},dj=function(e,t,n,r,o){var a=cj(e,window.getComputedStyle(t).direction),i=a*r,s=n.target,u=t.contains(s),l=!1,c=i>0,d=0,f=0;do{var p=pD(e,s),m=p[0],v=p[1]-p[2]-a*m;(m||v)&&fD(e,s)&&(d+=v,f+=m),s=s instanceof ShadowRoot?s.host:s.parentNode}while(!u&&s!==document.body||u&&(t.contains(s)||t===s));return(c&&(Math.abs(d)<1||!o)||!c&&(Math.abs(f)<1||!o))&&(l=!0),l},Rg=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},RT=function(e){return[e.deltaX,e.deltaY]},PT=function(e){return e&&"current"in e?e.current:e},fj=function(e,t){return e[0]===t[0]&&e[1]===t[1]},pj=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},mj=0,xm=[];function hj(e){var t=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),o=v.useState(mj++)[0],a=v.useState(CE)[0],i=v.useRef(e);v.useEffect((function(){i.current=e}),[e]),v.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=wA([e.lockRef.current],(e.shards||[]).map(PT),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(o))})),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(o))}))}}}),[e.inert,e.lockRef.current,e.shards]);var s=v.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var o,a=Rg(e),s=n.current,u="deltaX"in e?e.deltaX:s[0]-a[0],l="deltaY"in e?e.deltaY:s[1]-a[1],c=e.target,d=Math.abs(u)>Math.abs(l)?"h":"v";if("touches"in e&&"h"===d&&"range"===c.type)return!1;var f=IT(d,c);if(!f)return!0;if(f?o=d:(o="v"===d?"h":"v",f=IT(d,c)),!f)return!1;if(!r.current&&"changedTouches"in e&&(u||l)&&(r.current=o),!o)return!0;var p=r.current||o;return dj(p,t,e,"h"===p?u:l,!0)}),[]),u=v.useCallback((function(e){var n=e;if(xm.length&&xm[xm.length-1]===a){var r="deltaY"in n?RT(n):Rg(n),o=t.current.filter((function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&fj(e.delta,r)}))[0];if(o&&o.should)return void(n.cancelable&&n.preventDefault());if(!o){var u=(i.current.shards||[]).map(PT).filter(Boolean).filter((function(e){return e.contains(n.target)}));(u.length>0?s(n,u[0]):!i.current.noIsolation)&&n.cancelable&&n.preventDefault()}}}),[]),l=v.useCallback((function(e,n,r,o){var a={name:e,delta:n,target:r,should:o,shadowParent:vj(r)};t.current.push(a),setTimeout((function(){t.current=t.current.filter((function(e){return e!==a}))}),1)}),[]),c=v.useCallback((function(e){n.current=Rg(e),r.current=void 0}),[]),d=v.useCallback((function(t){l(t.type,RT(t),t.target,s(t,e.lockRef.current))}),[]),f=v.useCallback((function(t){l(t.type,Rg(t),t.target,s(t,e.lockRef.current))}),[]);v.useEffect((function(){return xm.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",u,_m),document.addEventListener("touchmove",u,_m),document.addEventListener("touchstart",c,_m),function(){xm=xm.filter((function(e){return e!==a})),document.removeEventListener("wheel",u,_m),document.removeEventListener("touchmove",u,_m),document.removeEventListener("touchstart",c,_m)}}),[]);var p=e.removeScrollBar,m=e.inert;return v.createElement(v.Fragment,null,m?v.createElement(a,{styles:pj(o)}):null,p?v.createElement($A,{gapMode:e.gapMode}):null)}function vj(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const gj=SA(cD,hj);var mD=v.forwardRef((function(e,t){return v.createElement(jy,zo({},e,{ref:t,sideCar:gj}))}));mD.classNames=jy.classNames;var n$="Dialog",[hD,tZ]=CB(n$),[yj,_s]=hD(n$),vD=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!0}=e,s=v.useRef(null),u=v.useRef(null),[l=!1,c]=TB({prop:r,defaultProp:o,onChange:a});return G.jsx(yj,{scope:t,triggerRef:s,contentRef:u,contentId:fx(),titleId:fx(),descriptionId:fx(),open:l,onOpenChange:c,onOpenToggle:v.useCallback((()=>c((e=>!e))),[c]),modal:i,children:n})};vD.displayName=n$;var gD="DialogTrigger",yD=v.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=_s(gD,n),a=ep(t,o.triggerRef);return G.jsx(Il.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":i$(o.open),...r,ref:a,onClick:sd(e.onClick,o.onOpenToggle)})}));yD.displayName=gD;var r$="DialogPortal",[wj,wD]=hD(r$,{forceMount:void 0}),bD=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=_s(r$,t);return G.jsx(wj,{scope:t,forceMount:n,children:v.Children.map(r,(e=>G.jsx(By,{present:n||a.open,children:G.jsx(lD,{asChild:!0,container:o,children:e})})))})};bD.displayName=r$;var Jg="DialogOverlay",_D=v.forwardRef(((e,t)=>{const n=wD(Jg,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=_s(Jg,e.__scopeDialog);return a.modal?G.jsx(By,{present:r||a.open,children:G.jsx(_j,{...o,ref:t})}):null}));_D.displayName=Jg;var bj=rD("DialogOverlay.RemoveScroll"),_j=v.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=_s(Jg,n);return G.jsx(mD,{as:bj,allowPinchZoom:!0,shards:[o.contentRef],children:G.jsx(Il.div,{"data-state":i$(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})})),Qf="DialogContent",xD=v.forwardRef(((e,t)=>{const n=wD(Qf,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=_s(Qf,e.__scopeDialog);return G.jsx(By,{present:r||a.open,children:a.modal?G.jsx(xj,{...o,ref:t}):G.jsx(Sj,{...o,ref:t})})}));xD.displayName=Qf;var xj=v.forwardRef(((e,t)=>{const n=_s(Qf,e.__scopeDialog),r=v.useRef(null),o=ep(t,n.contentRef,r);return v.useEffect((()=>{const e=r.current;if(e)return Sy(e)}),[]),G.jsx(SD,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:sd(e.onCloseAutoFocus,(e=>{var t;e.preventDefault(),null==(t=n.triggerRef.current)||t.focus()})),onPointerDownOutside:sd(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()})),onFocusOutside:sd(e.onFocusOutside,(e=>e.preventDefault()))})})),Sj=v.forwardRef(((e,t)=>{const n=_s(Qf,e.__scopeDialog),r=v.useRef(!1),o=v.useRef(!1);return G.jsx(SD,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var a,i;null==(a=e.onCloseAutoFocus)||a.call(e,t),t.defaultPrevented||(r.current||null==(i=n.triggerRef.current)||i.focus(),t.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:t=>{var a,i;null==(a=e.onInteractOutside)||a.call(e,t),t.defaultPrevented||(r.current=!0,"pointerdown"===t.detail.originalEvent.type&&(o.current=!0));const s=t.target;(null==(i=n.triggerRef.current)?void 0:i.contains(s))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}})})),SD=v.forwardRef(((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...i}=e,s=_s(Qf,n),u=v.useRef(null),l=ep(t,u);return oj(),G.jsxs(G.Fragment,{children:[G.jsx(sD,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:G.jsx(iD,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":i$(s.open),...i,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),G.jsxs(G.Fragment,{children:[G.jsx(Ej,{titleId:s.titleId}),G.jsx(Cj,{contentRef:u,descriptionId:s.descriptionId})]})]})})),o$="DialogTitle",ED=v.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=_s(o$,n);return G.jsx(Il.h2,{id:o.titleId,...r,ref:t})}));ED.displayName=o$;var $D="DialogDescription",CD=v.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=_s($D,n);return G.jsx(Il.p,{id:o.descriptionId,...r,ref:t})}));CD.displayName=$D;var ID="DialogClose",RD=v.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=_s(ID,n);return G.jsx(Il.button,{type:"button",...r,ref:t,onClick:sd(e.onClick,(()=>o.onOpenChange(!1)))})}));function i$(e){return e?"open":"closed"}RD.displayName=ID;var PD="DialogTitleWarning",[nZ,TD]=$B(PD,{contentName:Qf,titleName:o$,docsSlug:"dialog"}),Ej=({titleId:e})=>{const t=TD(PD),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return v.useEffect((()=>{e&&(document.getElementById(e)||console.error(n))}),[n,e]),null},$j="DialogDescriptionWarning",Cj=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${TD($j).contentName}}.`;return v.useEffect((()=>{var r;const o=null==(r=e.current)?void 0:r.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(n))}),[n,e,t]),null},Ij=vD,Rj=yD,Pj=bD,Tj=_D,Oj=xD,Aj=ED,Mj=CD,Dj=RD;function Nj(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const OD=Ue.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),Vm=()=>{const e=Ue.useContext(OD);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};Nj("[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,100%,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,-100%,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(-100%,0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(100%,0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(\n[data-state=closed]\n){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,100%,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,100%,0)}}@keyframes slideFromTop{from{transform:translate3d(0,-100%,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,-100%,0)}}@keyframes slideFromLeft{from{transform:translate3d(-100%,0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(-100%,0,0)}}@keyframes slideFromRight{from{transform:translate3d(100%,0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(100%,0,0)}}");const kj=24,Lj=typeof window<"u"?v.useLayoutEffect:v.useEffect;function TT(...e){return(...t)=>{for(let n of e)"function"==typeof n&&n(...t)}}function Fj(){return a$(/^Mac/)}function Bj(){return a$(/^iPhone/)}function OT(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function jj(){return a$(/^iPad/)||Fj()&&navigator.maxTouchPoints>1}function AD(){return Bj()||jj()}function a$(e){return typeof window<"u"&&null!=window.navigator?e.test(window.navigator.platform):void 0}const gx=typeof document<"u"&&window.visualViewport;function AT(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function MD(e){for(AT(e)&&(e=e.parentElement);e&&!AT(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const zj=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let yx,Pg=0;function Vj(e={}){let{isDisabled:t}=e;Lj((()=>{if(!t)return Pg++,1===Pg&&AD()&&(yx=Uj()),()=>{Pg--,0===Pg&&(null==yx||yx())}}),[t])}function Uj(){let e,t=0,n=window.pageXOffset,r=window.pageYOffset,o=TT(Wj(document.documentElement,"paddingRight",window.innerWidth-document.documentElement.clientWidth+"px"));window.scrollTo(0,0);let a=TT(qh(document,"touchstart",(n=>{e=MD(n.target),(e!==document.documentElement||e!==document.body)&&(t=n.changedTouches[0].pageY)}),{passive:!1,capture:!0}),qh(document,"touchmove",(n=>{if(!e||e===document.documentElement||e===document.body)return void n.preventDefault();let r=n.changedTouches[0].pageY,o=e.scrollTop,a=e.scrollHeight-e.clientHeight;0!==a&&((o<=0&&r>t||o>=a&&r<t)&&n.preventDefault(),t=r)}),{passive:!1,capture:!0}),qh(document,"touchend",(e=>{let t=e.target;zS(t)&&t!==document.activeElement&&(e.preventDefault(),t.style.transform="translateY(-2000px)",t.focus(),requestAnimationFrame((()=>{t.style.transform=""})))}),{passive:!1,capture:!0}),qh(document,"focus",(e=>{let t=e.target;zS(t)&&(t.style.transform="translateY(-2000px)",requestAnimationFrame((()=>{t.style.transform="",gx&&(gx.height<window.innerHeight?requestAnimationFrame((()=>{MT(t)})):gx.addEventListener("resize",(()=>MT(t)),{once:!0}))})))}),!0),qh(window,"scroll",(()=>{window.scrollTo(0,0)})));return()=>{o(),a(),window.scrollTo(n,r)}}function Wj(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function qh(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function MT(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let t=MD(e);if(t!==document.documentElement&&t!==document.body&&t!==e){let n=t.getBoundingClientRect().top,r=e.getBoundingClientRect().top;e.getBoundingClientRect().bottom>t.getBoundingClientRect().bottom+24&&(t.scrollTop+=r-n)}e=t.parentElement}}function zS(e){return e instanceof HTMLInputElement&&!zj.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function qj(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function Gj(...e){return t=>e.forEach((e=>qj(e,t)))}function DD(...e){return v.useCallback(Gj(...e),e)}const ND=new WeakMap;function Ur(e,t,n=!1){if(!(e&&e instanceof HTMLElement))return;let r={};Object.entries(t).forEach((([t,n])=>{t.startsWith("--")?e.style.setProperty(t,n):(r[t]=e.style[t],e.style[t]=n)})),!n&&ND.set(e,r)}function Hj(e,t){if(!(e&&e instanceof HTMLElement))return;let n=ND.get(e);n&&(e.style[t]=n[t])}const Wr=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function Tg(e,t){if(!e)return null;const n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform;let o=r.match(/^matrix3d\((.+)\)$/);return o?parseFloat(o[1].split(", ")[Wr(t)?13:12]):(o=r.match(/^matrix\((.+)\)$/),o?parseFloat(o[1].split(", ")[Wr(t)?5:4]):null)}function Kj(e){return 8*(Math.log(e+1)-2)}function wx(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function Yj(...e){return(...t)=>{for(const n of e)"function"==typeof n&&n(...t)}}const zn={DURATION:.5,EASE:[.32,.72,0,1]},kD=.4,Qj=.25,Xj=100,LD=8,Af=16,VS=26,bx="vaul-dragging";function FD(e){const t=Ue.useRef(e);return Ue.useEffect((()=>{t.current=e})),Ue.useMemo((()=>(...e)=>null==t.current?void 0:t.current.call(t,...e)),[])}function Jj({defaultProp:e,onChange:t}){const n=Ue.useState(e),[r]=n,o=Ue.useRef(r),a=FD(t);return Ue.useEffect((()=>{o.current!==r&&(a(r),o.current=r)}),[r,o,a]),n}function BD({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=Jj({defaultProp:t,onChange:n}),a=void 0!==e,i=a?e:r,s=FD(n);return[i,Ue.useCallback((t=>{if(a){const n="function"==typeof t?t(e):t;n!==e&&s(n)}else o(t)}),[a,e,o,s])]}function Zj({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:o,fadeFromIndex:a,onSnapPointChange:i,direction:s="bottom",container:u,snapToSequentialPoint:l}){const[c,d]=BD({prop:e,defaultProp:null==n?void 0:n[0],onChange:t}),[f,p]=Ue.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);Ue.useEffect((()=>{function e(){p({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]);const m=Ue.useMemo((()=>c===(null==n?void 0:n[n.length-1])||null),[n,c]),v=Ue.useMemo((()=>null==n?void 0:n.findIndex((e=>e===c))),[n,c]),h=n&&n.length>0&&(a||0===a)&&!Number.isNaN(a)&&n[a]===c||!n,g=Ue.useMemo((()=>{const e=u?{width:u.getBoundingClientRect().width,height:u.getBoundingClientRect().height}:typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var t;return null!=(t=null==n?void 0:n.map((t=>{const n="string"==typeof t;let r=0;if(n&&(r=parseInt(t,10)),Wr(s)){const o=n?r:f?t*e.height:0;return f?"bottom"===s?e.height-o:-e.height+o:o}const o=n?r:f?t*e.width:0;return f?"right"===s?e.width-o:-e.width+o:o})))?t:[]}),[n,f,u]),y=Ue.useMemo((()=>null!==v?null==g?void 0:g[v]:null),[g,v]),b=Ue.useCallback((e=>{var t;const u=null!=(t=null==g?void 0:g.findIndex((t=>t===e)))?t:null;i(u),Ur(r.current,{transition:`transform ${zn.DURATION}s cubic-bezier(${zn.EASE.join(",")})`,transform:Wr(s)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`}),g&&u!==g.length-1&&u!==a&&u<a?Ur(o.current,{transition:`opacity ${zn.DURATION}s cubic-bezier(${zn.EASE.join(",")})`,opacity:"0"}):Ur(o.current,{transition:`opacity ${zn.DURATION}s cubic-bezier(${zn.EASE.join(",")})`,opacity:"1"}),d(null==n?void 0:n[Math.max(u,0)])}),[r.current,n,g,a,o,d]);return Ue.useEffect((()=>{if(c||e){var t;const r=null!=(t=null==n?void 0:n.findIndex((t=>t===e||t===c)))?t:-1;g&&-1!==r&&"number"==typeof g[r]&&b(g[r])}}),[c,e,n,g,b]),{isLastSnapPoint:m,activeSnapPoint:c,shouldFade:h,getPercentageDragged:function(e,t){if(!n||"number"!=typeof v||!g||void 0===a)return null;const r=v===a-1;if(v>=a&&t)return 0;if(r&&!t)return 1;if(!h&&!r)return null;const o=r?v+1:v-1,i=r?g[o]-g[o-1]:g[o+1]-g[o],s=e/Math.abs(i);return r?1-s:s},setActiveSnapPoint:d,activeSnapPointIndex:v,onRelease:function({draggedDistance:e,closeDrawer:t,velocity:r,dismissible:i}){if(void 0===a)return;const u="bottom"===s||"right"===s?(y??0)-e:(y??0)+e,c=0===v,d=e>0;if(v===a-1&&Ur(o.current,{transition:`opacity ${zn.DURATION}s cubic-bezier(${zn.EASE.join(",")})`}),!l&&r>2&&!d)return void(i?t():b(g[0]));if(!l&&r>2&&d&&g&&n)return void b(g[n.length-1]);const f=null==g?void 0:g.reduce(((e,t)=>"number"!=typeof e||"number"!=typeof t?e:Math.abs(t-u)<Math.abs(e-u)?t:e)),p=Wr(s)?window.innerHeight:window.innerWidth;if(r>kD&&Math.abs(e)<.4*p){const e=d?1:-1;if(e>0&&m)return void b(g[n.length-1]);if(c&&e<0&&i&&t(),null===v)return;b(g[v+e])}else b(f)},onDrag:function({draggedDistance:e}){if(null===y)return;const t="bottom"===s||"right"===s?y-e:y+e;("bottom"===s||"right"===s)&&t<g[g.length-1]||("top"===s||"left"===s)&&t>g[g.length-1]||Ur(r.current,{transform:Wr(s)?`translate3d(0, ${t}px, 0)`:`translate3d(${t}px, 0, 0)`})},snapPointsOffset:g}}const ez=()=>()=>{};function tz(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:o}=Vm(),a=Ue.useRef(null),i=v.useMemo((()=>document.body.style.backgroundColor),[]);function s(){return(window.innerWidth-26)/window.innerWidth}Ue.useEffect((()=>{if(t&&n){a.current&&clearTimeout(a.current);const t=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!t)return;Yj(r&&!o?wx(document.body,{background:"black"}):ez,wx(t,{transformOrigin:Wr(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${zn.DURATION}s`,transitionTimingFunction:`cubic-bezier(${zn.EASE.join(",")})`}));const n=wx(t,{borderRadius:"8px",overflow:"hidden",...Wr(e)?{transform:`scale(${s()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${s()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{n(),a.current=window.setTimeout((()=>{i?document.body.style.background=i:document.body.style.removeProperty("background")}),1e3*zn.DURATION)}}}),[t,n,i])}let Gh=null;function nz({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:o,noBodyStyles:a}){const[i,s]=Ue.useState((()=>typeof window<"u"?window.location.href:"")),u=Ue.useRef(0),l=Ue.useCallback((()=>{if(OT()&&null===Gh&&e&&!a){Gh={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:e,innerHeight:t}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:-u.current+"px",left:-e+"px",right:"0px",height:"auto"}),window.setTimeout((()=>window.requestAnimationFrame((()=>{const e=t-window.innerHeight;e&&u.current>=t&&(document.body.style.top=-(u.current+e)+"px")}))),300)}}),[e]),c=Ue.useCallback((()=>{if(OT()&&null!==Gh&&!a){const e=-parseInt(document.body.style.top,10),t=-parseInt(document.body.style.left,10);Object.assign(document.body.style,Gh),window.requestAnimationFrame((()=>{o&&i!==window.location.href?s(window.location.href):window.scrollTo(t,e)})),Gh=null}}),[i]);return Ue.useEffect((()=>{function e(){u.current=window.scrollY}return e(),window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}}),[]),Ue.useEffect((()=>{n||!r||(e?(!window.matchMedia("(display-mode: standalone)").matches&&l(),t||window.setTimeout((()=>{c()}),500)):c())}),[e,r,i,t,n,l,c]),{restorePositionSetting:c}}function jD({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:o,snapPoints:a,shouldScaleBackground:i=!1,setBackgroundColorOnScale:s=!0,closeThreshold:u=Qj,scrollLockTimeout:l=Xj,dismissible:c=!0,handleOnly:d=!1,fadeFromIndex:f=a&&a.length-1,activeSnapPoint:p,setActiveSnapPoint:m,fixed:v,modal:h=!0,onClose:g,nested:y,noBodyStyles:b,direction:w="bottom",defaultOpen:x=!1,disablePreventScroll:_=!0,snapToSequentialPoint:E=!1,preventScrollRestoration:S=!1,repositionInputs:I=!0,onAnimationEnd:A,container:k,autoFocus:C=!1}){var P,R;const[O=!1,T]=BD({defaultProp:x,prop:e,onChange:e=>{null==t||t(e),!e&&!y&&ue(),setTimeout((()=>{null==A||A(e)}),1e3*zn.DURATION),e&&!h&&typeof window<"u"&&window.requestAnimationFrame((()=>{document.body.style.pointerEvents="auto"})),e||(document.body.style.pointerEvents="auto")}}),[N,M]=Ue.useState(!1),[j,D]=Ue.useState(!1),[q,z]=Ue.useState(!1),L=Ue.useRef(null),$=Ue.useRef(null),V=Ue.useRef(null),B=Ue.useRef(null),F=Ue.useRef(null),U=Ue.useRef(!1),G=Ue.useRef(null),W=Ue.useRef(0),H=Ue.useRef(!1),Q=Ue.useRef(0),K=Ue.useRef(null),Y=Ue.useRef((null==(P=K.current)?void 0:P.getBoundingClientRect().height)||0),J=Ue.useRef((null==(R=K.current)?void 0:R.getBoundingClientRect().width)||0),X=Ue.useRef(0),Z=Ue.useCallback((e=>{a&&e===oe.length-1&&($.current=new Date)}),[]),{activeSnapPoint:ee,activeSnapPointIndex:te,setActiveSnapPoint:ne,onRelease:re,snapPointsOffset:oe,onDrag:ae,shouldFade:ie,getPercentageDragged:se}=Zj({snapPoints:a,activeSnapPointProp:p,setActiveSnapPointProp:m,drawerRef:K,fadeFromIndex:f,overlayRef:L,onSnapPointChange:Z,direction:w,container:k,snapToSequentialPoint:E});Vj({isDisabled:!O||j||!h||q||!N||!I||!_});const{restorePositionSetting:ue}=nz({isOpen:O,modal:h,nested:y,hasBeenOpened:N,preventScrollRestoration:S,noBodyStyles:b});function le(){return(window.innerWidth-26)/window.innerWidth}function ce(e,t){var n,r;let o=e;const a=null==(n=window.getSelection())?void 0:n.toString(),i=K.current?Tg(K.current,w):null,s=new Date;if(o.hasAttribute("data-vaul-no-drag")||o.closest("[data-vaul-no-drag]"))return!1;if("right"===w||"left"===w)return!0;if($.current&&s.getTime()-$.current.getTime()<500)return!1;if(null!==i&&("bottom"===w?i>0:i<0))return!0;if(a&&a.length>0)return!1;if(s.getTime()-(null==(r=F.current)?void 0:r.getTime())<l&&0===i||t)return F.current=s,!1;for(;o;){if(o.scrollHeight>o.clientHeight){if(0!==o.scrollTop)return F.current=new Date,!1;if("dialog"===o.getAttribute("role"))return!0}o=o.parentNode}return!0}function de(e){!j||!K.current||(K.current.classList.remove(bx),U.current=!1,D(!1),B.current=new Date),null==g||g(),e||T(!1),setTimeout((()=>{a&&ne(a[0])}),1e3*zn.DURATION)}function fe(){if(!K.current)return;const e=document.querySelector("[data-vaul-drawer-wrapper]"),t=Tg(K.current,w);Ur(K.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${zn.DURATION}s cubic-bezier(${zn.EASE.join(",")})`}),Ur(L.current,{transition:`opacity ${zn.DURATION}s cubic-bezier(${zn.EASE.join(",")})`,opacity:"1"}),i&&t&&t>0&&O&&Ur(e,{borderRadius:"8px",overflow:"hidden",...Wr(w)?{transform:`scale(${le()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${le()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${zn.DURATION}s`,transitionTimingFunction:`cubic-bezier(${zn.EASE.join(",")})`},!0)}return Ue.useEffect((()=>{var e;function t(){if(!K.current||!I)return;if(zS(document.activeElement)||H.current){var e;const t=(null==(e=window.visualViewport)?void 0:e.height)||0,n=window.innerHeight;let r=n-t;const o=K.current.getBoundingClientRect().height||0,i=o>.8*n;X.current||(X.current=o);const s=K.current.getBoundingClientRect().top;if(Math.abs(Q.current-r)>60&&(H.current=!H.current),a&&a.length>0&&oe&&te){r+=oe[te]||0}if(Q.current=r,o>t||H.current){const e=K.current.getBoundingClientRect().height;let n=e;e>t&&(n=t-(i?s:26)),K.current.style.height=v?e-Math.max(r,0)+"px":`${Math.max(n,t-s)}px`}else K.current.style.height=`${X.current}px`;a&&a.length>0&&!H.current?K.current.style.bottom="0px":K.current.style.bottom=`${Math.max(r,0)}px`}}return null==(e=window.visualViewport)||e.addEventListener("resize",t),()=>{var e;return null==(e=window.visualViewport)?void 0:e.removeEventListener("resize",t)}}),[te,a,oe]),Ue.useEffect((()=>(O&&(Ur(document.documentElement,{scrollBehavior:"auto"}),$.current=new Date),()=>{Hj(document.documentElement,"scrollBehavior")})),[O]),Ue.createElement(Ij,{defaultOpen:x,onOpenChange:e=>{!c&&!e||(e?M(!0):de(!0),T(e))},open:O},Ue.createElement(OD.Provider,{value:{activeSnapPoint:ee,snapPoints:a,setActiveSnapPoint:ne,drawerRef:K,overlayRef:L,onOpenChange:t,onPress:function(e){var t,n;!c&&!a||K.current&&!K.current.contains(e.target)||(Y.current=(null==(t=K.current)?void 0:t.getBoundingClientRect().height)||0,J.current=(null==(n=K.current)?void 0:n.getBoundingClientRect().width)||0,D(!0),V.current=new Date,AD()&&window.addEventListener("touchend",(()=>U.current=!1),{once:!0}),e.target.setPointerCapture(e.pointerId),W.current=Wr(w)?e.pageY:e.pageX)},onRelease:function(e){if(!j||!K.current)return;K.current.classList.remove(bx),U.current=!1,D(!1),B.current=new Date;const t=Tg(K.current,w);if(!ce(e.target,!1)||!t||Number.isNaN(t)||null===V.current)return;const n=B.current.getTime()-V.current.getTime(),r=W.current-(Wr(w)?e.pageY:e.pageX),i=Math.abs(r)/n;if(i>.05&&(z(!0),setTimeout((()=>{z(!1)}),200)),a)return re({draggedDistance:r*("bottom"===w||"right"===w?1:-1),closeDrawer:de,velocity:i,dismissible:c}),void(null==o||o(e,!0));if("bottom"===w||"right"===w?r>0:r<0)return fe(),void(null==o||o(e,!0));if(i>kD)return de(),void(null==o||o(e,!1));var s;const l=Math.min(null!=(s=K.current.getBoundingClientRect().height)?s:0,window.innerHeight);var d;const f=Math.min(null!=(d=K.current.getBoundingClientRect().width)?d:0,window.innerWidth),p="left"===w||"right"===w;if(Math.abs(t)>=(p?f:l)*u)return de(),void(null==o||o(e,!1));null==o||o(e,!0),fe()},onDrag:function(e){if(K.current&&j){const t="bottom"===w||"right"===w?1:-1,n=(W.current-(Wr(w)?e.pageY:e.pageX))*t,o=n>0,s=a&&!c&&!o;if(s&&0===te)return;const u=Math.abs(n),l=document.querySelector("[data-vaul-drawer-wrapper]");let d=u/("bottom"===w||"top"===w?Y.current:J.current);const p=se(u,o);if(null!==p&&(d=p),s&&d>=1||!U.current&&!ce(e.target,o))return;if(K.current.classList.add(bx),U.current=!0,Ur(K.current,{transition:"none"}),Ur(L.current,{transition:"none"}),a&&ae({draggedDistance:n}),o&&!a){const e=Kj(n),r=Math.min(-1*e,0)*t;return void Ur(K.current,{transform:Wr(w)?`translate3d(0, ${r}px, 0)`:`translate3d(${r}px, 0, 0)`})}const m=1-d;if((ie||f&&te===f-1)&&(null==r||r(e,d),Ur(L.current,{opacity:`${m}`,transition:"none"},!0)),l&&L.current&&i){const e=Math.min(le()+d*(1-le()),1),t=8-8*d,n=Math.max(0,14-14*d);Ur(l,{borderRadius:`${t}px`,transform:Wr(w)?`scale(${e}) translate3d(0, ${n}px, 0)`:`scale(${e}) translate3d(${n}px, 0, 0)`,transition:"none"},!0)}if(!a){const e=u*t;Ur(K.current,{transform:Wr(w)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}}},dismissible:c,handleOnly:d,isOpen:O,isDragging:j,shouldFade:ie,closeDrawer:de,onNestedDrag:function(e,t){if(t<0)return;const n=(window.innerWidth-16)/window.innerWidth,r=n+t*(1-n),o=16*t-16;Ur(K.current,{transform:Wr(w)?`scale(${r}) translate3d(0, ${o}px, 0)`:`scale(${r}) translate3d(${o}px, 0, 0)`,transition:"none"})},onNestedOpenChange:function(e){const t=e?(window.innerWidth-16)/window.innerWidth:1,n=e?-16:0;G.current&&window.clearTimeout(G.current),Ur(K.current,{transition:`transform ${zn.DURATION}s cubic-bezier(${zn.EASE.join(",")})`,transform:`scale(${t}) translate3d(0, ${n}px, 0)`}),!e&&K.current&&(G.current=setTimeout((()=>{const e=Tg(K.current,w);Ur(K.current,{transition:"none",transform:Wr(w)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}),500))},onNestedRelease:function(e,t){const n=Wr(w)?window.innerHeight:window.innerWidth,r=t?(n-16)/n:1,o=t?-16:0;t&&Ur(K.current,{transition:`transform ${zn.DURATION}s cubic-bezier(${zn.EASE.join(",")})`,transform:Wr(w)?`scale(${r}) translate3d(0, ${o}px, 0)`:`scale(${r}) translate3d(${o}px, 0, 0)`})},keyboardIsOpen:H,modal:h,snapPointsOffset:oe,direction:w,shouldScaleBackground:i,setBackgroundColorOnScale:s,noBodyStyles:b,container:k,autoFocus:C}},n))}const zD=Ue.forwardRef((function({...e},t){const{overlayRef:n,snapPoints:r,onRelease:o,shouldFade:a,isOpen:i,modal:s}=Vm(),u=DD(t,n),l=r&&r.length>0;return s?Ue.createElement(Tj,{onMouseUp:o,ref:u,"data-vaul-overlay":"","data-vaul-snap-points":i&&l?"true":"false","data-vaul-snap-points-overlay":i&&a?"true":"false",...e}):(typeof window<"u"&&window.requestAnimationFrame((()=>{document.body.style.pointerEvents="auto"})),null)}));zD.displayName="Drawer.Overlay";const VD=Ue.forwardRef((function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},o){const{drawerRef:a,onPress:i,onRelease:s,onDrag:u,keyboardIsOpen:l,snapPointsOffset:c,modal:d,isOpen:f,direction:p,snapPoints:m,container:v,handleOnly:h,autoFocus:g}=Vm(),[y,b]=Ue.useState(!1),w=DD(o,a),x=Ue.useRef(null),_=Ue.useRef(null),E=Ue.useRef(!1),S=m&&m.length>0;tz();function I(e){x.current=null,E.current=!1,s(e)}return Ue.useEffect((()=>{S&&window.requestAnimationFrame((()=>{b(!0)}))}),[]),Ue.createElement(Oj,{"data-vaul-drawer-direction":p,"data-vaul-drawer":"","data-vaul-delayed-snap-points":y?"true":"false","data-vaul-snap-points":f&&S?"true":"false","data-vaul-custom-container":v?"true":"false",...r,ref:w,style:c&&c.length>0?{"--snap-point-height":`${c[0]}px`,...t}:t,onPointerDown:e=>{h||(null==r.onPointerDown||r.onPointerDown.call(r,e),x.current={x:e.pageX,y:e.pageY},i(e))},onOpenAutoFocus:e=>{null==n||n(e),g||e.preventDefault()},onPointerDownOutside:t=>{null==e||e(t),d&&!t.defaultPrevented?l.current&&(l.current=!1):t.preventDefault()},onFocusOutside:e=>{d||e.preventDefault()},onPointerMove:e=>{if(_.current=e,h||(null==r.onPointerMove||r.onPointerMove.call(r,e),!x.current))return;const t=e.pageY-x.current.y,n=e.pageX-x.current.x,o="touch"===e.pointerType?10:2;((e,t,n=0)=>{if(E.current)return!0;const r=Math.abs(e.y),o=Math.abs(e.x),a=o>r,i=["bottom","right"].includes(t)?1:-1;if("left"===t||"right"===t){if(!(e.x*i<0)&&o>=0&&o<=n)return a}else if(!(e.y*i<0)&&r>=0&&r<=n)return!a;return E.current=!0,!0})({x:n,y:t},p,o)?u(e):(Math.abs(n)>o||Math.abs(t)>o)&&(x.current=null)},onPointerUp:e=>{null==r.onPointerUp||r.onPointerUp.call(r,e),x.current=null,E.current=!1,s(e)},onPointerOut:e=>{null==r.onPointerOut||r.onPointerOut.call(r,e),I(_.current)},onContextMenu:e=>{null==r.onContextMenu||r.onContextMenu.call(r,e),I(_.current)}})}));VD.displayName="Drawer.Content";const rz=250,oz=120,UD=Ue.forwardRef((function({preventCycle:e=!1,children:t,...n},r){const{closeDrawer:o,isDragging:a,snapPoints:i,activeSnapPoint:s,setActiveSnapPoint:u,dismissible:l,handleOnly:c,isOpen:d,onPress:f,onDrag:p}=Vm(),m=Ue.useRef(null),v=Ue.useRef(!1);function h(){window.clearTimeout(m.current),v.current=!1}return Ue.createElement("div",{onClick:function(){v.current?h():window.setTimeout((()=>{!function(){if(a||e||v.current)return void h();if(h(),(!i||0===i.length)&&l)return void o();if(s===i[i.length-1]&&l)return void o();const t=i.findIndex((e=>e===s));if(-1===t)return;const n=i[t+1];u(n)}()}),oz)},onPointerCancel:h,onPointerDown:e=>{c&&f(e),m.current=window.setTimeout((()=>{v.current=!0}),rz)},onPointerMove:e=>{c&&p(e)},ref:r,"data-vaul-drawer-visible":d?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},Ue.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))}));function iz({onDrag:e,onOpenChange:t,...n}){const{onNestedDrag:r,onNestedOpenChange:o,onNestedRelease:a}=Vm();if(!r)throw new Error("Drawer.NestedRoot must be placed in another drawer");return Ue.createElement(jD,{nested:!0,onClose:()=>{o(!1)},onDrag:(t,n)=>{r(t,n),null==e||e(t,n)},onOpenChange:e=>{e&&o(e)},onRelease:a,...n})}function az(e){const t=Vm(),{container:n=t.container,...r}=e;return Ue.createElement(Pj,{container:n,...r})}UD.displayName="Drawer.Handle";const wd={Root:jD,NestedRoot:iz,Content:VD,Overlay:zD,Trigger:Rj,Portal:az,Handle:UD,Close:Dj,Title:Aj,Description:Mj},sz=wd.Portal,WD=v.forwardRef((({className:e,...t},n)=>G.jsx(wd.Overlay,{ref:n,className:_e("fixed inset-0 z-50 bg-black/5",e),...t})));WD.displayName=wd.Overlay.displayName;const uz=v.forwardRef((({className:e,children:t,direction:n="bottom",...r},o)=>G.jsxs(sz,{children:[G.jsx(WD,{}),G.jsxs(wd.Content,{ref:o,className:_e("fixed z-50 border bg-background shadow-lg","bottom"===n&&"inset-x-0 bottom-0 mt-24 flex h-auto flex-col rounded-t-sm","top"===n&&"inset-x-0 top-0 mb-24 flex h-auto flex-col rounded-b-sm","left"===n&&"inset-y-0 left-0 flex h-full flex-col","right"===n&&"inset-y-0 right-0 flex h-full w-[346px] flex-col sm:w-[435px]",e),...r,children:["bottom"===n&&G.jsx("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),t]})]})));uz.displayName="DrawerContent";const lz=v.forwardRef((({className:e,...t},n)=>G.jsx(wd.Title,{ref:n,className:_e("text-lg font-semibold leading-none tracking-tight",e),...t})));lz.displayName=wd.Title.displayName;const cz=v.forwardRef((({className:e,...t},n)=>G.jsx(wd.Description,{ref:n,className:_e("text-sm text-muted-foreground",e),...t})));function s$(e){const t=e+"CollectionProvider",[n,r]=ni(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=e+"CollectionSlot",s=e+"CollectionItemSlot",u="data-radix-collection-item";return[{Provider:e=>{const{scope:t,children:n}=e,r=Ue.useRef(null),a=Ue.useRef(new Map).current;return Ue.createElement(o,{scope:t,itemMap:a,collectionRef:r},n)},Slot:Ue.forwardRef(((e,t)=>{const{scope:n,children:r}=e,o=Vt(t,a(i,n).collectionRef);return Ue.createElement(qf,{ref:o},r)})),ItemSlot:Ue.forwardRef(((e,t)=>{const{scope:n,children:r,...o}=e,i=Ue.useRef(null),l=Vt(t,i),c=a(s,n);return Ue.useEffect((()=>(c.itemMap.set(i,{ref:i,...o}),()=>{c.itemMap.delete(i)}))),Ue.createElement(qf,{[u]:"",ref:l},r)}))},function(t){const n=a(e+"CollectionConsumer",t);return Ue.useCallback((()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${u}]`));return Array.from(n.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)))}),[n.collectionRef,n.itemMap])},r]}cz.displayName=wd.Description.displayName;const dz=v.createContext(void 0);function u$(e){const t=v.useContext(dz);return e||t||"ltr"}const fz=["top","right","bottom","left"],pd=Math.min,Xi=Math.max,Zg=Math.round,Og=Math.floor,md=e=>({x:e,y:e}),pz={left:"right",right:"left",bottom:"top",top:"bottom"},mz={start:"end",end:"start"};function US(e,t,n){return Xi(e,pd(t,n))}function Sl(e,t){return"function"==typeof e?e(t):e}function El(e){return e.split("-")[0]}function Um(e){return e.split("-")[1]}function l$(e){return"x"===e?"y":"x"}function c$(e){return"y"===e?"height":"width"}function hd(e){return["top","bottom"].includes(El(e))?"y":"x"}function d$(e){return l$(hd(e))}function hz(e,t,n){void 0===n&&(n=!1);const r=Um(e),o=d$(e),a=c$(o);let i="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=ey(i)),[i,ey(i)]}function vz(e){const t=ey(e);return[WS(e),t,WS(t)]}function WS(e){return e.replace(/start|end/g,(e=>mz[e]))}function gz(e,t,n){const r=["left","right"],o=["right","left"],a=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?a:i;default:return[]}}function yz(e,t,n,r){const o=Um(e);let a=gz(El(e),"start"===n,r);return o&&(a=a.map((e=>e+"-"+o)),t&&(a=a.concat(a.map(WS)))),a}function ey(e){return e.replace(/left|right|bottom|top/g,(e=>pz[e]))}function wz(e){return{top:0,right:0,bottom:0,left:0,...e}}function qD(e){return"number"!=typeof e?wz(e):{top:e,right:e,bottom:e,left:e}}function ty(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function DT(e,t,n){let{reference:r,floating:o}=e;const a=hd(t),i=d$(t),s=c$(i),u=El(t),l="y"===a,c=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[s]/2-o[s]/2;let p;switch(u){case"top":p={x:c,y:r.y-o.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Um(t)){case"start":p[i]-=f*(n&&l?-1:1);break;case"end":p[i]+=f*(n&&l?-1:1)}return p}const bz=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:i}=n,s=a.filter(Boolean),u=await(null==i.isRTL?void 0:i.isRTL(t));let l=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:d}=DT(l,r,u),f=r,p={},m=0;for(let n=0;n<s.length;n++){const{name:a,fn:v}=s[n],{x:h,y:g,data:y,reset:b}=await v({x:c,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:l,platform:i,elements:{reference:e,floating:t}});c=h??c,d=g??d,p={...p,[a]:{...p[a],...y}},b&&m<=50&&(m++,"object"==typeof b&&(b.placement&&(f=b.placement),b.rects&&(l=!0===b.rects?await i.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:c,y:d}=DT(l,f,u))),n=-1)}return{x:c,y:d,placement:f,strategy:o,middlewareData:p}};async function yv(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:a,rects:i,elements:s,strategy:u}=e,{boundary:l="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Sl(t,e),m=qD(p),v=s[f?"floating"===d?"reference":"floating":d],h=ty(await a.getClippingRect({element:null==(n=await(null==a.isElement?void 0:a.isElement(v)))||n?v:v.contextElement||await(null==a.getDocumentElement?void 0:a.getDocumentElement(s.floating)),boundary:l,rootBoundary:c,strategy:u})),g="floating"===d?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,y=await(null==a.getOffsetParent?void 0:a.getOffsetParent(s.floating)),b=await(null==a.isElement?void 0:a.isElement(y))&&await(null==a.getScale?void 0:a.getScale(y))||{x:1,y:1},w=ty(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:g,offsetParent:y,strategy:u}):g);return{top:(h.top-w.top+m.top)/b.y,bottom:(w.bottom-h.bottom+m.bottom)/b.y,left:(h.left-w.left+m.left)/b.x,right:(w.right-h.right+m.right)/b.x}}const _z=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:i,elements:s,middlewareData:u}=t,{element:l,padding:c=0}=Sl(e,t)||{};if(null==l)return{};const d=qD(c),f={x:n,y:r},p=d$(o),m=c$(p),v=await i.getDimensions(l),h="y"===p,g=h?"top":"left",y=h?"bottom":"right",b=h?"clientHeight":"clientWidth",w=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],_=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l));let E=_?_[b]:0;(!E||!await(null==i.isElement?void 0:i.isElement(_)))&&(E=s.floating[b]||a.floating[m]);const S=w/2-x/2,I=E/2-v[m]/2-1,A=pd(d[g],I),k=pd(d[y],I),C=A,P=E-v[m]-k,R=E/2-v[m]/2+S,O=US(C,R,P),T=!u.arrow&&null!=Um(o)&&R!==O&&a.reference[m]/2-(R<C?A:k)-v[m]/2<0,N=T?R<C?R-C:R-P:0;return{[p]:f[p]+N,data:{[p]:O,centerOffset:R-O-N,...T&&{alignmentOffset:N}},reset:T}}}),xz=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:i,initialPlacement:s,platform:u,elements:l}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:v=!0,...h}=Sl(e,t);if(null!=(n=a.arrow)&&n.alignmentOffset)return{};const g=El(o),y=hd(s),b=El(s)===s,w=await(null==u.isRTL?void 0:u.isRTL(l.floating)),x=f||(b||!v?[ey(s)]:vz(s)),_="none"!==m;!f&&_&&x.push(...yz(s,v,m,w));const E=[s,...x],S=await yv(t,h),I=[];let A=(null==(r=a.flip)?void 0:r.overflows)||[];if(c&&I.push(S[g]),d){const e=hz(o,i,w);I.push(S[e[0]],S[e[1]])}if(A=[...A,{placement:o,overflows:I}],!I.every((e=>e<=0))){var k,C;const e=((null==(k=a.flip)?void 0:k.index)||0)+1,t=E[e];if(t)return{data:{index:e,overflows:A},reset:{placement:t}};let n=null==(C=A.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:C.placement;if(!n)switch(p){case"bestFit":{var P;const e=null==(P=A.filter((e=>{if(_){const t=hd(e.placement);return t===y||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:P[0];e&&(n=e);break}case"initialPlacement":n=s}if(o!==n)return{reset:{placement:n}}}return{}}}};function NT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function kT(e){return fz.some((t=>e[t]>=0))}const Sz=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Sl(e,t);switch(r){case"referenceHidden":{const e=NT(await yv(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:kT(e)}}}case"escaped":{const e=NT(await yv(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:kT(e)}}}default:return{}}}}};async function Ez(e,t){const{placement:n,platform:r,elements:o}=e,a=await(null==r.isRTL?void 0:r.isRTL(o.floating)),i=El(n),s=Um(n),u="y"===hd(n),l=["left","top"].includes(i)?-1:1,c=a&&u?-1:1,d=Sl(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof m&&(p="end"===s?-1*m:m),u?{x:p*c,y:f*l}:{x:f*l,y:p*c}}const $z=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:i,middlewareData:s}=t,u=await Ez(t,e);return i===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:o+u.x,y:a+u.y,data:{...u,placement:i}}}}},Cz=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...u}=Sl(e,t),l={x:n,y:r},c=await yv(t,u),d=hd(El(o)),f=l$(d);let p=l[f],m=l[d];if(a){const e="y"===f?"bottom":"right";p=US(p+c["y"===f?"top":"left"],p,p-c[e])}if(i){const e="y"===d?"bottom":"right";m=US(m+c["y"===d?"top":"left"],m,m-c[e])}const v=s.fn({...t,[f]:p,[d]:m});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[f]:a,[d]:i}}}}}},Iz=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:i}=t,{offset:s=0,mainAxis:u=!0,crossAxis:l=!0}=Sl(e,t),c={x:n,y:r},d=hd(o),f=l$(d);let p=c[f],m=c[d];const v=Sl(s,t),h="number"==typeof v?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(u){const e="y"===f?"height":"width",t=a.reference[f]-a.floating[e]+h.mainAxis,n=a.reference[f]+a.reference[e]-h.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){var g,y;const e="y"===f?"width":"height",t=["top","left"].includes(El(o)),n=a.reference[d]-a.floating[e]+(t&&(null==(g=i.offset)?void 0:g[d])||0)+(t?0:h.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:(null==(y=i.offset)?void 0:y[d])||0)-(t?h.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Rz=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:i,elements:s}=t,{apply:u=()=>{},...l}=Sl(e,t),c=await yv(t,l),d=El(o),f=Um(o),p="y"===hd(o),{width:m,height:v}=a.floating;let h,g;"top"===d||"bottom"===d?(h=d,g=f===(await(null==i.isRTL?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(g=d,h="end"===f?"top":"bottom");const y=v-c.top-c.bottom,b=m-c.left-c.right,w=pd(v-c[h],y),x=pd(m-c[g],b),_=!t.middlewareData.shift;let E=w,S=x;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(S=b),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(E=y),_&&!f){const e=Xi(c.left,0),t=Xi(c.right,0),n=Xi(c.top,0),r=Xi(c.bottom,0);p?S=m-2*(0!==e||0!==t?e+t:Xi(c.left,c.right)):E=v-2*(0!==n||0!==r?n+r:Xi(c.top,c.bottom))}await u({...t,availableWidth:S,availableHeight:E});const I=await i.getDimensions(s.floating);return m!==I.width||v!==I.height?{reset:{rects:!0}}:{}}}};function zy(){return typeof window<"u"}function vd(e){return GD(e)?(e.nodeName||"").toLowerCase():"#document"}function Ji(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Rl(e){var t;return null==(t=(GD(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function GD(e){return!!zy()&&(e instanceof Node||e instanceof Ji(e).Node)}function pu(e){return!!zy()&&(e instanceof Element||e instanceof Ji(e).Element)}function mu(e){return!!zy()&&(e instanceof HTMLElement||e instanceof Ji(e).HTMLElement)}function LT(e){return!(!zy()||typeof ShadowRoot>"u")&&(e instanceof ShadowRoot||e instanceof Ji(e).ShadowRoot)}function Fv(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Na(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Pz(e){return["table","td","th"].includes(vd(e))}function Tz(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch{return!1}}))}function f$(e){const t=p$(),n=pu(e)?Na(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function HD(e){let t=Nm(e);for(;mu(t)&&!Vy(t);){if(f$(t))return t;if(Tz(t))return null;t=Nm(t)}return null}function p$(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Vy(e){return["html","body","#document"].includes(vd(e))}function Na(e){return Ji(e).getComputedStyle(e)}function Uy(e){return pu(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Nm(e){if("html"===vd(e))return e;const t=e.assignedSlot||e.parentNode||LT(e)&&e.host||Rl(e);return LT(t)?t.host:t}function KD(e){const t=Nm(e);return Vy(t)?e.ownerDocument?e.ownerDocument.body:e.body:mu(t)&&Fv(t)?t:KD(t)}function wv(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=KD(e),a=o===(null==(r=e.ownerDocument)?void 0:r.body),i=Ji(o);if(a){const e=Oz(i);return t.concat(i,i.visualViewport||[],Fv(o)?o:[],e&&n?wv(e):[])}return t.concat(o,wv(o,[],n))}function Oz(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function YD(e){const t=Na(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=mu(e),a=o?e.offsetWidth:n,i=o?e.offsetHeight:r,s=Zg(n)!==a||Zg(r)!==i;return s&&(n=a,r=i),{width:n,height:r,$:s}}function m$(e){return pu(e)?e:e.contextElement}function Pm(e){const t=m$(e);if(!mu(t))return md(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=YD(t);let i=(a?Zg(n.width):n.width)/r,s=(a?Zg(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}const Az=md(0);function QD(e){const t=Ji(e);return p$()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Az}function Mz(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Ji(e))&&t}function Xf(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),a=m$(e);let i=md(1);t&&(r?pu(r)&&(i=Pm(r)):i=Pm(e));const s=Mz(a,n,r)?QD(a):md(0);let u=(o.left+s.x)/i.x,l=(o.top+s.y)/i.y,c=o.width/i.x,d=o.height/i.y;if(a){const e=Ji(a),t=r&&pu(r)?Ji(r):r;let n=e.frameElement;for(;n&&r&&t!==e;){const e=Pm(n),t=n.getBoundingClientRect(),r=Na(n),o=t.left+(n.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(n.clientTop+parseFloat(r.paddingTop))*e.y;u*=e.x,l*=e.y,c*=e.x,d*=e.y,u+=o,l+=a,n=Ji(n).frameElement}}return ty({width:c,height:d,x:u,y:l})}const Dz=[":popover-open",":modal"];function XD(e){let t=!1,n=0,r=0;if(Dz.forEach((n=>{!function(n){try{t=t||e.matches(n)}catch{}}(n)})),t){const t=HD(e);if(t){const e=t.getBoundingClientRect();n=e.x,r=e.y}}return[t,n,r]}function Nz(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=Rl(r),[i]=t?XD(t.floating):[!1];if(r===a||i)return n;let s={scrollLeft:0,scrollTop:0},u=md(1);const l=md(0),c=mu(r);if((c||!c&&"fixed"!==o)&&(("body"!==vd(r)||Fv(a))&&(s=Uy(r)),mu(r))){const e=Xf(r);u=Pm(r),l.x=e.x+r.clientLeft,l.y=e.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-s.scrollLeft*u.x+l.x,y:n.y*u.y-s.scrollTop*u.y+l.y}}function kz(e){return Array.from(e.getClientRects())}function JD(e){return Xf(Rl(e)).left+Uy(e).scrollLeft}function Lz(e){const t=Rl(e),n=Uy(e),r=e.ownerDocument.body,o=Xi(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Xi(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+JD(e);const s=-n.scrollTop;return"rtl"===Na(r).direction&&(i+=Xi(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:i,y:s}}function Fz(e,t){const n=Ji(e),r=Rl(e),o=n.visualViewport;let a=r.clientWidth,i=r.clientHeight,s=0,u=0;if(o){a=o.width,i=o.height;const e=p$();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,u=o.offsetTop)}return{width:a,height:i,x:s,y:u}}function Bz(e,t){const n=Xf(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=mu(e)?Pm(e):md(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:o*a.x,y:r*a.y}}function FT(e,t,n){let r;if("viewport"===t)r=Fz(e,n);else if("document"===t)r=Lz(Rl(e));else if(pu(t))r=Bz(t,n);else{const n=QD(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return ty(r)}function ZD(e,t){const n=Nm(e);return!(n===t||!pu(n)||Vy(n))&&("fixed"===Na(n).position||ZD(n,t))}function jz(e,t){const n=t.get(e);if(n)return n;let r=wv(e,[],!1).filter((e=>pu(e)&&"body"!==vd(e))),o=null;const a="fixed"===Na(e).position;let i=a?Nm(e):e;for(;pu(i)&&!Vy(i);){const t=Na(i),n=f$(i);!n&&"fixed"===t.position&&(o=null),(a?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||Fv(i)&&!n&&ZD(e,i))?r=r.filter((e=>e!==i)):o=t,i=Nm(i)}return t.set(e,r),r}function zz(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[..."clippingAncestors"===n?jz(t,this._c):[].concat(n),r],i=a[0],s=a.reduce(((e,n)=>{const r=FT(t,n,o);return e.top=Xi(r.top,e.top),e.right=pd(r.right,e.right),e.bottom=pd(r.bottom,e.bottom),e.left=Xi(r.left,e.left),e}),FT(t,i,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function Vz(e){const{width:t,height:n}=YD(e);return{width:t,height:n}}function Uz(e,t,n,r){const o=mu(t),a=Rl(t),i="fixed"===n,s=Xf(e,!0,i,t);let u={scrollLeft:0,scrollTop:0};const l=md(0);if(o||!o&&!i)if(("body"!==vd(t)||Fv(a))&&(u=Uy(t)),o){const e=Xf(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else a&&(l.x=JD(a));let c=s.left+u.scrollLeft-l.x,d=s.top+u.scrollTop-l.y;const[f,p,m]=XD(r);return f&&(c+=p,d+=m,o&&(c+=t.clientLeft,d+=t.clientTop)),{x:c,y:d,width:s.width,height:s.height}}function BT(e,t){return mu(e)&&"fixed"!==Na(e).position?t?t(e):e.offsetParent:null}function eN(e,t){const n=Ji(e);if(!mu(e))return n;let r=BT(e,t);for(;r&&Pz(r)&&"static"===Na(r).position;)r=BT(r,t);return r&&("html"===vd(r)||"body"===vd(r)&&"static"===Na(r).position&&!f$(r))?n:r||HD(e)||n}const Wz=async function(e){const t=this.getOffsetParent||eN,n=this.getDimensions;return{reference:Uz(e.reference,await t(e.floating),e.strategy,e.floating),floating:{x:0,y:0,...await n(e.floating)}}};function qz(e){return"rtl"===Na(e).direction}const Gz={convertOffsetParentRelativeRectToViewportRelativeRect:Nz,getDocumentElement:Rl,getClippingRect:zz,getOffsetParent:eN,getElementRects:Wz,getClientRects:kz,getDimensions:Vz,getScale:Pm,isElement:pu,isRTL:qz};function Hz(e,t){let n,r=null;const o=Rl(e);function a(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function i(s,u){void 0===s&&(s=!1),void 0===u&&(u=1),a();const{left:l,top:c,width:d,height:f}=e.getBoundingClientRect();if(s||t(),!d||!f)return;const p={rootMargin:-Og(c)+"px "+-Og(o.clientWidth-(l+d))+"px "+-Og(o.clientHeight-(c+f))+"px "+-Og(l)+"px",threshold:Xi(0,pd(1,u))||1};let m=!0;function v(e){const t=e[0].intersectionRatio;if(t!==u){if(!m)return i();t?i(!1,t):n=setTimeout((()=>{i(!1,1e-7)}),100)}m=!1}try{r=new IntersectionObserver(v,{...p,root:o.ownerDocument})}catch{r=new IntersectionObserver(v,p)}r.observe(e)}(!0),a}function Kz(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:u=!1}=r,l=m$(e),c=o||a?[...l?wv(l):[],...wv(t)]:[];c.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),a&&e.addEventListener("resize",n)}));const d=l&&s?Hz(l,n):null;let f=-1,p=null;i&&(p=new ResizeObserver((e=>{let[r]=e;r&&r.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame((()=>{var e;null==(e=p)||e.observe(t)}))),n()})),l&&!u&&p.observe(l),p.observe(t));let m,v=u?Xf(e):null;return u&&function t(){const r=Xf(e);v&&(r.x!==v.x||r.y!==v.y||r.width!==v.width||r.height!==v.height)&&n(),v=r,m=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach((e=>{o&&e.removeEventListener("scroll",n),a&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=p)||e.disconnect(),p=null,u&&cancelAnimationFrame(m)}}const Yz=Cz,Qz=xz,Xz=Rz,Jz=Sz,jT=_z,Zz=Iz,eV=(e,t,n)=>{const r=new Map,o={platform:Gz,...n},a={...o.platform,_c:r};return bz(e,t,{...o,platform:a})};var Vg=typeof document<"u"?v.useLayoutEffect:v.useEffect;function ny(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!ny(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||ny(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function tN(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function zT(e,t){const n=tN(e);return Math.round(t*n)/n}function _x(e){const t=v.useRef(e);return Vg((()=>{t.current=e})),t}function tV(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:i}={},transform:s=!0,whileElementsMounted:u,open:l}=e,[c,d]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=v.useState(r);ny(f,r)||p(r);const[m,h]=v.useState(null),[g,y]=v.useState(null),b=v.useCallback((e=>{e!==E.current&&(E.current=e,h(e))}),[]),w=v.useCallback((e=>{e!==S.current&&(S.current=e,y(e))}),[]),x=a||m,_=i||g,E=v.useRef(null),S=v.useRef(null),I=v.useRef(c),A=null!=u,k=_x(u),C=_x(o),P=_x(l),R=v.useCallback((()=>{if(!E.current||!S.current)return;const e={placement:t,strategy:n,middleware:f};C.current&&(e.platform=C.current),eV(E.current,S.current,e).then((e=>{const t={...e,isPositioned:!1!==P.current};O.current&&!ny(I.current,t)&&(I.current=t,vu.flushSync((()=>{d(t)})))}))}),[f,t,n,C,P]);Vg((()=>{!1===l&&I.current.isPositioned&&(I.current.isPositioned=!1,d((e=>({...e,isPositioned:!1}))))}),[l]);const O=v.useRef(!1);Vg((()=>(O.current=!0,()=>{O.current=!1})),[]),Vg((()=>{if(x&&(E.current=x),_&&(S.current=_),x&&_){if(k.current)return k.current(x,_,R);R()}}),[x,_,R,k,A]);const T=v.useMemo((()=>({reference:E,floating:S,setReference:b,setFloating:w})),[b,w]),N=v.useMemo((()=>({reference:x,floating:_})),[x,_]),M=v.useMemo((()=>{const e={position:n,left:0,top:0};if(!N.floating)return e;const t=zT(N.floating,c.x),r=zT(N.floating,c.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...tN(N.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,s,N.floating,c.x,c.y]);return v.useMemo((()=>({...c,update:R,refs:T,elements:N,floatingStyles:M})),[c,R,T,N,M])}const nV=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&function(e){return{}.hasOwnProperty.call(e,"current")}(n)?null!=n.current?jT({element:n.current,padding:r}).fn(t):{}:n?jT({element:n,padding:r}).fn(t):{}}}),rV=(e,t)=>({...$z(e),options:[e,t]}),oV=(e,t)=>({...Yz(e),options:[e,t]}),iV=(e,t)=>({...Zz(e),options:[e,t]}),aV=(e,t)=>({...Qz(e),options:[e,t]}),sV=(e,t)=>({...Xz(e),options:[e,t]}),uV=(e,t)=>({...Jz(e),options:[e,t]}),lV=(e,t)=>({...nV(e),options:[e,t]}),cV=v.forwardRef(((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return v.createElement(lt.svg,Pe({},a,{ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?n:v.createElement("polygon",{points:"0,0 30,0 15,10"}))})),dV=cV,nN="Popper",[rN,Wm]=ni(nN),[fV,oN]=rN(nN),pV=e=>{const{__scopePopper:t,children:n}=e,[r,o]=v.useState(null);return v.createElement(fV,{scope:t,anchor:r,onAnchorChange:o},n)},mV="PopperAnchor",hV=v.forwardRef(((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=oN(mV,n),i=v.useRef(null),s=Vt(t,i);return v.useEffect((()=>{a.onAnchorChange((null==r?void 0:r.current)||i.current)})),r?null:v.createElement(lt.div,Pe({},o,{ref:s}))})),iN="PopperContent",[vV,gV]=rN(iN),yV=v.forwardRef(((e,t)=>{var n,r,o,a,i,s,u,l;const{__scopePopper:c,side:d="bottom",sideOffset:f=0,align:p="center",alignOffset:m=0,arrowPadding:h=0,avoidCollisions:g=!0,collisionBoundary:y=[],collisionPadding:b=0,sticky:w="partial",hideWhenDetached:x=!1,updatePositionStrategy:_="optimized",onPlaced:E,...S}=e,I=oN(iN,c),[A,k]=v.useState(null),C=Vt(t,(e=>k(e))),[P,R]=v.useState(null),O=Ly(P),T=null!==(n=null==O?void 0:O.width)&&void 0!==n?n:0,N=null!==(r=null==O?void 0:O.height)&&void 0!==r?r:0,M=d+("center"!==p?"-"+p:""),j="number"==typeof b?b:{top:0,right:0,bottom:0,left:0,...b},D=Array.isArray(y)?y:[y],q=D.length>0,z={padding:j,boundary:D.filter(xV),altBoundary:q},{refs:L,floatingStyles:$,placement:V,isPositioned:B,middlewareData:F}=tV({strategy:"fixed",placement:M,whileElementsMounted:(...e)=>Kz(...e,{animationFrame:"always"===_}),elements:{reference:I.anchor},middleware:[rV({mainAxis:f+N,alignmentAxis:m}),g&&oV({mainAxis:!0,crossAxis:!1,limiter:"partial"===w?iV():void 0,...z}),g&&aV({...z}),sV({...z,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:o,height:a}=t.reference,i=e.floating.style;i.setProperty("--radix-popper-available-width",`${n}px`),i.setProperty("--radix-popper-available-height",`${r}px`),i.setProperty("--radix-popper-anchor-width",`${o}px`),i.setProperty("--radix-popper-anchor-height",`${a}px`)}}),P&&lV({element:P,padding:h}),SV({arrowWidth:T,arrowHeight:N}),x&&uV({strategy:"referenceHidden",...z})]}),[U,G]=aN(V),W=ws(E);Vo((()=>{B&&(null==W||W())}),[B,W]);const H=null===(o=F.arrow)||void 0===o?void 0:o.x,Q=null===(a=F.arrow)||void 0===a?void 0:a.y,K=0!==(null===(i=F.arrow)||void 0===i?void 0:i.centerOffset),[Y,J]=v.useState();return Vo((()=>{A&&J(window.getComputedStyle(A).zIndex)}),[A]),v.createElement("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:B?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Y,"--radix-popper-transform-origin":[null===(s=F.transformOrigin)||void 0===s?void 0:s.x,null===(u=F.transformOrigin)||void 0===u?void 0:u.y].join(" ")},dir:e.dir},v.createElement(vV,{scope:c,placedSide:U,onArrowChange:R,arrowX:H,arrowY:Q,shouldHideArrow:K},v.createElement(lt.div,Pe({"data-side":U,"data-align":G},S,{ref:C,style:{...S.style,animation:B?void 0:"none",opacity:null!==(l=F.hide)&&void 0!==l&&l.referenceHidden?0:void 0}}))))})),wV="PopperArrow",bV={top:"bottom",right:"left",bottom:"top",left:"right"},_V=v.forwardRef((function(e,t){const{__scopePopper:n,...r}=e,o=gV(wV,n),a=bV[o.placedSide];return v.createElement("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0}},v.createElement(dV,Pe({},r,{ref:t,style:{...r.style,display:"block"}})))}));function xV(e){return null!==e}const SV=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,a,i;const{placement:s,rects:u,middlewareData:l}=t,c=0!==(null===(n=l.arrow)||void 0===n?void 0:n.centerOffset),d=c?0:e.arrowWidth,f=c?0:e.arrowHeight,[p,m]=aN(s),v={start:"0%",center:"50%",end:"100%"}[m],h=(null!==(r=null===(o=l.arrow)||void 0===o?void 0:o.x)&&void 0!==r?r:0)+d/2,g=(null!==(a=null===(i=l.arrow)||void 0===i?void 0:i.y)&&void 0!==a?a:0)+f/2;let y="",b="";return"bottom"===p?(y=c?v:`${h}px`,b=-f+"px"):"top"===p?(y=c?v:`${h}px`,b=`${u.floating.height+f}px`):"right"===p?(y=-f+"px",b=c?v:`${g}px`):"left"===p&&(y=`${u.floating.width+f}px`,b=c?v:`${g}px`),{data:{x:y,y:b}}}});function aN(e){const[t,n="center"]=e.split("-");return[t,n]}const sN=pV,h$=hV,v$=yV,EV=_V,xx="rovingFocusGroup.onEntryFocus",$V={bubbles:!1,cancelable:!0},g$="RovingFocusGroup",[qS,uN,CV]=s$(g$),[IV,qm]=ni(g$,[CV]),[RV,PV]=IV(g$),TV=v.forwardRef(((e,t)=>v.createElement(qS.Provider,{scope:e.__scopeRovingFocusGroup},v.createElement(qS.Slot,{scope:e.__scopeRovingFocusGroup},v.createElement(OV,Pe({},e,{ref:t})))))),OV=v.forwardRef(((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:u,onEntryFocus:l,...c}=e,d=v.useRef(null),f=Vt(t,d),p=u$(a),[m=null,h]=fd({prop:i,defaultProp:s,onChange:u}),[g,y]=v.useState(!1),b=ws(l),w=uN(n),x=v.useRef(!1),[_,E]=v.useState(0);return v.useEffect((()=>{const e=d.current;if(e)return e.addEventListener(xx,b),()=>e.removeEventListener(xx,b)}),[b]),v.createElement(RV,{scope:n,orientation:r,dir:p,loop:o,currentTabStopId:m,onItemFocus:v.useCallback((e=>h(e)),[h]),onItemShiftTab:v.useCallback((()=>y(!0)),[]),onFocusableItemAdd:v.useCallback((()=>E((e=>e+1))),[]),onFocusableItemRemove:v.useCallback((()=>E((e=>e-1))),[])},v.createElement(lt.div,Pe({tabIndex:g||0===_?-1:0,"data-orientation":r},c,{ref:f,style:{outline:"none",...e.style},onMouseDown:et(e.onMouseDown,(()=>{x.current=!0})),onFocus:et(e.onFocus,(e=>{const t=!x.current;if(e.target===e.currentTarget&&t&&!g){const t=new CustomEvent(xx,$V);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=w().filter((e=>e.focusable));lN([e.find((e=>e.active)),e.find((e=>e.id===m)),...e].filter(Boolean).map((e=>e.ref.current)))}}x.current=!1})),onBlur:et(e.onBlur,(()=>y(!1)))})))})),AV="RovingFocusGroupItem",MV=v.forwardRef(((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,...i}=e,s=ad(),u=a||s,l=PV(AV,n),c=l.currentTabStopId===u,d=uN(n),{onFocusableItemAdd:f,onFocusableItemRemove:p}=l;return v.useEffect((()=>{if(r)return f(),()=>p()}),[r,f,p]),v.createElement(qS.ItemSlot,{scope:n,id:u,focusable:r,active:o},v.createElement(lt.span,Pe({tabIndex:c?0:-1,"data-orientation":l.orientation},i,{ref:t,onMouseDown:et(e.onMouseDown,(e=>{r?l.onItemFocus(u):e.preventDefault()})),onFocus:et(e.onFocus,(()=>l.onItemFocus(u))),onKeyDown:et(e.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void l.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=kV(e,l.orientation,l.dir);if(void 0!==t){e.preventDefault();let n=d().filter((e=>e.focusable)).map((e=>e.ref.current));if("last"===t)n.reverse();else if("prev"===t||"next"===t){"prev"===t&&n.reverse();const r=n.indexOf(e.currentTarget);n=l.loop?LV(n,r+1):n.slice(r+1)}setTimeout((()=>lN(n)))}}))})))})),DV={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function NV(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}function kV(e,t,n){const r=NV(e.key,n);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)))return DV[r]}function lN(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function LV(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}const y$=TV,w$=MV,GS=["Enter"," "],FV=["ArrowDown","PageUp","Home"],cN=["ArrowUp","PageDown","End"],BV=[...FV,...cN],jV={ltr:[...GS,"ArrowRight"],rtl:[...GS,"ArrowLeft"]},zV={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Wy="Menu",[bv,VV,UV]=s$(Wy),[tp,dN]=ni(Wy,[UV,Wm,qm]),fN=Wm(),pN=qm(),[rZ,np]=tp(Wy),[oZ,Bv]=tp(Wy),WV=v.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e,o=fN(n);return v.createElement(h$,Pe({},o,r,{ref:t}))})),mN="MenuPortal",[qV,hN]=tp(mN,{forceMount:void 0}),GV=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=np(mN,t);return v.createElement(qV,{scope:t,forceMount:n},v.createElement(ea,{present:n||a.open},v.createElement(by,{asChild:!0,container:o},r)))},vs="MenuContent",[HV,b$]=tp(vs),KV=v.forwardRef(((e,t)=>{const n=hN(vs,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=np(vs,e.__scopeMenu),i=Bv(vs,e.__scopeMenu);return v.createElement(bv.Provider,{scope:e.__scopeMenu},v.createElement(ea,{present:r||a.open},v.createElement(bv.Slot,{scope:e.__scopeMenu},i.modal?v.createElement(YV,Pe({},o,{ref:t})):v.createElement(QV,Pe({},o,{ref:t})))))})),YV=v.forwardRef(((e,t)=>{const n=np(vs,e.__scopeMenu),r=v.useRef(null),o=Vt(t,r);return v.useEffect((()=>{const e=r.current;if(e)return Sy(e)}),[]),v.createElement(_$,Pe({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:et(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))})),QV=v.forwardRef(((e,t)=>{const n=np(vs,e.__scopeMenu);return v.createElement(_$,Pe({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))})),_$=v.forwardRef(((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:s,onEntryFocus:u,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...h}=e,g=np(vs,n),y=Bv(vs,n),b=fN(n),w=pN(n),x=VV(n),[_,E]=v.useState(null),S=v.useRef(null),I=Vt(t,S,g.onContentChange),A=v.useRef(0),k=v.useRef(""),C=v.useRef(0),P=v.useRef(null),R=v.useRef("right"),O=v.useRef(0),T=m?xy:v.Fragment,N=m?{as:qf,allowPinchZoom:!0}:void 0;v.useEffect((()=>()=>window.clearTimeout(A.current)),[]),EE();const M=v.useCallback((e=>{var t,n;return R.current===(null===(t=P.current)||void 0===t?void 0:t.side)&&mU(e,null===(n=P.current)||void 0===n?void 0:n.area)}),[]);return v.createElement(HV,{scope:n,searchRef:k,onItemEnter:v.useCallback((e=>{M(e)&&e.preventDefault()}),[M]),onItemLeave:v.useCallback((e=>{var t;M(e)||(null===(t=S.current)||void 0===t||t.focus(),E(null))}),[M]),onTriggerLeave:v.useCallback((e=>{M(e)&&e.preventDefault()}),[M]),pointerGraceTimerRef:C,onPointerGraceIntentChange:v.useCallback((e=>{P.current=e}),[])},v.createElement(T,N,v.createElement(SE,{asChild:!0,trapped:o,onMountAutoFocus:et(a,(e=>{var t;e.preventDefault(),null===(t=S.current)||void 0===t||t.focus()})),onUnmountAutoFocus:i},v.createElement(wy,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:p},v.createElement(y$,Pe({asChild:!0},w,{dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:_,onCurrentTabStopIdChange:E,onEntryFocus:et(u,(e=>{y.isUsingKeyboardRef.current||e.preventDefault()}))}),v.createElement(v$,Pe({role:"menu","aria-orientation":"vertical","data-state":bN(g.open),"data-radix-menu-content":"",dir:y.dir},b,h,{ref:I,style:{outline:"none",...h.style},onKeyDown:et(h.onKeyDown,(e=>{const t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=1===e.key.length;t&&("Tab"===e.key&&e.preventDefault(),!n&&r&&(e=>{var t,n;const r=k.current+e,o=x().filter((e=>!e.disabled)),a=document.activeElement,i=null===(t=o.find((e=>e.ref.current===a)))||void 0===t?void 0:t.textValue,s=fU(o.map((e=>e.textValue)),r,i),u=null===(n=o.find((e=>e.textValue===s)))||void 0===n?void 0:n.ref.current;(function e(t){k.current=t,window.clearTimeout(A.current),""!==t&&(A.current=window.setTimeout((()=>e("")),1e3))})(r),u&&setTimeout((()=>u.focus()))})(e.key));const o=S.current;if(e.target!==o||!BV.includes(e.key))return;e.preventDefault();const a=x().filter((e=>!e.disabled)).map((e=>e.ref.current));cN.includes(e.key)&&a.reverse(),cU(a)})),onBlur:et(e.onBlur,(e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(A.current),k.current="")})),onPointerMove:et(e.onPointerMove,_v((e=>{const t=e.target,n=O.current!==e.clientX;if(e.currentTarget.contains(t)&&n){const t=e.clientX>O.current?"right":"left";R.current=t,O.current=e.clientX}})))})))))))})),XV=v.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e;return v.createElement(lt.div,Pe({},r,{ref:t}))})),HS="MenuItem",VT="menu.itemSelect",x$=v.forwardRef(((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,a=v.useRef(null),i=Bv(HS,e.__scopeMenu),s=b$(HS,e.__scopeMenu),u=Vt(t,a),l=v.useRef(!1);return v.createElement(vN,Pe({},o,{ref:u,disabled:n,onClick:et(e.onClick,(()=>{const e=a.current;if(!n&&e){const t=new CustomEvent(VT,{bubbles:!0,cancelable:!0});e.addEventListener(VT,(e=>null==r?void 0:r(e)),{once:!0}),vA(e,t),t.defaultPrevented?l.current=!1:i.onClose()}})),onPointerDown:t=>{var n;null===(n=e.onPointerDown)||void 0===n||n.call(e,t),l.current=!0},onPointerUp:et(e.onPointerUp,(e=>{var t;l.current||null===(t=e.currentTarget)||void 0===t||t.click()})),onKeyDown:et(e.onKeyDown,(e=>{const t=""!==s.searchRef.current;n||t&&" "===e.key||GS.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())}))}))})),vN=v.forwardRef(((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,i=b$(HS,n),s=pN(n),u=v.useRef(null),l=Vt(t,u),[c,d]=v.useState(!1),[f,p]=v.useState("");return v.useEffect((()=>{const e=u.current;var t;e&&p((null!==(t=e.textContent)&&void 0!==t?t:"").trim())}),[a.children]),v.createElement(bv.ItemSlot,{scope:n,disabled:r,textValue:o??f},v.createElement(w$,Pe({asChild:!0},s,{focusable:!r}),v.createElement(lt.div,Pe({role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},a,{ref:l,onPointerMove:et(e.onPointerMove,_v((e=>{r?i.onItemLeave(e):(i.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus())}))),onPointerLeave:et(e.onPointerLeave,_v((e=>i.onItemLeave(e)))),onFocus:et(e.onFocus,(()=>d(!0))),onBlur:et(e.onBlur,(()=>d(!1)))}))))})),JV=v.forwardRef(((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return v.createElement(yN,{scope:e.__scopeMenu,checked:n},v.createElement(x$,Pe({role:"menuitemcheckbox","aria-checked":ry(n)?"mixed":n},o,{ref:t,"data-state":S$(n),onSelect:et(o.onSelect,(()=>null==r?void 0:r(!!ry(n)||!n)),{checkForDefaultPrevented:!1})})))})),ZV="MenuRadioGroup",[iZ,eU]=tp(ZV,{value:void 0,onValueChange:()=>{}}),tU="MenuRadioItem",nU=v.forwardRef(((e,t)=>{const{value:n,...r}=e,o=eU(tU,e.__scopeMenu),a=n===o.value;return v.createElement(yN,{scope:e.__scopeMenu,checked:a},v.createElement(x$,Pe({role:"menuitemradio","aria-checked":a},r,{ref:t,"data-state":S$(a),onSelect:et(r.onSelect,(()=>{var e;return null===(e=o.onValueChange)||void 0===e?void 0:e.call(o,n)}),{checkForDefaultPrevented:!1})})))})),gN="MenuItemIndicator",[yN,rU]=tp(gN,{checked:!1}),oU=v.forwardRef(((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=rU(gN,n);return v.createElement(ea,{present:r||ry(a.checked)||!0===a.checked},v.createElement(lt.span,Pe({},o,{ref:t,"data-state":S$(a.checked)})))})),iU=v.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e;return v.createElement(lt.div,Pe({role:"separator","aria-orientation":"horizontal"},r,{ref:t}))})),aU="MenuSub",[aZ,wN]=tp(aU),Ag="MenuSubTrigger",sU=v.forwardRef(((e,t)=>{const n=np(Ag,e.__scopeMenu),r=Bv(Ag,e.__scopeMenu),o=wN(Ag,e.__scopeMenu),a=b$(Ag,e.__scopeMenu),i=v.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:u}=a,l={__scopeMenu:e.__scopeMenu},c=v.useCallback((()=>{i.current&&window.clearTimeout(i.current),i.current=null}),[]);return v.useEffect((()=>c),[c]),v.useEffect((()=>{const e=s.current;return()=>{window.clearTimeout(e),u(null)}}),[s,u]),v.createElement(WV,Pe({asChild:!0},l),v.createElement(vN,Pe({id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":bN(n.open)},e,{ref:_E(t,o.onTriggerChange),onClick:t=>{var r;null===(r=e.onClick)||void 0===r||r.call(e,t),!e.disabled&&!t.defaultPrevented&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:et(e.onPointerMove,_v((t=>{a.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(a.onPointerGraceIntentChange(null),i.current=window.setTimeout((()=>{n.onOpenChange(!0),c()}),100))}))),onPointerLeave:et(e.onPointerLeave,_v((e=>{var t;c();const r=null===(t=n.content)||void 0===t?void 0:t.getBoundingClientRect();if(r){var o;const t=null===(o=n.content)||void 0===o?void 0:o.dataset.side,i="right"===t,u=i?-5:5,l=r[i?"left":"right"],c=r[i?"right":"left"];a.onPointerGraceIntentChange({area:[{x:e.clientX+u,y:e.clientY},{x:l,y:r.top},{x:c,y:r.top},{x:c,y:r.bottom},{x:l,y:r.bottom}],side:t}),window.clearTimeout(s.current),s.current=window.setTimeout((()=>a.onPointerGraceIntentChange(null)),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}}))),onKeyDown:et(e.onKeyDown,(t=>{const o=""!==a.searchRef.current;var i;e.disabled||o&&" "===t.key||!jV[r.dir].includes(t.key)||(n.onOpenChange(!0),null===(i=n.content)||void 0===i||i.focus(),t.preventDefault())}))})))})),uU="MenuSubContent",lU=v.forwardRef(((e,t)=>{const n=hN(vs,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=np(vs,e.__scopeMenu),i=Bv(vs,e.__scopeMenu),s=wN(uU,e.__scopeMenu),u=v.useRef(null),l=Vt(t,u);return v.createElement(bv.Provider,{scope:e.__scopeMenu},v.createElement(ea,{present:r||a.open},v.createElement(bv.Slot,{scope:e.__scopeMenu},v.createElement(_$,Pe({id:s.contentId,"aria-labelledby":s.triggerId},o,{ref:l,align:"start",side:"rtl"===i.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{var t;i.isUsingKeyboardRef.current&&(null===(t=u.current)||void 0===t||t.focus()),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:et(e.onFocusOutside,(e=>{e.target!==s.trigger&&a.onOpenChange(!1)})),onEscapeKeyDown:et(e.onEscapeKeyDown,(e=>{i.onClose(),e.preventDefault()})),onKeyDown:et(e.onKeyDown,(e=>{const t=e.currentTarget.contains(e.target),n=zV[i.dir].includes(e.key);var r;t&&n&&(a.onOpenChange(!1),null===(r=s.trigger)||void 0===r||r.focus(),e.preventDefault())}))})))))}));function bN(e){return e?"open":"closed"}function ry(e){return"indeterminate"===e}function S$(e){return ry(e)?"indeterminate":e?"checked":"unchecked"}function cU(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function dU(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}function fU(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,o=n?e.indexOf(n):-1;let a=dU(e,Math.max(o,0));1===r.length&&(a=a.filter((e=>e!==n)));const i=a.find((e=>e.toLowerCase().startsWith(r.toLowerCase())));return i!==n?i:void 0}function pU(e,t){const{x:n,y:r}=e;let o=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){const i=t[e].x,s=t[e].y,u=t[a].x,l=t[a].y;s>r!=l>r&&n<(u-i)*(r-s)/(l-s)+i&&(o=!o)}return o}function mU(e,t){if(!t)return!1;return pU({x:e.clientX,y:e.clientY},t)}function _v(e){return t=>"mouse"===t.pointerType?e(t):void 0}const hU=GV,vU=KV,gU=XV,yU=x$,wU=JV,bU=nU,_U=oU,xU=iU,SU=sU,EU=lU,_N="DropdownMenu",[$U,sZ]=ni(_N,[dN]),wu=dN(),[uZ,CU]=$U(_N),IU=e=>{const{__scopeDropdownMenu:t,...n}=e,r=wu(t);return v.createElement(hU,Pe({},r,n))},RU="DropdownMenuContent",PU=v.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=CU(RU,n),a=wu(n),i=v.useRef(!1);return v.createElement(vU,Pe({id:o.contentId,"aria-labelledby":o.triggerId},a,r,{ref:t,onCloseAutoFocus:et(e.onCloseAutoFocus,(e=>{var t;i.current||null===(t=o.triggerRef.current)||void 0===t||t.focus(),i.current=!1,e.preventDefault()})),onInteractOutside:et(e.onInteractOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;(!o.modal||r)&&(i.current=!0)})),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))})),TU=v.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=wu(n);return v.createElement(gU,Pe({},o,r,{ref:t}))})),OU=v.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=wu(n);return v.createElement(yU,Pe({},o,r,{ref:t}))})),AU=v.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=wu(n);return v.createElement(wU,Pe({},o,r,{ref:t}))})),MU=v.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=wu(n);return v.createElement(bU,Pe({},o,r,{ref:t}))})),DU=v.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=wu(n);return v.createElement(_U,Pe({},o,r,{ref:t}))})),NU=v.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=wu(n);return v.createElement(xU,Pe({},o,r,{ref:t}))})),kU=v.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=wu(n);return v.createElement(SU,Pe({},o,r,{ref:t}))})),LU=v.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=wu(n);return v.createElement(EU,Pe({},o,r,{ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))})),FU=IU,xN=PU,SN=TU,EN=OU,$N=AU,CN=MU,BU=DU,E$=NU,IN=kU,RN=LU,jU=v.forwardRef((({className:e,inset:t,children:n,...r},o)=>G.jsxs(IN,{ref:o,className:_e("flex cursor-default select-none items-center rounded-xs px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...r,children:[n,G.jsx(aA,{className:"ml-auto h-4 w-4"})]})));jU.displayName=IN.displayName;const zU=v.forwardRef((({className:e,...t},n)=>G.jsx(RN,{ref:n,className:_e("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t})));zU.displayName=RN.displayName;const UT=e=>{e.preventDefault()},VU=v.forwardRef((({className:e,sideOffset:t=4,isPortal:n,...r},o)=>{const a=G.jsx(xN,{ref:o,sideOffset:t,onOpenAutoFocus:UT,onCloseAutoFocus:UT,className:_e("z-[101] flex max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] flex-col gap-xxxs overflow-y-auto rounded-lg border border-gray-200 bg-white p-xxs text-popover-foreground ","shadow-[0px_0px_12px_0px_rgba(0,0,0,0.08)] ","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=open]:fade-in data-[state=open]:slide-in-from-top-2","data-[state=closed]:fade-out data-[state=closed]:slide-out-to-top-2","data-[state=closed]:duration-150 data-[state=open]:duration-150","data-[state=closed]:[animation-timing-function:ease-in] data-[state=open]:[animation-timing-function:ease-out]",e),...r});return n?G.jsx(FU,{children:a}):a}));VU.displayName=xN.displayName;const UU=v.forwardRef((({className:e,inset:t,...n},r)=>G.jsx(EN,{ref:r,className:_e("relative flex cursor-default select-none items-center gap-xxs rounded-m p-xxs text-base font-medium text-gray-900 outline-none transition-colors hover:bg-gray-100 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-xl",e),...n})));UU.displayName=EN.displayName;const WU=v.forwardRef((({className:e,children:t,checked:n,checkboxPosition:r="right",...o},a)=>{const i=G.jsx(ZE,{size:"default",variant:"default",checked:n});return G.jsxs($N,{ref:a,className:_e("relative flex cursor-default select-none items-center gap-xxs rounded-m p-xxs text-base font-medium text-gray-900"," outline-none transition-colors hover:bg-gray-100 focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,onSelect:e=>e.preventDefault(),...o,children:["left"===r&&i,G.jsx("div",{className:"flex flex-1 items-center gap-xxs",children:t}),"right"===r&&i]})}));WU.displayName=$N.displayName;const qU=v.forwardRef((({className:e,children:t,radioPosition:n="right",...r},o)=>{const a=G.jsx("div",{className:"flex h-xxs items-center justify-center",children:G.jsx(BU,{children:G.jsx(gE,{size:20})})});return G.jsxs(CN,{ref:o,className:_e("relative flex cursor-default select-none items-center gap-xxs rounded-m p-xxs text-base font-medium text-gray-900"," outline-none transition-colors hover:bg-gray-100 focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),onSelect:e=>e.preventDefault(),...r,children:["left"===n&&a,G.jsx("div",{className:"flex flex-1 items-center gap-xxs",children:t}),"right"===n&&a]})}));qU.displayName=CN.displayName;const GU=v.forwardRef((({className:e,inset:t,...n},r)=>G.jsx(SN,{ref:r,className:_e("text-sm font-semibold",t&&"pl-xl",e),...n})));GU.displayName=SN.displayName;const HU=v.forwardRef((({className:e,...t},n)=>G.jsx(E$,{ref:n,className:_e("-mx-1 my-1 h-px bg-muted",e),...t})));HU.displayName=E$.displayName;const KU=Ue.createContext(null),YU=()=>Ue.useContext(KU),QU=v.forwardRef(((e,t)=>v.createElement(lt.label,Pe({},e,{ref:t,onMouseDown:t=>{var n;null===(n=e.onMouseDown)||void 0===n||n.call(e,t),!t.defaultPrevented&&t.detail>1&&t.preventDefault()}})))),PN=QU,XU=gu("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),TN=v.forwardRef((({className:e,...t},n)=>G.jsx(PN,{ref:n,className:_e(XU(),e),...t})));function WT(e,[t,n]){return Math.min(n,Math.max(t,e))}TN.displayName=PN.displayName;const ON=v.forwardRef(((e,t)=>v.createElement(lt.span,Pe({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}})))),JU=ON,ZU=[" ","Enter","ArrowUp","ArrowDown"],eW=[" ","Enter"],qy="Select",[Gy,Hy,tW]=s$(qy),[Gm,lZ]=ni(qy,[tW,Wm]),$$=Wm(),[nW,rp]=Gm(qy),[rW,oW]=Gm(qy),iW=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:i,defaultValue:s,onValueChange:u,dir:l,name:c,autoComplete:d,disabled:f,required:p}=e,m=$$(t),[h,g]=v.useState(null),[y,b]=v.useState(null),[w,x]=v.useState(!1),_=u$(l),[E=!1,S]=fd({prop:r,defaultProp:o,onChange:a}),[I,A]=fd({prop:i,defaultProp:s,onChange:u}),k=v.useRef(null),C=!h||!!h.closest("form"),[P,R]=v.useState(new Set),O=Array.from(P).map((e=>e.props.value)).join(";");return v.createElement(sN,m,v.createElement(nW,{required:p,scope:t,trigger:h,onTriggerChange:g,valueNode:y,onValueNodeChange:b,valueNodeHasChildren:w,onValueNodeHasChildrenChange:x,contentId:ad(),value:I,onValueChange:A,open:E,onOpenChange:S,dir:_,triggerPointerDownPosRef:k,disabled:f},v.createElement(Gy.Provider,{scope:t},v.createElement(rW,{scope:e.__scopeSelect,onNativeOptionAdd:v.useCallback((e=>{R((t=>new Set(t).add(e)))}),[]),onNativeOptionRemove:v.useCallback((e=>{R((t=>{const n=new Set(t);return n.delete(e),n}))}),[])},n)),C?v.createElement(kN,{key:O,"aria-hidden":!0,required:p,tabIndex:-1,name:c,autoComplete:d,value:I,onChange:e=>A(e.target.value),disabled:f},void 0===I?v.createElement("option",{value:""}):null,Array.from(P)):null))},aW="SelectTrigger",sW=v.forwardRef(((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=$$(n),i=rp(aW,n),s=i.disabled||r,u=Vt(t,i.onTriggerChange),l=Hy(n),[c,d,f]=LN((e=>{const t=l().filter((e=>!e.disabled)),n=t.find((e=>e.value===i.value)),r=FN(t,e,n);void 0!==r&&i.onValueChange(r.value)})),p=()=>{s||(i.onOpenChange(!0),f())};return v.createElement(h$,Pe({asChild:!0},a),v.createElement(lt.button,Pe({type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":NN(i.value)?"":void 0},o,{ref:u,onClick:et(o.onClick,(e=>{e.currentTarget.focus()})),onPointerDown:et(o.onPointerDown,(e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&(p(),i.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)},e.preventDefault())})),onKeyDown:et(o.onKeyDown,(e=>{const t=""!==c.current;!(e.ctrlKey||e.altKey||e.metaKey)&&1===e.key.length&&d(e.key),(!t||" "!==e.key)&&ZU.includes(e.key)&&(p(),e.preventDefault())}))})))})),uW="SelectValue",lW=v.forwardRef(((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:i="",...s}=e,u=rp(uW,n),{onValueNodeHasChildrenChange:l}=u,c=void 0!==a,d=Vt(t,u.onValueNodeChange);return Vo((()=>{l(c)}),[l,c]),v.createElement(lt.span,Pe({},s,{ref:d,style:{pointerEvents:"none"}}),NN(u.value)?v.createElement(v.Fragment,null,i):a)})),cW=v.forwardRef(((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return v.createElement(lt.span,Pe({"aria-hidden":!0},o,{ref:t}),r||"▼")})),dW=e=>v.createElement(by,Pe({asChild:!0},e)),km="SelectContent",fW=v.forwardRef(((e,t)=>{const n=rp(km,e.__scopeSelect),[r,o]=v.useState();if(Vo((()=>{o(new DocumentFragment)}),[]),!n.open){const t=r;return t?vu.createPortal(v.createElement(AN,{scope:e.__scopeSelect},v.createElement(Gy.Slot,{scope:e.__scopeSelect},v.createElement("div",null,e.children))),t):null}return v.createElement(pW,Pe({},e,{ref:t}))})),bl=10,[AN,op]=Gm(km),pW=v.forwardRef(((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:i,side:s,sideOffset:u,align:l,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g,...y}=e,b=rp(km,n),[w,x]=v.useState(null),[_,E]=v.useState(null),S=Vt(t,(e=>x(e))),[I,A]=v.useState(null),[k,C]=v.useState(null),P=Hy(n),[R,O]=v.useState(!1),T=v.useRef(!1);v.useEffect((()=>{if(w)return Sy(w)}),[w]),EE();const N=v.useCallback((e=>{const[t,...n]=P().map((e=>e.ref.current)),[r]=n.slice(-1),o=document.activeElement;for(const n of e)if(n===o||(null==n||n.scrollIntoView({block:"nearest"}),n===t&&_&&(_.scrollTop=0),n===r&&_&&(_.scrollTop=_.scrollHeight),null==n||n.focus(),document.activeElement!==o))return}),[P,_]),M=v.useCallback((()=>N([I,w])),[N,I,w]);v.useEffect((()=>{R&&M()}),[R,M]);const{onOpenChange:j,triggerPointerDownPosRef:D}=b;v.useEffect((()=>{if(w){let e={x:0,y:0};const t=t=>{var n,r,o,a;e={x:Math.abs(Math.round(t.pageX)-(null!==(n=null===(r=D.current)||void 0===r?void 0:r.x)&&void 0!==n?n:0)),y:Math.abs(Math.round(t.pageY)-(null!==(o=null===(a=D.current)||void 0===a?void 0:a.y)&&void 0!==o?o:0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():w.contains(n.target)||j(!1),document.removeEventListener("pointermove",t),D.current=null};return null!==D.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}}),[w,j,D]),v.useEffect((()=>{const e=()=>j(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}}),[j]);const[q,z]=LN((e=>{const t=P().filter((e=>!e.disabled)),n=t.find((e=>e.ref.current===document.activeElement)),r=FN(t,e,n);r&&setTimeout((()=>r.ref.current.focus()))})),L=v.useCallback(((e,t,n)=>{const r=!T.current&&!n;(void 0!==b.value&&b.value===t||r)&&(A(e),r&&(T.current=!0))}),[b.value]),$=v.useCallback((()=>null==w?void 0:w.focus()),[w]),V=v.useCallback(((e,t,n)=>{const r=!T.current&&!n;(void 0!==b.value&&b.value===t||r)&&C(e)}),[b.value]),B="popper"===r?qT:mW,F=B===qT?{side:s,sideOffset:u,align:l,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return v.createElement(AN,{scope:n,content:w,viewport:_,onViewportChange:E,itemRefCallback:L,selectedItem:I,onItemLeave:$,itemTextRefCallback:V,focusSelectedItem:M,selectedItemText:k,position:r,isPositioned:R,searchRef:q},v.createElement(xy,{as:qf,allowPinchZoom:!0},v.createElement(SE,{asChild:!0,trapped:b.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:et(o,(e=>{var t;null===(t=b.trigger)||void 0===t||t.focus({preventScroll:!0}),e.preventDefault()}))},v.createElement(wy,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>b.onOpenChange(!1)},v.createElement(B,Pe({role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:e=>e.preventDefault()},y,F,{onPlaced:()=>O(!0),ref:S,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:et(y.onKeyDown,(e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),!t&&1===e.key.length&&z(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=P().filter((e=>!e.disabled)).map((e=>e.ref.current));if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout((()=>N(t))),e.preventDefault()}}))}))))))})),mW=v.forwardRef(((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=rp(km,n),i=op(km,n),[s,u]=v.useState(null),[l,c]=v.useState(null),d=Vt(t,(e=>c(e))),f=Hy(n),p=v.useRef(!1),m=v.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:y,focusSelectedItem:b}=i,w=v.useCallback((()=>{if(a.trigger&&a.valueNode&&s&&l&&h&&g&&y){const e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),o=y.getBoundingClientRect();if("rtl"!==a.dir){const r=o.left-t.left,a=n.left-r,i=e.left-a,u=e.width+i,l=Math.max(u,t.width),c=window.innerWidth-bl,d=WT(a,[bl,c-l]);s.style.minWidth=u+"px",s.style.left=d+"px"}else{const r=t.right-o.right,a=window.innerWidth-n.right-r,i=window.innerWidth-e.right-a,u=e.width+i,l=Math.max(u,t.width),c=window.innerWidth-bl,d=WT(a,[bl,c-l]);s.style.minWidth=u+"px",s.style.right=d+"px"}const i=f(),u=window.innerHeight-2*bl,c=h.scrollHeight,d=window.getComputedStyle(l),m=parseInt(d.borderTopWidth,10),v=parseInt(d.paddingTop,10),b=parseInt(d.borderBottomWidth,10),w=m+v+c+parseInt(d.paddingBottom,10)+b,x=Math.min(5*g.offsetHeight,w),_=window.getComputedStyle(h),E=parseInt(_.paddingTop,10),S=parseInt(_.paddingBottom,10),I=e.top+e.height/2-bl,A=u-I,k=g.offsetHeight/2,C=m+v+(g.offsetTop+k),P=w-C;if(C<=I){const e=g===i[i.length-1].ref.current;s.style.bottom="0px";const t=l.clientHeight-h.offsetTop-h.offsetHeight,n=C+Math.max(A,k+(e?S:0)+t+b);s.style.height=n+"px"}else{const e=g===i[0].ref.current;s.style.top="0px";const t=Math.max(I,m+h.offsetTop+(e?E:0)+k)+P;s.style.height=t+"px",h.scrollTop=C-I+h.offsetTop}s.style.margin=`${bl}px 0`,s.style.minHeight=x+"px",s.style.maxHeight=u+"px",null==r||r(),requestAnimationFrame((()=>p.current=!0))}}),[f,a.trigger,a.valueNode,s,l,h,g,y,a.dir,r]);Vo((()=>w()),[w]);const[x,_]=v.useState();Vo((()=>{l&&_(window.getComputedStyle(l).zIndex)}),[l]);const E=v.useCallback((e=>{e&&!0===m.current&&(w(),null==b||b(),m.current=!1)}),[w,b]);return v.createElement(hW,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:E},v.createElement("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:x}},v.createElement(lt.div,Pe({},o,{ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}}))))})),qT=v.forwardRef(((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=bl,...a}=e,i=$$(n);return v.createElement(v$,Pe({},i,a,{ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}))})),[hW,C$]=Gm(km,{}),GT="SelectViewport",vW=v.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,o=op(GT,n),a=C$(GT,n),i=Vt(t,o.onViewportChange),s=v.useRef(0);return v.createElement(v.Fragment,null,v.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"}}),v.createElement(Gy.Slot,{scope:n},v.createElement(lt.div,Pe({"data-radix-select-viewport":"",role:"presentation"},r,{ref:i,style:{position:"relative",flex:1,overflow:"auto",...r.style},onScroll:et(r.onScroll,(e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=a;if(null!=r&&r.current&&n){const e=Math.abs(s.current-t.scrollTop);if(e>0){const r=window.innerHeight-2*bl,o=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),i=Math.max(o,a);if(i<r){const o=i+e,a=Math.min(r,o),s=o-a;n.style.height=a+"px","0px"===n.style.bottom&&(t.scrollTop=s>0?s:0,n.style.justifyContent="flex-end")}}}s.current=t.scrollTop}))}))))})),gW="SelectGroup",[yW,wW]=Gm(gW),bW=v.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,o=ad();return v.createElement(yW,{scope:n,id:o},v.createElement(lt.div,Pe({role:"group","aria-labelledby":o},r,{ref:t})))})),_W="SelectLabel",xW=v.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,o=wW(_W,n);return v.createElement(lt.div,Pe({id:o.id},r,{ref:t}))})),KS="SelectItem",[SW,MN]=Gm(KS),EW=v.forwardRef(((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...i}=e,s=rp(KS,n),u=op(KS,n),l=s.value===r,[c,d]=v.useState(a??""),[f,p]=v.useState(!1),m=Vt(t,(e=>{var t;return null===(t=u.itemRefCallback)||void 0===t?void 0:t.call(u,e,r,o)})),h=ad(),g=()=>{o||(s.onValueChange(r),s.onOpenChange(!1))};if(""===r)throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return v.createElement(SW,{scope:n,value:r,disabled:o,textId:h,isSelected:l,onItemTextChange:v.useCallback((e=>{d((t=>{var n;return t||(null!==(n=null==e?void 0:e.textContent)&&void 0!==n?n:"").trim()}))}),[])},v.createElement(Gy.ItemSlot,{scope:n,value:r,disabled:o,textValue:c},v.createElement(lt.div,Pe({role:"option","aria-labelledby":h,"data-highlighted":f?"":void 0,"aria-selected":l&&f,"data-state":l?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1},i,{ref:m,onFocus:et(i.onFocus,(()=>p(!0))),onBlur:et(i.onBlur,(()=>p(!1))),onPointerUp:et(i.onPointerUp,g),onPointerMove:et(i.onPointerMove,(e=>{var t;o?null===(t=u.onItemLeave)||void 0===t||t.call(u):e.currentTarget.focus({preventScroll:!0})})),onPointerLeave:et(i.onPointerLeave,(e=>{var t;e.currentTarget===document.activeElement&&(null===(t=u.onItemLeave)||void 0===t||t.call(u))})),onKeyDown:et(i.onKeyDown,(e=>{var t;""!==(null===(t=u.searchRef)||void 0===t?void 0:t.current)&&" "===e.key||(eW.includes(e.key)&&g()," "===e.key&&e.preventDefault())}))}))))})),Mg="SelectItemText",$W=v.forwardRef(((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,i=rp(Mg,n),s=op(Mg,n),u=MN(Mg,n),l=oW(Mg,n),[c,d]=v.useState(null),f=Vt(t,(e=>d(e)),u.onItemTextChange,(e=>{var t;return null===(t=s.itemTextRefCallback)||void 0===t?void 0:t.call(s,e,u.value,u.disabled)})),p=null==c?void 0:c.textContent,m=v.useMemo((()=>v.createElement("option",{key:u.value,value:u.value,disabled:u.disabled},p)),[u.disabled,u.value,p]),{onNativeOptionAdd:h,onNativeOptionRemove:g}=l;return Vo((()=>(h(m),()=>g(m))),[h,g,m]),v.createElement(v.Fragment,null,v.createElement(lt.span,Pe({id:u.textId},a,{ref:f})),u.isSelected&&i.valueNode&&!i.valueNodeHasChildren?vu.createPortal(a.children,i.valueNode):null)})),CW="SelectItemIndicator",IW=v.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e;return MN(CW,n).isSelected?v.createElement(lt.span,Pe({"aria-hidden":!0},r,{ref:t})):null})),HT="SelectScrollUpButton",RW=v.forwardRef(((e,t)=>{const n=op(HT,e.__scopeSelect),r=C$(HT,e.__scopeSelect),[o,a]=v.useState(!1),i=Vt(t,r.onScrollButtonChange);return Vo((()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollTop>0;a(e)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[n.viewport,n.isPositioned]),o?v.createElement(DN,Pe({},e,{ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}})):null})),KT="SelectScrollDownButton",PW=v.forwardRef(((e,t)=>{const n=op(KT,e.__scopeSelect),r=C$(KT,e.__scopeSelect),[o,a]=v.useState(!1),i=Vt(t,r.onScrollButtonChange);return Vo((()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;a(n)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[n.viewport,n.isPositioned]),o?v.createElement(DN,Pe({},e,{ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}})):null})),DN=v.forwardRef(((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=op("SelectScrollButton",n),i=v.useRef(null),s=Hy(n),u=v.useCallback((()=>{null!==i.current&&(window.clearInterval(i.current),i.current=null)}),[]);return v.useEffect((()=>()=>u()),[u]),Vo((()=>{var e;const t=s().find((e=>e.ref.current===document.activeElement));null==t||null===(e=t.ref.current)||void 0===e||e.scrollIntoView({block:"nearest"})}),[s]),v.createElement(lt.div,Pe({"aria-hidden":!0},o,{ref:t,style:{flexShrink:0,...o.style},onPointerDown:et(o.onPointerDown,(()=>{null===i.current&&(i.current=window.setInterval(r,50))})),onPointerMove:et(o.onPointerMove,(()=>{var e;null===(e=a.onItemLeave)||void 0===e||e.call(a),null===i.current&&(i.current=window.setInterval(r,50))})),onPointerLeave:et(o.onPointerLeave,(()=>{u()}))}))})),TW=v.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e;return v.createElement(lt.div,Pe({"aria-hidden":!0},r,{ref:t}))}));function NN(e){return""===e||void 0===e}const kN=v.forwardRef(((e,t)=>{const{value:n,...r}=e,o=v.useRef(null),a=Vt(t,o),i=ky(n);return v.useEffect((()=>{const e=o.current,t=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(t,"value").set;if(i!==n&&r){const t=new Event("change",{bubbles:!0});r.call(e,n),e.dispatchEvent(t)}}),[i,n]),v.createElement(ON,{asChild:!0},v.createElement("select",Pe({},r,{ref:a,defaultValue:n})))}));function LN(e){const t=ws(e),n=v.useRef(""),r=v.useRef(0),o=v.useCallback((e=>{const o=n.current+e;t(o),function e(t){n.current=t,window.clearTimeout(r.current),""!==t&&(r.current=window.setTimeout((()=>e("")),1e3))}(o)}),[t]),a=v.useCallback((()=>{n.current="",window.clearTimeout(r.current)}),[]);return v.useEffect((()=>()=>window.clearTimeout(r.current)),[]),[n,o,a]}function FN(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,o=n?e.indexOf(n):-1;let a=OW(e,Math.max(o,0));1===r.length&&(a=a.filter((e=>e!==n)));const i=a.find((e=>e.textValue.toLowerCase().startsWith(r.toLowerCase())));return i!==n?i:void 0}function OW(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}kN.displayName="BubbleSelect";const BN=iW,I$=sW,jN=lW,AW=cW,MW=dW,zN=fW,DW=vW,VN=bW,UN=xW,WN=EW,NW=$W,kW=IW,qN=RW,GN=PW,HN=TW,LW=BN,R$=v.forwardRef((({...e},t)=>G.jsx(LW,{ref:t,...e})));R$.displayName=BN.displayName;const KN=v.forwardRef(((e,t)=>G.jsx(VN,{ref:t,...e})));KN.displayName=VN.displayName;const YN=v.forwardRef(((e,t)=>G.jsx(jN,{ref:t,...e})));YN.displayName=jN.displayName;const P$=v.forwardRef((({className:e,children:t,caption:n,error:r,icon:o,renderCaret:a,...i},s)=>{const u=a?a():a?null:G.jsx(oA,{size:20,className:"transition-transform duration-200 group-data-[state=open]/select:rotate-180"});return G.jsxs("div",{className:"w-full",children:[G.jsxs(I$,{ref:s,className:_e("group/select flex h-l w-full items-center justify-between rounded-m border bg-background p-xxs text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus-visible:ring-gray-700 focus-visible:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50",r?"border-red-500":"border-input",e),...i,children:[G.jsxs("div",{className:_e("flex flex-1 items-center gap-xxs",{"max-w-[90%]":!!a}),children:[o&&G.jsx("span",{className:_e("text-muted-foreground",{"text-red-dark":r}),children:o}),t]}),G.jsx(AW,{asChild:!0,children:u})]}),n||r?r?G.jsxs("div",{className:"mt-xxs flex items-center gap-xxxs text-sm text-red-600",children:[G.jsx(yE,{size:16}),r]}):G.jsxs("div",{className:"mt-xxs flex items-center gap-xxxs text-sm text-muted-foreground",children:[G.jsx(V5,{size:16}),n]}):null]})}));P$.displayName="SelectTriggerWrapper";const QN=v.forwardRef((({className:e,children:t,caption:n,error:r,icon:o,...a},i)=>G.jsx(P$,{ref:i,className:_e("[&>span]:line-clamp-1 [&>span]:text-left",e),caption:n,error:r,icon:o,...a,children:t})));QN.displayName=I$.displayName;const T$=v.forwardRef((({className:e,children:t,position:n="popper",...r},o)=>{const a=v.useMemo((()=>{const e=t=>{var n,r;if(!t)return!1;if(Array.isArray(t))return t.some(e);if(v.isValidElement(t)){const o=null==(n=t.type)?void 0:n.displayName;return"SelectActions"===o||"SelectFooter"===o||e(null==(r=t.props)?void 0:r.children)}return!1};return e(t)}),[t]);return G.jsx(MW,{children:G.jsx(zN,{ref:o,className:_e("z-[101] flex max-h-[var(--radix-select-content-available-height)] min-w-[8rem] flex-col rounded-lg border border-gray-200 bg-white text-popover-foreground","shadow-[0px_0px_12px_0px_rgba(0,0,0,0.08)]","data-[state=open]:animate-in data-[state=closed]:animate-out ","data-[state=open]:fade-in data-[state=open]:slide-in-from-top-2 ","data-[state=closed]:fade-out data-[state=closed]:slide-out-to-top-2 ","data-[state=closed]:duration-150 data-[state=open]:duration-150 ","data-[state=closed]:[animation-timing-function:ease-in] data-[state=open]:[animation-timing-function:ease-out]","popper"===n&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:G.jsx(DW,{className:_e("flex flex-col gap-xxxs overflow-y-auto px-xxs",{"py-xxs":!a},"popper"===n&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t})})})}));T$.displayName=zN.displayName;const XN=v.forwardRef((({className:e,...t},n)=>G.jsx(UN,{ref:n,className:_e("text-sm font-medium text-gray-900",e),...t})));XN.displayName=UN.displayName;const JN=v.forwardRef((({className:e,showCheck:t=!0,checkPosition:n="right",children:r,...o},a)=>{const i=G.jsx(kW,{children:G.jsx(gE,{size:20})});return G.jsxs(WN,{ref:a,className:_e("relative flex cursor-default select-none items-center gap-xxs rounded-m p-xxs","text-base font-medium text-gray-900 outline-none transition-colors hover:bg-gray-100","focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o,children:[t&&"left"===n&&i,G.jsx("div",{className:"flex flex-1 items-center gap-xxs",children:G.jsx(NW,{children:r})}),t&&"right"===n&&i]})}));JN.displayName=WN.displayName;const ZN=v.forwardRef((({className:e,...t},n)=>G.jsx(HN,{ref:n,className:_e("-mx-1 my-1 h-px bg-gray-200",e),...t})));ZN.displayName=HN.displayName;const FW=({selectedValues:e=[],onRemoveValue:t})=>{const n=v.useRef(null),[r,o]=v.useState(e.length);return v.useLayoutEffect((()=>{if(!n.current||0===e.length)return void o(e.length);const r=n.current.offsetWidth-60,a=document.createElement("div");Object.assign(a.style,{position:"absolute",visibility:"hidden",whiteSpace:"nowrap",display:"flex",gap:"4px",top:"-9999px",left:"-9999px"}),document.body.appendChild(a);let i=0,s=0;for(const n of e){const e=document.createElement("div");e.className="gap-xxxs p-xxs flex cursor-pointer items-center rounded-sm bg-gray-100 text-sm font-medium text-gray-900";const o=document.createElement("span");if(o.textContent="string"==typeof n?n:n.value,e.appendChild(o),"string"!=typeof n&&n.avatar){const t=document.createElement("div");t.className="w-6 h-6 rounded-full bg-gray-300 flex-shrink-0",e.insertBefore(t,o)}if(t){const t=document.createElement("button");t.innerHTML="×",t.className="ml-1 rounded-full outline-none",e.appendChild(t)}a.appendChild(e);const u=e.offsetWidth+4;if(!(i+u<=r))break;i+=u,s++}document.body.removeChild(a),o(Math.max(1,s))}),[e,t]),{containerRef:n,visibleCount:r}},ek=({hiddenCount:e,selectedValues:t=[],onRemoveValue:n})=>{const r=e=>{e.stopPropagation(),e.preventDefault()};return G.jsx("div",{onPointerDown:r,onMouseDown:r,onClick:r,children:G.jsxs(R$,{name:"hidden-chips-counter",children:[G.jsx(I$,{asChild:!0,children:G.jsx("div",{children:G.jsx(UM,{text:`+${e}`})})}),G.jsx(T$,{align:"end",className:"max-h-[250px] w-screen max-w-[300px] gap-xxxs overflow-y-auto",children:t.map((e=>{const t="string"==typeof e?e:e.value;return G.jsxs("div",{className:"flex justify-between p-xxs",onClick:e=>e.stopPropagation(),children:[G.jsx("span",{children:t}),G.jsx(gy,{size:16,className:"cursor-pointer",onClick:()=>null==n?void 0:n(t)})]},t)}))})]})})};ek.displayName="SelectHiddenChipsCounter";const BW=v.forwardRef(((e,t)=>{const{className:n,selectedValues:r=[],placeholder:o,onRemoveValue:a,icon:i,caption:s,error:u,...l}=e,{containerRef:c,visibleCount:d}=FW({selectedValues:r,onRemoveValue:a}),f=r.length-d;return G.jsx(P$,{ref:t,className:n,caption:s,error:u,icon:i,...l,children:G.jsx("div",{ref:c,className:"flex w-full flex-1 flex-nowrap overflow-hidden",children:0===r.length?G.jsx("span",{children:o||"Select options..."}):G.jsxs(AF,{children:[r.slice(0,d).map((e=>{const t="string"==typeof e?e:e.value;return G.jsx(UM,{avatarSrc:"string"==typeof e?void 0:e.avatar,text:t,onRemove:()=>null==a?void 0:a(t)},t)})),f>0&&G.jsx(ek,{hiddenCount:f,onRemoveValue:a,selectedValues:r})]})})})}));BW.displayName="SelectMultiTrigger";const jW=v.forwardRef((({value:e,isSelected:t=!1,isLoading:n=!1,checkboxPosition:r="right",onSelect:o,className:a,children:i,...s},u)=>{const l=n?G.jsx(sA,{size:24,className:"flex-shrink-0 animate-spin text-blue_100"}):G.jsx(ZE,{size:"default",variant:"default",checked:t}),c=()=>{null==o||o(e)};return G.jsxs("div",{ref:u,className:_e("relative flex cursor-pointer select-none items-center gap-xxs rounded-m","p-xxs text-base font-medium text-gray-900 outline-none transition-colors hover:bg-gray-100","focus:bg-accent focus:text-accent-foreground",{"pointer-events-none":n},a),onClick:c,role:"button",tabIndex:0,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),c())},...s,children:["left"===r&&l,G.jsx("div",{className:"flex flex-1 items-center gap-xxs",children:i}),"right"===r&&l]})}));jW.displayName="SelectCheckboxItem";const zW=v.forwardRef((({className:e,...t},n)=>G.jsx(qN,{ref:n,className:_e("flex cursor-default items-center justify-center py-xxs",e),...t,children:G.jsx(k5,{size:16})})));zW.displayName=qN.displayName;const VW=v.forwardRef((({className:e,...t},n)=>G.jsx(GN,{ref:n,className:_e("flex cursor-default items-center justify-center p-xxs",e),...t,children:G.jsx(oA,{size:16})})));VW.displayName=GN.displayName;const UW=v.forwardRef((({className:e,children:t,...n},r)=>G.jsx("div",{ref:r,className:_e("sticky top-0 z-20 bg-white p-xxs",e),...n,children:t})));UW.displayName="SelectActions";const WW=v.forwardRef((({className:e,children:t,...n},r)=>G.jsx("div",{ref:r,className:_e("sticky bottom-0 z-20 bg-white p-xxs",e),...n,children:t})));WW.displayName="SelectFooter";const qW=v.createContext({}),bd=()=>{const e=v.useContext(qW),t=v.useContext(tk),n=YU();e||console.error("useFormContext must be used within a FormProvider");const{getFieldState:r,formState:o}=n,a=r(e.name,o);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=t;return{id:i,name:e.name,formItemId:`${i}-form-item`,formDescriptionId:`${i}-form-item-description`,formMessageId:`${i}-form-item-message`,...a}},tk=v.createContext({}),GW=v.forwardRef((({className:e,...t},n)=>{const r=v.useId();return G.jsx(tk.Provider,{value:{id:r},children:G.jsx("div",{ref:n,className:_e("mt-[8px]",e),...t})})}));GW.displayName="FormItem";const HW=v.forwardRef((({className:e,isRequired:t,...n},r)=>{const{formItemId:o}=bd();return G.jsxs(TN,{ref:r,className:_e("mb-2 text-sm font-medium",e),htmlFor:o,...n,children:[t&&"*",n.children]})}));HW.displayName="FormLabel";const KW=v.forwardRef((({...e},t)=>{const{error:n,formItemId:r,formDescriptionId:o,formMessageId:a}=bd();return G.jsx(yd,{ref:t,id:r,"aria-describedby":n?`${o} ${a}`:`${o}`,"aria-invalid":!!n,...e})}));KW.displayName="FormControl";const YW=v.forwardRef((({className:e,...t},n)=>{const{formDescriptionId:r}=bd();return G.jsx("p",{ref:n,id:r,className:_e("text-sm text-muted-foreground",e),...t})}));YW.displayName="FormDescription";const QW=v.forwardRef((({className:e,children:t,...n},r)=>{const{error:o,formMessageId:a}=bd(),i=o?String(null==o?void 0:o.message):t;return i?G.jsxs("p",{ref:r,id:a,className:_e("flex items-start gap-1 pt-xxs text-sm text-red-dark",e),...n,children:[G.jsx(yE,{size:16,className:"text-red-dark"})," ",i]}):null}));QW.displayName="FormMessage";const XW=v.forwardRef((({...e},t)=>{const{name:n}=bd();return G.jsx(R$,{ref:t,name:n,...e})}));XW.displayName="FormSelect";const JW=v.forwardRef((({className:e,children:t,...n},r)=>{const{formItemId:o}=bd();return G.jsx(QN,{ref:r,id:o,className:e,...n,children:t})}));JW.displayName="FormSelectTrigger";const ZW=v.forwardRef(((e,t)=>G.jsx(T$,{ref:t,...e})));ZW.displayName="FormSelectContent";const eq=v.forwardRef(((e,t)=>G.jsx(JN,{ref:t,...e})));eq.displayName="FormSelectItem";const tq=v.forwardRef(((e,t)=>G.jsx(KN,{ref:t,...e})));tq.displayName="FormSelectGroup";const nq=v.forwardRef(((e,t)=>G.jsx(XN,{ref:t,...e})));nq.displayName="FormSelectLabel";const rq=v.forwardRef(((e,t)=>G.jsx(ZN,{ref:t,...e})));rq.displayName="FormSelectSeparator";const oq=v.forwardRef(((e,t)=>G.jsx(YN,{ref:t,...e})));function jf(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function nk(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>v.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return v.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=v.createContext(r),a=n.length;function i(t){const{scope:n,children:r,...i}=t,s=(null==n?void 0:n[e][a])||o,u=v.useMemo((()=>i),Object.values(i));return v.createElement(s.Provider,{value:u},r)}return n=[...n,r],i.displayName=t+"Provider",[i,function(n,i){const s=(null==i?void 0:i[e][a])||o,u=v.useContext(s);if(u)return u;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},iq(r,...t)]}function iq(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return v.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}function Ky(e){const t=v.useRef(e);return v.useEffect((()=>{t.current=e})),v.useMemo((()=>(...e)=>{var n;return null===(n=t.current)||void 0===n?void 0:n.call(t,...e)}),[])}function aq(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function sq(...e){return t=>e.forEach((e=>aq(e,t)))}function uq(...e){return v.useCallback(sq(...e),e)}function ip(e){return e.split("-")[0]}function jv(e){return e.split("-")[1]}function Hm(e){return["top","bottom"].includes(ip(e))?"x":"y"}function O$(e){return"y"===e?"height":"width"}function YT(e,t,n){let{reference:r,floating:o}=e;const a=r.x+r.width/2-o.width/2,i=r.y+r.height/2-o.height/2,s=Hm(t),u=O$(s),l=r[u]/2-o[u]/2,c="x"===s;let d;switch(ip(t)){case"top":d={x:a,y:r.y-o.height};break;case"bottom":d={x:a,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:i};break;case"left":d={x:r.x-o.width,y:i};break;default:d={x:r.x,y:r.y}}switch(jv(t)){case"start":d[s]-=l*(n&&c?-1:1);break;case"end":d[s]+=l*(n&&c?-1:1)}return d}oq.displayName="FormSelectValue";const lq=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:i}=n,s=await(null==i.isRTL?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:l,y:c}=YT(u,r,s),d=r,f={},p=0;for(let n=0;n<a.length;n++){const{name:m,fn:v}=a[n],{x:h,y:g,data:y,reset:b}=await v({x:l,y:c,initialPlacement:r,placement:d,strategy:o,middlewareData:f,rects:u,platform:i,elements:{reference:e,floating:t}});l=h??l,c=g??c,f={...f,[m]:{...f[m],...y}},b&&p<=50&&(p++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(u=!0===b.rects?await i.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:l,y:c}=YT(u,d,s))),n=-1)}return{x:l,y:c,placement:d,strategy:o,middlewareData:f}};function rk(e){return"number"!=typeof e?(t=e,{top:0,right:0,bottom:0,left:0,...t}):{top:e,right:e,bottom:e,left:e};var t}function oy(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function xv(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:a,rects:i,elements:s,strategy:u}=e,{boundary:l="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=t,m=rk(p),v=s[f?"floating"===d?"reference":"floating":d],h=oy(await a.getClippingRect({element:null==(n=await(null==a.isElement?void 0:a.isElement(v)))||n?v:v.contextElement||await(null==a.getDocumentElement?void 0:a.getDocumentElement(s.floating)),boundary:l,rootBoundary:c,strategy:u})),g=oy(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({rect:"floating"===d?{...i.floating,x:r,y:o}:i.reference,offsetParent:await(null==a.getOffsetParent?void 0:a.getOffsetParent(s.floating)),strategy:u}):i[d]);return{top:h.top-g.top+m.top,bottom:g.bottom-h.bottom+m.bottom,left:h.left-g.left+m.left,right:g.right-h.right+m.right}}const cq=Math.min,Df=Math.max;function YS(e,t,n){return Df(e,cq(t,n))}const QT=e=>({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e??{},{x:o,y:a,placement:i,rects:s,platform:u}=t;if(null==n)return{};const l=rk(r),c={x:o,y:a},d=Hm(i),f=jv(i),p=O$(d),m=await u.getDimensions(n),v="y"===d?"top":"left",h="y"===d?"bottom":"right",g=s.reference[p]+s.reference[d]-c[d]-s.floating[p],y=c[d]-s.reference[d],b=await(null==u.getOffsetParent?void 0:u.getOffsetParent(n));let w=b?"y"===d?b.clientHeight||0:b.clientWidth||0:0;0===w&&(w=s.floating[p]);const x=g/2-y/2,_=l[v],E=w-m[p]-l[h],S=w/2-m[p]/2+x,I=YS(_,S,E),A=("start"===f?l[v]:l[h])>0&&S!==I&&s.reference[p]<=s.floating[p];return{[d]:c[d]-(A?S<_?_-S:E-S:0),data:{[d]:I,centerOffset:S-I}}}}),dq={left:"right",right:"left",bottom:"top",top:"bottom"};function iy(e){return e.replace(/left|right|bottom|top/g,(e=>dq[e]))}function fq(e,t,n){void 0===n&&(n=!1);const r=jv(e),o=Hm(e),a=O$(o);let i="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=iy(i)),{main:i,cross:iy(i)}}const pq={start:"end",end:"start"};function XT(e){return e.replace(/start|end/g,(e=>pq[e]))}const ok=["top","right","bottom","left"];ok.reduce(((e,t)=>e.concat(t,t+"-start",t+"-end")),[]);const mq=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:o,rects:a,initialPlacement:i,platform:s,elements:u}=t,{mainAxis:l=!0,crossAxis:c=!0,fallbackPlacements:d,fallbackStrategy:f="bestFit",flipAlignment:p=!0,...m}=e,v=ip(r),h=[i,...d||(v!==i&&p?function(e){const t=iy(e);return[XT(e),t,XT(t)]}(i):[iy(i)])],g=await xv(t,m),y=[];let b=(null==(n=o.flip)?void 0:n.overflows)||[];if(l&&y.push(g[v]),c){const{main:e,cross:t}=fq(r,a,await(null==s.isRTL?void 0:s.isRTL(u.floating)));y.push(g[e],g[t])}if(b=[...b,{placement:r,overflows:y}],!y.every((e=>e<=0))){var w,x;const e=(null!=(w=null==(x=o.flip)?void 0:x.index)?w:0)+1,t=h[e];if(t)return{data:{index:e,overflows:b},reset:{placement:t}};let n="bottom";switch(f){case"bestFit":{var _;const e=null==(_=b.map((e=>[e,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:_[0].placement;e&&(n=e);break}case"initialPlacement":n=i}if(r!==n)return{reset:{placement:n}}}return{}}}};function JT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ZT(e){return ok.some((t=>e[t]>=0))}const hq=function(e){let{strategy:t="referenceHidden",...n}=void 0===e?{}:e;return{name:"hide",async fn(e){const{rects:r}=e;switch(t){case"referenceHidden":{const t=JT(await xv(e,{...n,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:ZT(t)}}}case"escaped":{const t=JT(await xv(e,{...n,altBoundary:!0}),r.floating);return{data:{escapedOffsets:t,escaped:ZT(t)}}}default:return{}}}}},vq=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await async function(e,t){const{placement:n,platform:r,elements:o}=e,a=await(null==r.isRTL?void 0:r.isRTL(o.floating)),i=ip(n),s=jv(n),u="x"===Hm(n),l=["left","top"].includes(i)?-1:1,c=a&&u?-1:1,d="function"==typeof t?t(e):t;let{mainAxis:f,crossAxis:p,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&"number"==typeof m&&(p="end"===s?-1*m:m),u?{x:p*c,y:f*l}:{x:f*l,y:p*c}}(t,e);return{x:n+o.x,y:r+o.y,data:o}}}};function ik(e){return"x"===e?"y":"x"}const gq=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...u}=e,l={x:n,y:r},c=await xv(t,u),d=Hm(ip(o)),f=ik(d);let p=l[d],m=l[f];if(a){const e="y"===d?"bottom":"right";p=YS(p+c["y"===d?"top":"left"],p,p-c[e])}if(i){const e="y"===f?"bottom":"right";m=YS(m+c["y"===f?"top":"left"],m,m-c[e])}const v=s.fn({...t,[d]:p,[f]:m});return{...v,data:{x:v.x-n,y:v.y-r}}}}},yq=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:i}=t,{offset:s=0,mainAxis:u=!0,crossAxis:l=!0}=e,c={x:n,y:r},d=Hm(o),f=ik(d);let p=c[d],m=c[f];const v="function"==typeof s?s({...a,placement:o}):s,h="number"==typeof v?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(u){const e="y"===d?"height":"width",t=a.reference[d]-a.floating[e]+h.mainAxis,n=a.reference[d]+a.reference[e]-h.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){var g,y,b,w;const e="y"===d?"width":"height",t=["top","left"].includes(ip(o)),n=a.reference[f]-a.floating[e]+(t&&null!=(g=null==(y=i.offset)?void 0:y[f])?g:0)+(t?0:h.crossAxis),r=a.reference[f]+a.reference[e]+(t?0:null!=(b=null==(w=i.offset)?void 0:w[f])?b:0)-(t?h.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[d]:p,[f]:m}}}},wq=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:a}=t,{apply:i,...s}=e,u=await xv(t,s),l=ip(n),c=jv(n);let d,f;"top"===l||"bottom"===l?(d=l,f=c===(await(null==o.isRTL?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(f=l,d="end"===c?"top":"bottom");const p=Df(u.left,0),m=Df(u.right,0),v=Df(u.top,0),h=Df(u.bottom,0),g={availableHeight:r.floating.height-(["left","right"].includes(n)?2*(0!==v||0!==h?v+h:Df(u.top,u.bottom)):u[d]),availableWidth:r.floating.width-(["top","bottom"].includes(n)?2*(0!==p||0!==m?p+m:Df(u.left,u.right)):u[f])},y=await o.getDimensions(a.floating);null==i||i({...t,...g});const b=await o.getDimensions(a.floating);return y.width!==b.width||y.height!==b.height?{reset:{rects:!0}}:{}}}};function ak(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Pl(e){if(null==e)return window;if(!ak(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function zv(e){return Pl(e).getComputedStyle(e)}function _l(e){return ak(e)?"":e?(e.nodeName||"").toLowerCase():""}function sk(){const e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((e=>e.brand+"/"+e.version)).join(" "):navigator.userAgent}function hu(e){return e instanceof Pl(e).HTMLElement}function gd(e){return e instanceof Pl(e).Element}function A$(e){return!(typeof ShadowRoot>"u")&&(e instanceof Pl(e).ShadowRoot||e instanceof ShadowRoot)}function Yy(e){const{overflow:t,overflowX:n,overflowY:r}=zv(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function bq(e){return["table","td","th"].includes(_l(e))}function e2(e){const t=/firefox/i.test(sk()),n=zv(e);return"none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||["transform","perspective"].includes(n.willChange)||t&&"filter"===n.willChange||t&&!!n.filter&&"none"!==n.filter}function uk(){return!/^((?!chrome|android).)*safari/i.test(sk())}const t2=Math.min,sv=Math.max,ay=Math.round;function xl(e,t,n){var r,o,a,i;void 0===t&&(t=!1),void 0===n&&(n=!1);const s=e.getBoundingClientRect();let u=1,l=1;t&&hu(e)&&(u=e.offsetWidth>0&&ay(s.width)/e.offsetWidth||1,l=e.offsetHeight>0&&ay(s.height)/e.offsetHeight||1);const c=gd(e)?Pl(e):window,d=!uk()&&n,f=(s.left+(d&&null!=(r=null==(o=c.visualViewport)?void 0:o.offsetLeft)?r:0))/u,p=(s.top+(d&&null!=(a=null==(i=c.visualViewport)?void 0:i.offsetTop)?a:0))/l,m=s.width/u,v=s.height/l;return{width:m,height:v,top:p,right:f+m,bottom:p+v,left:f,x:f,y:p}}function ud(e){return(t=e,(t instanceof Pl(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function Qy(e){return gd(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function lk(e){return xl(ud(e)).left+Qy(e).scrollLeft}function _q(e,t,n){const r=hu(t),o=ud(t),a=xl(e,r&&function(e){const t=xl(e);return ay(t.width)!==e.offsetWidth||ay(t.height)!==e.offsetHeight}(t),"fixed"===n);let i={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&"fixed"!==n)if(("body"!==_l(t)||Yy(o))&&(i=Qy(t)),hu(t)){const e=xl(t,!0);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&(s.x=lk(o));return{x:a.left+i.scrollLeft-s.x,y:a.top+i.scrollTop-s.y,width:a.width,height:a.height}}function ck(e){return"html"===_l(e)?e:e.assignedSlot||e.parentNode||(A$(e)?e.host:null)||ud(e)}function n2(e){return hu(e)&&"fixed"!==getComputedStyle(e).position?e.offsetParent:null}function QS(e){const t=Pl(e);let n=n2(e);for(;n&&bq(n)&&"static"===getComputedStyle(n).position;)n=n2(n);return n&&("html"===_l(n)||"body"===_l(n)&&"static"===getComputedStyle(n).position&&!e2(n))?t:n||function(e){let t=ck(e);for(A$(t)&&(t=t.host);hu(t)&&!["html","body"].includes(_l(t));){if(e2(t))return t;t=t.parentNode}return null}(e)||t}function r2(e){if(hu(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=xl(e);return{width:t.width,height:t.height}}function dk(e){const t=ck(e);return["html","body","#document"].includes(_l(t))?e.ownerDocument.body:hu(t)&&Yy(t)?t:dk(t)}function sy(e,t){var n;void 0===t&&(t=[]);const r=dk(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),a=Pl(r),i=o?[a].concat(a.visualViewport||[],Yy(r)?r:[]):r,s=t.concat(i);return o?s:s.concat(sy(i))}function o2(e,t,n){return"viewport"===t?oy(function(e,t){const n=Pl(e),r=ud(e),o=n.visualViewport;let a=r.clientWidth,i=r.clientHeight,s=0,u=0;if(o){a=o.width,i=o.height;const e=uk();(e||!e&&"fixed"===t)&&(s=o.offsetLeft,u=o.offsetTop)}return{width:a,height:i,x:s,y:u}}(e,n)):gd(t)?function(e,t){const n=xl(e,!1,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft;return{top:r,left:o,x:o,y:r,right:o+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}(t,n):oy(function(e){var t;const n=ud(e),r=Qy(e),o=null==(t=e.ownerDocument)?void 0:t.body,a=sv(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),i=sv(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0);let s=-r.scrollLeft+lk(e);const u=-r.scrollTop;return"rtl"===zv(o||n).direction&&(s+=sv(n.clientWidth,o?o.clientWidth:0)-a),{width:a,height:i,x:s,y:u}}(ud(e)))}function xq(e){const t=sy(e),n=["absolute","fixed"].includes(zv(e).position)&&hu(e)?QS(e):e;return gd(n)?t.filter((e=>gd(e)&&function(e,t){const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&A$(n)){let n=t;do{if(n&&e===n)return!0;n=n.parentNode||n.host}while(n)}return!1}(e,n)&&"body"!==_l(e))):[]}const Sq={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[..."clippingAncestors"===n?xq(t):[].concat(n),r],i=a[0],s=a.reduce(((e,n)=>{const r=o2(t,n,o);return e.top=sv(r.top,e.top),e.right=t2(r.right,e.right),e.bottom=t2(r.bottom,e.bottom),e.left=sv(r.left,e.left),e}),o2(t,i,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=hu(n),a=ud(n);if(n===a)return t;let i={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((o||!o&&"fixed"!==r)&&(("body"!==_l(n)||Yy(a))&&(i=Qy(n)),hu(n))){const e=xl(n,!0);s.x=e.x+n.clientLeft,s.y=e.y+n.clientTop}return{...t,x:t.x-i.scrollLeft+s.x,y:t.y-i.scrollTop+s.y}},isElement:gd,getDimensions:r2,getOffsetParent:QS,getDocumentElement:ud,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:_q(t,QS(n),r),floating:{...r2(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===zv(e).direction};function Eq(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i=!0,animationFrame:s=!1}=r,u=o&&!s,l=a&&!s,c=u||l?[...gd(e)?sy(e):[],...sy(t)]:[];c.forEach((e=>{u&&e.addEventListener("scroll",n,{passive:!0}),l&&e.addEventListener("resize",n)}));let d,f=null;if(i){let r=!0;f=new ResizeObserver((()=>{r||n(),r=!1})),gd(e)&&!s&&f.observe(e),f.observe(t)}let p=s?xl(e):null;return s&&function t(){const r=xl(e);!p||r.x===p.x&&r.y===p.y&&r.width===p.width&&r.height===p.height||n(),p=r,d=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach((e=>{u&&e.removeEventListener("scroll",n),l&&e.removeEventListener("resize",n)})),null==(e=f)||e.disconnect(),f=null,s&&cancelAnimationFrame(d)}}const $q=(e,t,n)=>lq(e,t,{platform:Sq,...n});var XS=typeof document<"u"?v.useLayoutEffect:v.useEffect;function JS(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;0!=r--;)if(!JS(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||JS(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function Cq(e){const t=v.useRef(e);return XS((()=>{t.current=e})),t}function Iq(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:o}=void 0===e?{}:e;const a=v.useRef(null),i=v.useRef(null),s=Cq(o),u=v.useRef(null),[l,c]=v.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[d,f]=v.useState(t);JS(null==d?void 0:d.map((e=>{let{options:t}=e;return t})),null==t?void 0:t.map((e=>{let{options:t}=e;return t})))||f(t);const p=v.useCallback((()=>{!a.current||!i.current||$q(a.current,i.current,{middleware:d,placement:n,strategy:r}).then((e=>{m.current&&vu.flushSync((()=>{c(e)}))}))}),[d,n,r]);XS((()=>{m.current&&p()}),[p]);const m=v.useRef(!1);XS((()=>(m.current=!0,()=>{m.current=!1})),[]);const h=v.useCallback((()=>{if("function"==typeof u.current&&(u.current(),u.current=null),a.current&&i.current)if(s.current){const e=s.current(a.current,i.current,p);u.current=e}else p()}),[p,s]),g=v.useCallback((e=>{a.current=e,h()}),[h]),y=v.useCallback((e=>{i.current=e,h()}),[h]),b=v.useMemo((()=>({reference:a,floating:i})),[]);return v.useMemo((()=>({...l,update:p,refs:b,reference:g,floating:y})),[l,p,b,g,y])}const Rq=e=>{const{element:t,padding:n}=e;return{name:"arrow",options:e,fn:e=>function(e){return Object.prototype.hasOwnProperty.call(e,"current")}(t)?null!=t.current?QT({element:t.current,padding:n}).fn(e):{}:t?QT({element:t,padding:n}).fn(e):{}}};function Pq(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function Tq(...e){return t=>e.forEach((e=>Pq(e,t)))}const fk=v.forwardRef(((e,t)=>{const{children:n,...r}=e,o=v.Children.toArray(n),a=o.find(Aq);if(a){const e=a.props.children,n=o.map((t=>t===a?v.Children.count(e)>1?v.Children.only(null):v.isValidElement(e)?e.props.children:null:t));return v.createElement(ZS,Pe({},r,{ref:t}),v.isValidElement(e)?v.cloneElement(e,void 0,n):null)}return v.createElement(ZS,Pe({},r,{ref:t}),n)}));fk.displayName="Slot";const ZS=v.forwardRef(((e,t)=>{const{children:n,...r}=e;return v.isValidElement(n)?v.cloneElement(n,{...Mq(r,n.props),ref:Tq(t,n.ref)}):v.Children.count(n)>1?v.Children.only(null):null}));ZS.displayName="SlotClone";const Oq=({children:e})=>v.createElement(v.Fragment,null,e);function Aq(e){return v.isValidElement(e)&&e.type===Oq}function Mq(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{a(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}const Dq=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],eE=Dq.reduce(((e,t)=>{const n=v.forwardRef(((e,n)=>{const{asChild:r,...o}=e,a=r?fk:t;return v.useEffect((()=>{window[Symbol.for("radix-ui")]=!0}),[]),v.createElement(a,Pe({},o,{ref:n}))}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});function Nq(e,t){e&&vu.flushSync((()=>e.dispatchEvent(t)))}function kq(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function Lq(...e){return t=>e.forEach((e=>kq(e,t)))}function Fq(...e){return v.useCallback(Lq(...e),e)}const Lf=null!=globalThis&&globalThis.document?v.useLayoutEffect:()=>{};function Bq(e){const[t,n]=v.useState(void 0);return Lf((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t)||!t.length)return;const r=t[0];let o,a;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,a=t.blockSize}else o=e.offsetWidth,a=e.offsetHeight;n({width:o,height:a})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}const pk="Popper",[M$,mk]=nk(pk),[cZ,jq]=M$(pk),uy="PopperContent",[zq,dZ]=M$(uy),[Vq,Uq]=M$(uy,{hasParent:!1,positionUpdateFns:new Set}),Wq=v.forwardRef(((e,t)=>{var n,r,o,a,i,s,u,l;const{__scopePopper:c,side:d="bottom",sideOffset:f=0,align:p="center",alignOffset:m=0,arrowPadding:h=0,collisionBoundary:g=[],collisionPadding:y=0,sticky:b="partial",hideWhenDetached:w=!1,avoidCollisions:x=!0,onPlaced:_,...E}=e,S=jq(uy,c),[I,A]=v.useState(null),k=Fq(t,(e=>A(e))),[C,P]=v.useState(null),R=Bq(C),O=null!==(n=null==R?void 0:R.width)&&void 0!==n?n:0,T=null!==(r=null==R?void 0:R.height)&&void 0!==r?r:0,N=d+("center"!==p?"-"+p:""),M="number"==typeof y?y:{top:0,right:0,bottom:0,left:0,...y},j=Array.isArray(g)?g:[g],D=j.length>0,q={padding:M,boundary:j.filter(Gq),altBoundary:D},{reference:z,floating:L,strategy:$,x:V,y:B,placement:F,middlewareData:U,update:G}=Iq({strategy:"fixed",placement:N,whileElementsMounted:Eq,middleware:[Hq(),vq({mainAxis:f+T,alignmentAxis:m}),x?gq({mainAxis:!0,crossAxis:!1,limiter:"partial"===b?yq():void 0,...q}):void 0,C?Rq({element:C,padding:h}):void 0,x?mq({...q}):void 0,wq({...q,apply:({elements:e,availableWidth:t,availableHeight:n})=>{e.floating.style.setProperty("--radix-popper-available-width",`${t}px`),e.floating.style.setProperty("--radix-popper-available-height",`${n}px`)}}),Kq({arrowWidth:O,arrowHeight:T}),w?hq({strategy:"referenceHidden"}):void 0].filter(qq)});Lf((()=>{z(S.anchor)}),[z,S.anchor]);const W=null!==V&&null!==B,[H,Q]=hk(F),K=Ky(_);Lf((()=>{W&&(null==K||K())}),[W,K]);const Y=null===(o=U.arrow)||void 0===o?void 0:o.x,J=null===(a=U.arrow)||void 0===a?void 0:a.y,X=0!==(null===(i=U.arrow)||void 0===i?void 0:i.centerOffset),[Z,ee]=v.useState();Lf((()=>{I&&ee(window.getComputedStyle(I).zIndex)}),[I]);const{hasParent:te,positionUpdateFns:ne}=Uq(uy,c),re=!te;v.useLayoutEffect((()=>{if(!re)return ne.add(G),()=>{ne.delete(G)}}),[re,ne,G]),Lf((()=>{re&&W&&Array.from(ne).reverse().forEach((e=>requestAnimationFrame(e)))}),[re,W,ne]);const oe={"data-side":H,"data-align":Q,...E,ref:k,style:{...E.style,animation:W?void 0:"none",opacity:null!==(s=U.hide)&&void 0!==s&&s.referenceHidden?0:void 0}};return v.createElement("div",{ref:L,"data-radix-popper-content-wrapper":"",style:{position:$,left:0,top:0,transform:W?`translate3d(${Math.round(V)}px, ${Math.round(B)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:Z,"--radix-popper-transform-origin":[null===(u=U.transformOrigin)||void 0===u?void 0:u.x,null===(l=U.transformOrigin)||void 0===l?void 0:l.y].join(" ")},dir:e.dir},v.createElement(zq,{scope:c,placedSide:H,onArrowChange:P,arrowX:Y,arrowY:J,shouldHideArrow:X},re?v.createElement(Vq,{scope:c,hasParent:!0,positionUpdateFns:ne},v.createElement(eE.div,oe)):v.createElement(eE.div,oe)))}));function qq(e){return void 0!==e}function Gq(e){return null!==e}const Hq=()=>({name:"anchorCssProperties",fn(e){const{rects:t,elements:n}=e,{width:r,height:o}=t.reference;return n.floating.style.setProperty("--radix-popper-anchor-width",`${r}px`),n.floating.style.setProperty("--radix-popper-anchor-height",`${o}px`),{}}}),Kq=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,a,i;const{placement:s,rects:u,middlewareData:l}=t,c=0!==(null===(n=l.arrow)||void 0===n?void 0:n.centerOffset),d=c?0:e.arrowWidth,f=c?0:e.arrowHeight,[p,m]=hk(s),v={start:"0%",center:"50%",end:"100%"}[m],h=(null!==(r=null===(o=l.arrow)||void 0===o?void 0:o.x)&&void 0!==r?r:0)+d/2,g=(null!==(a=null===(i=l.arrow)||void 0===i?void 0:i.y)&&void 0!==a?a:0)+f/2;let y="",b="";return"bottom"===p?(y=c?v:`${h}px`,b=-f+"px"):"top"===p?(y=c?v:`${h}px`,b=`${u.floating.height+f}px`):"right"===p?(y=-f+"px",b=c?v:`${g}px`):"left"===p&&(y=`${u.floating.width+f}px`,b=c?v:`${g}px`),{data:{x:y,y:b}}}});function hk(e){const[t,n="center"]=e.split("-");return[t,n]}const Yq=Wq;function Qq(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function Xq(...e){return t=>e.forEach((e=>Qq(e,t)))}function Jq(...e){return v.useCallback(Xq(...e),e)}function Zq(e,t){return v.useReducer(((e,n)=>t[e][n]??e),e)}const vk=e=>{const{present:t,children:n}=e,r=eG(t),o="function"==typeof n?n({present:r.isPresent}):v.Children.only(n),a=Jq(r.ref,o.ref);return"function"==typeof n||r.isPresent?v.cloneElement(o,{ref:a}):null};function eG(e){const[t,n]=v.useState(),r=v.useRef({}),o=v.useRef(e),a=v.useRef("none"),i=e?"mounted":"unmounted",[s,u]=Zq(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect((()=>{const e=Dg(r.current);a.current="mounted"===s?e:"none"}),[s]),Lf((()=>{const t=r.current,n=o.current;if(n!==e){const r=a.current,i=Dg(t);e?u("MOUNT"):"none"===i||"none"===(null==t?void 0:t.display)?u("UNMOUNT"):u(n&&r!==i?"ANIMATION_OUT":"UNMOUNT"),o.current=e}}),[e,u]),Lf((()=>{if(t){const e=e=>{const n=Dg(r.current).includes(e.animationName);e.target===t&&n&&vu.flushSync((()=>u("ANIMATION_END")))},n=e=>{e.target===t&&(a.current=Dg(r.current))};return t.addEventListener("animationstart",n),t.addEventListener("animationcancel",e),t.addEventListener("animationend",e),()=>{t.removeEventListener("animationstart",n),t.removeEventListener("animationcancel",e),t.removeEventListener("animationend",e)}}u("ANIMATION_END")}),[t,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:v.useCallback((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}function Dg(e){return(null==e?void 0:e.animationName)||"none"}function tG(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function nG(...e){return t=>e.forEach((e=>tG(e,t)))}function rG(...e){return v.useCallback(nG(...e),e)}function oG(e,t=(null==globalThis?void 0:globalThis.document)){const n=Ky(e);v.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e),()=>t.removeEventListener("keydown",e)}),[n,t])}vk.displayName="Presence";const tE="dismissableLayer.update",iG="dismissableLayer.pointerDownOutside",aG="dismissableLayer.focusOutside";let i2;const sG=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),uG=v.forwardRef(((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:s,onDismiss:u,...l}=e,c=v.useContext(sG),[d,f]=v.useState(null),p=null!==(n=null==d?void 0:d.ownerDocument)&&void 0!==n?n:null==globalThis?void 0:globalThis.document,[,m]=v.useState({}),h=rG(t,(e=>f(e))),g=Array.from(c.layers),[y]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),b=g.indexOf(y),w=d?g.indexOf(d):-1,x=c.layersWithOutsidePointerEventsDisabled.size>0,_=w>=b,E=lG((e=>{const t=e.target,n=[...c.branches].some((e=>e.contains(t)));!_||n||(null==a||a(e),null==s||s(e),e.defaultPrevented||null==u||u())}),p),S=cG((e=>{const t=e.target;[...c.branches].some((e=>e.contains(t)))||(null==i||i(e),null==s||s(e),e.defaultPrevented||null==u||u())}),p);return oG((e=>{w===c.layers.size-1&&(null==o||o(e),!e.defaultPrevented&&u&&(e.preventDefault(),u()))}),p),v.useEffect((()=>{if(d)return r&&(0===c.layersWithOutsidePointerEventsDisabled.size&&(i2=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),a2(),()=>{r&&1===c.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=i2)}}),[d,p,r,c]),v.useEffect((()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),a2())}),[d,c]),v.useEffect((()=>{const e=()=>m({});return document.addEventListener(tE,e),()=>document.removeEventListener(tE,e)}),[]),v.createElement(eE.div,Pe({},l,{ref:h,style:{pointerEvents:x?_?"auto":"none":void 0,...e.style},onFocusCapture:jf(e.onFocusCapture,S.onFocusCapture),onBlurCapture:jf(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:jf(e.onPointerDownCapture,E.onPointerDownCapture)}))}));function lG(e,t=(null==globalThis?void 0:globalThis.document)){const n=Ky(e),r=v.useRef(!1),o=v.useRef((()=>{}));return v.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){gk(iG,n,a,{discrete:!0})};const a={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}r.current=!1},a=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}function cG(e,t=(null==globalThis?void 0:globalThis.document)){const n=Ky(e),r=v.useRef(!1);return v.useEffect((()=>{const e=e=>{e.target&&!r.current&&gk(aG,n,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function a2(){const e=new CustomEvent(tE);document.dispatchEvent(e)}function gk(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Nq(o,a):o.dispatchEvent(a)}let Sx;const yk="HoverCard",[wk,fZ]=nk(yk,[mk]),dG=mk(),[pZ,bk]=wk(yk),fG="HoverCardPortal",[mZ,pG]=wk(fG,{forceMount:void 0}),nE="HoverCardContent",mG=v.forwardRef(((e,t)=>{const n=pG(nE,e.__scopeHoverCard),{forceMount:r=n.forceMount,...o}=e,a=bk(nE,e.__scopeHoverCard);return v.createElement(vk,{present:r||a.open},v.createElement(hG,Pe({"data-state":a.open?"open":"closed"},o,{onPointerEnter:jf(e.onPointerEnter,s2(a.onOpen)),onPointerLeave:jf(e.onPointerLeave,s2(a.onClose)),ref:t})))})),hG=v.forwardRef(((e,t)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,...s}=e,u=bk(nE,n),l=dG(n),c=v.useRef(null),d=uq(t,c),[f,p]=v.useState(!1);return v.useEffect((()=>{if(f){const e=document.body;return Sx=e.style.userSelect||e.style.webkitUserSelect,e.style.userSelect="none",e.style.webkitUserSelect="none",()=>{e.style.userSelect=Sx,e.style.webkitUserSelect=Sx}}}),[f]),v.useEffect((()=>{if(c.current){const e=()=>{p(!1),u.isPointerDownOnContentRef.current=!1,setTimeout((()=>{var e;""!==(null===(e=document.getSelection())||void 0===e?void 0:e.toString())&&(u.hasSelectionRef.current=!0)}))};return document.addEventListener("pointerup",e),()=>{document.removeEventListener("pointerup",e),u.hasSelectionRef.current=!1,u.isPointerDownOnContentRef.current=!1}}}),[u.isPointerDownOnContentRef,u.hasSelectionRef]),v.useEffect((()=>{c.current&&vG(c.current).forEach((e=>e.setAttribute("tabindex","-1")))})),v.createElement(uG,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:i,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:jf(a,(e=>{e.preventDefault()})),onDismiss:u.onDismiss},v.createElement(Yq,Pe({},l,s,{onPointerDown:jf(s.onPointerDown,(e=>{e.currentTarget.contains(e.target)&&p(!0),u.hasSelectionRef.current=!1,u.isPointerDownOnContentRef.current=!0})),ref:d,style:{...s.style,userSelect:f?"text":void 0,WebkitUserSelect:f?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})))}));function s2(e){return t=>"touch"===t.pointerType?void 0:e()}function vG(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}const _k=mG,gG=v.forwardRef((({className:e,align:t="center",sideOffset:n=4,...r},o)=>G.jsx(_k,{ref:o,align:t,sideOffset:n,className:_e("z-50 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})));gG.displayName=_k.displayName;const xk=v.forwardRef((({className:e,type:t,...n},r)=>{const{error:o}=bd();return G.jsx("input",{type:t,title:n.disabled?"Disabled":"",className:_e("flex w-full rounded-m px-s py-3.5 text-base text-gray-900 outline outline-1 outline-input ring-offset-background transition-all duration-200 ease-in-out file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-base placeholder:text-gray-400 placeholder:text-muted-foreground focus-visible:bg-gray-50 focus-visible:text-gray-900 focus-visible:outline-2 focus-visible:outline-blue_120 enabled:hover:outline-2 enabled:hover:outline-gray-400 disabled:bg-transparent disabled:text-gray-300 disabled:outline-gray-200 disabled:ring-0 disabled:ring-transparent disabled:placeholder:text-gray-300",{"bg-red_30_17 outline-red-dark":!!o},e),ref:r,...n})}));function yG(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>v.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return v.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=v.createContext(r),a=n.length;n=[...n,r];const i=t=>{var n;const{scope:r,children:i,...s}=t,u=(null==(n=null==r?void 0:r[e])?void 0:n[a])||o,l=v.useMemo((()=>s),Object.values(s));return G.jsx(u.Provider,{value:l,children:i})};return i.displayName=t+"Provider",[i,function(n,i){var s;const u=(null==(s=null==i?void 0:i[e])?void 0:s[a])||o,l=v.useContext(u);if(l)return l;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},wG(r,...t)]}function wG(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return v.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}function u2(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function bG(...e){return t=>{let n=!1;const r=e.map((e=>{const r=u2(e,t);return!n&&"function"==typeof r&&(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():u2(e[t],null)}}}}function _G(e){const t=xG(e),n=v.forwardRef(((e,n)=>{const{children:r,...o}=e,a=v.Children.toArray(r),i=a.find(EG);if(i){const e=i.props.children,r=a.map((t=>t===i?v.Children.count(e)>1?v.Children.only(null):v.isValidElement(e)?e.props.children:null:t));return G.jsx(t,{...o,ref:n,children:v.isValidElement(e)?v.cloneElement(e,void 0,r):null})}return G.jsx(t,{...o,ref:n,children:r})}));return n.displayName=`${e}.Slot`,n}function xG(e){const t=v.forwardRef(((e,t)=>{const{children:n,...r}=e;if(v.isValidElement(n)){const e=CG(n),o=$G(r,n.props);return n.type!==v.Fragment&&(o.ref=t?bG(t,e):e),v.cloneElement(n,o)}return v.Children.count(n)>1?v.Children.only(null):null}));return t.displayName=`${e}.SlotClone`,t}xk.displayName="Input";var SG=Symbol("radix.slottable");function EG(e){return v.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===SG}function $G(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{const t=a(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function CG(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?e.ref:(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var IG=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Sk=IG.reduce(((e,t)=>{const n=_G(`Primitive.${t}`),r=v.forwardRef(((e,r)=>{const{asChild:o,...a}=e,i=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),G.jsx(i,{...a,ref:r})}));return r.displayName=`Primitive.${t}`,{...e,[t]:r}}),{}),D$="Progress",N$=100,[RG,hZ]=yG(D$),[PG,TG]=RG(D$),Ek=v.forwardRef(((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:a=OG,...i}=e;(o||0===o)&&!l2(o)&&console.error(AG(`${o}`,"Progress"));const s=l2(o)?o:N$;null!==r&&!c2(r,s)&&console.error(MG(`${r}`,"Progress"));const u=c2(r,s)?r:null,l=ly(u)?a(u,s):void 0;return G.jsx(PG,{scope:n,value:u,max:s,children:G.jsx(Sk.div,{"aria-valuemax":s,"aria-valuemin":0,"aria-valuenow":ly(u)?u:void 0,"aria-valuetext":l,role:"progressbar","data-state":Ik(u,s),"data-value":u??void 0,"data-max":s,...i,ref:t})})}));Ek.displayName=D$;var $k="ProgressIndicator",Ck=v.forwardRef(((e,t)=>{const{__scopeProgress:n,...r}=e,o=TG($k,n);return G.jsx(Sk.div,{"data-state":Ik(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})}));function OG(e,t){return`${Math.round(e/t*100)}%`}function Ik(e,t){return null==e?"indeterminate":e===t?"complete":"loading"}function ly(e){return"number"==typeof e}function l2(e){return ly(e)&&!isNaN(e)&&e>0}function c2(e,t){return ly(e)&&!isNaN(e)&&e<=t&&e>=0}function AG(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${N$}\`.`}function MG(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:\n - a positive number\n - less than the value passed to \`max\` (or ${N$} if no \`max\` prop is set)\n - \`null\` or \`undefined\` if the progress is indeterminate.\n\nDefaulting to \`null\`.`}Ck.displayName=$k;var Rk=Ek,DG=Ck;const NG=v.forwardRef((({className:e,value:t,indicatorClassName:n,...r},o)=>G.jsx(Rk,{ref:o,className:_e("relative h-[7px] w-full overflow-hidden rounded-full bg-blue_10",e),...r,children:G.jsx(DG,{className:_e("h-full w-full flex-1 rounded-full bg-blue_100 transition-all",n),style:{transform:`translateX(-${100-(t||0)}%)`}})})));NG.displayName=Rk.displayName;const Pk="Radio",[kG,Tk]=ni(Pk),[LG,FG]=kG(Pk),BG=v.forwardRef(((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:a,disabled:i,value:s="on",onCheck:u,...l}=e,[c,d]=v.useState(null),f=Vt(t,(e=>d(e))),p=v.useRef(!1),m=!c||!!c.closest("form");return v.createElement(LG,{scope:n,checked:o,disabled:i},v.createElement(lt.button,Pe({type:"button",role:"radio","aria-checked":o,"data-state":Ok(o),"data-disabled":i?"":void 0,disabled:i,value:s},l,{ref:f,onClick:et(e.onClick,(e=>{o||null==u||u(),m&&(p.current=e.isPropagationStopped(),p.current||e.stopPropagation())}))})),m&&v.createElement(VG,{control:c,bubbles:!p.current,name:r,value:s,checked:o,required:a,disabled:i,style:{transform:"translateX(-100%)"}}))})),jG="RadioIndicator",zG=v.forwardRef(((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,a=FG(jG,n);return v.createElement(ea,{present:r||a.checked},v.createElement(lt.span,Pe({"data-state":Ok(a.checked),"data-disabled":a.disabled?"":void 0},o,{ref:t})))})),VG=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,a=v.useRef(null),i=ky(n),s=Ly(t);return v.useEffect((()=>{const e=a.current,t=window.HTMLInputElement.prototype,o=Object.getOwnPropertyDescriptor(t,"checked").set;if(i!==n&&o){const t=new Event("click",{bubbles:r});o.call(e,n),e.dispatchEvent(t)}}),[i,n,r]),v.createElement("input",Pe({type:"radio","aria-hidden":!0,defaultChecked:n},o,{tabIndex:-1,ref:a,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function Ok(e){return e?"checked":"unchecked"}const UG=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Ak="RadioGroup",[WG,vZ]=ni(Ak,[qm,Tk]),Mk=qm(),Dk=Tk(),[qG,GG]=WG(Ak),HG=v.forwardRef(((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:a,required:i=!1,disabled:s=!1,orientation:u,dir:l,loop:c=!0,onValueChange:d,...f}=e,p=Mk(n),m=u$(l),[h,g]=fd({prop:a,defaultProp:o,onChange:d});return v.createElement(qG,{scope:n,name:r,required:i,disabled:s,value:h,onValueChange:g},v.createElement(y$,Pe({asChild:!0},p,{orientation:u,dir:m,loop:c}),v.createElement(lt.div,Pe({role:"radiogroup","aria-required":i,"aria-orientation":u,"data-disabled":s?"":void 0,dir:m},f,{ref:t}))))})),KG="RadioGroupItem",YG=v.forwardRef(((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,a=GG(KG,n),i=a.disabled||r,s=Mk(n),u=Dk(n),l=v.useRef(null),c=Vt(t,l),d=a.value===o.value,f=v.useRef(!1);return v.useEffect((()=>{const e=e=>{UG.includes(e.key)&&(f.current=!0)},t=()=>f.current=!1;return document.addEventListener("keydown",e),document.addEventListener("keyup",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}}),[]),v.createElement(w$,Pe({asChild:!0},s,{focusable:!i,active:d}),v.createElement(BG,Pe({disabled:i,required:a.required,checked:d},u,o,{name:a.name,ref:c,onCheck:()=>a.onValueChange(o.value),onKeyDown:et((e=>{"Enter"===e.key&&e.preventDefault()})),onFocus:et(o.onFocus,(()=>{var e;f.current&&(null===(e=l.current)||void 0===e||e.click())}))})))})),QG=v.forwardRef(((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=Dk(n);return v.createElement(zG,Pe({},o,r,{ref:t}))})),Nk=HG,kk=YG,XG=QG,JG=v.forwardRef((({className:e,...t},n)=>G.jsx(Nk,{className:_e("grid gap-2",e),...t,ref:n})));JG.displayName=Nk.displayName;const ZG=v.forwardRef((({className:e,...t},n)=>G.jsx(kk,{ref:n,className:_e("aspect-square size-6 rounded-full border border-gray-300 disabled:cursor-not-allowed disabled:border-gray-100 disabled:bg-gray-100","data-[state=checked]:border-blue_100 data-[state=checked]:bg-blue_100 hover:data-[state=checked]:border-blue_120","disabled:data-[state=checked]:border-gray-100 disabled:data-[state=checked]:bg-gray-100","transition-[border] duration-200 hover:data-[state=checked]:bg-blue_120 md:hover:border-2",e),...t,children:G.jsx(XG,{className:"flex items-center justify-center",children:G.jsx(j5,{className:"stack-animate size-2 border-none",style:{fill:t.disabled?"var(--gray-300)":"white",color:t.disabled?"var(--gray-300)":"white"}})})})));ZG.displayName=kk.displayName;const eH=FA,tH=Ey,Lk=v.forwardRef((({className:e,...t},n)=>G.jsx(Bm,{className:_e("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n})));Lk.displayName=Bm.displayName;const nH=gu("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Fk=v.forwardRef((({side:e="right",className:t,overlayClassName:n,children:r,...o},a)=>G.jsxs(tH,{children:[G.jsx(Lk,{className:_e("bg-gray-900/70",n)}),G.jsxs(jm,{ref:a,className:_e(nH({side:e}),t),...o,children:[r,G.jsxs($y,{className:"absolute right-4 top-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[G.jsx(gy,{className:"h-4 w-4"}),G.jsx("span",{className:"sr-only",children:"Close"})]})]})]})));Fk.displayName=jm.displayName;const Bk=({className:e,...t})=>G.jsx("div",{className:_e("flex flex-col space-y-2 text-center sm:text-left",e),...t});Bk.displayName="SheetHeader";const jk=v.forwardRef((({className:e,...t},n)=>G.jsx(Ov,{ref:n,className:_e("text-lg font-semibold text-foreground",e),...t})));jk.displayName=Ov.displayName;const zk=v.forwardRef((({className:e,...t},n)=>G.jsx(Av,{ref:n,className:_e("text-sm text-muted-foreground",e),...t})));zk.displayName=Av.displayName;const[Xy,gZ]=ni("Tooltip",[Wm]),Jy=Wm(),rH="TooltipProvider",oH=700,rE="tooltip.open",[iH,k$]=Xy(rH),aH=e=>{const{__scopeTooltip:t,delayDuration:n=oH,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,[i,s]=v.useState(!0),u=v.useRef(!1),l=v.useRef(0);return v.useEffect((()=>{const e=l.current;return()=>window.clearTimeout(e)}),[]),v.createElement(iH,{scope:t,isOpenDelayed:i,delayDuration:n,onOpen:v.useCallback((()=>{window.clearTimeout(l.current),s(!1)}),[]),onClose:v.useCallback((()=>{window.clearTimeout(l.current),l.current=window.setTimeout((()=>s(!0)),r)}),[r]),isPointerInTransitRef:u,onPointerInTransitChange:v.useCallback((e=>{u.current=e}),[]),disableHoverableContent:o},a)},L$="Tooltip",[sH,Vv]=Xy(L$),uH=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:a,disableHoverableContent:i,delayDuration:s}=e,u=k$(L$,e.__scopeTooltip),l=Jy(t),[c,d]=v.useState(null),f=ad(),p=v.useRef(0),m=i??u.disableHoverableContent,h=s??u.delayDuration,g=v.useRef(!1),[y=!1,b]=fd({prop:r,defaultProp:o,onChange:e=>{e?(u.onOpen(),document.dispatchEvent(new CustomEvent(rE))):u.onClose(),null==a||a(e)}}),w=v.useMemo((()=>y?g.current?"delayed-open":"instant-open":"closed"),[y]),x=v.useCallback((()=>{window.clearTimeout(p.current),g.current=!1,b(!0)}),[b]),_=v.useCallback((()=>{window.clearTimeout(p.current),b(!1)}),[b]),E=v.useCallback((()=>{window.clearTimeout(p.current),p.current=window.setTimeout((()=>{g.current=!0,b(!0)}),h)}),[h,b]);return v.useEffect((()=>()=>window.clearTimeout(p.current)),[]),v.createElement(sN,l,v.createElement(sH,{scope:t,contentId:f,open:y,stateAttribute:w,trigger:c,onTriggerChange:d,onTriggerEnter:v.useCallback((()=>{u.isOpenDelayed?E():x()}),[u.isOpenDelayed,E,x]),onTriggerLeave:v.useCallback((()=>{m?_():window.clearTimeout(p.current)}),[_,m]),onOpen:x,onClose:_,disableHoverableContent:m},n))},d2="TooltipTrigger",lH=v.forwardRef(((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Vv(d2,n),a=k$(d2,n),i=Jy(n),s=Vt(t,v.useRef(null),o.onTriggerChange),u=v.useRef(!1),l=v.useRef(!1),c=v.useCallback((()=>u.current=!1),[]);return v.useEffect((()=>()=>document.removeEventListener("pointerup",c)),[c]),v.createElement(h$,Pe({asChild:!0},i),v.createElement(lt.button,Pe({"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute},r,{ref:s,onPointerMove:et(e.onPointerMove,(e=>{"touch"!==e.pointerType&&!l.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),l.current=!0)})),onPointerLeave:et(e.onPointerLeave,(()=>{o.onTriggerLeave(),l.current=!1})),onPointerDown:et(e.onPointerDown,(()=>{u.current=!0,document.addEventListener("pointerup",c,{once:!0})})),onFocus:et(e.onFocus,(()=>{u.current||o.onOpen()})),onBlur:et(e.onBlur,o.onClose),onClick:et(e.onClick,o.onClose)})))})),Vk="TooltipPortal",[cH,dH]=Xy(Vk,{forceMount:void 0}),fH=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,a=Vv(Vk,t);return v.createElement(cH,{scope:t,forceMount:n},v.createElement(ea,{present:n||a.open},v.createElement(by,{asChild:!0,container:o},r)))},Sv="TooltipContent",Uk=v.forwardRef(((e,t)=>{const n=dH(Sv,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,i=Vv(Sv,e.__scopeTooltip);return v.createElement(ea,{present:r||i.open},i.disableHoverableContent?v.createElement(Wk,Pe({side:o},a,{ref:t})):v.createElement(pH,Pe({side:o},a,{ref:t})))})),pH=v.forwardRef(((e,t)=>{const n=Vv(Sv,e.__scopeTooltip),r=k$(Sv,e.__scopeTooltip),o=v.useRef(null),a=Vt(t,o),[i,s]=v.useState(null),{trigger:u,onClose:l}=n,c=o.current,{onPointerInTransitChange:d}=r,f=v.useCallback((()=>{s(null),d(!1)}),[d]),p=v.useCallback(((e,t)=>{const n=e.currentTarget,r={x:e.clientX,y:e.clientY},o=xH([...wH(r,yH(r,n.getBoundingClientRect())),...bH(t.getBoundingClientRect())]);s(o),d(!0)}),[d]);return v.useEffect((()=>()=>f()),[f]),v.useEffect((()=>{if(u&&c){const e=e=>p(e,c),t=e=>p(e,u);return u.addEventListener("pointerleave",e),c.addEventListener("pointerleave",t),()=>{u.removeEventListener("pointerleave",e),c.removeEventListener("pointerleave",t)}}}),[u,c,p,f]),v.useEffect((()=>{if(i){const e=e=>{const t=e.target,n={x:e.clientX,y:e.clientY},r=(null==u?void 0:u.contains(t))||(null==c?void 0:c.contains(t)),o=!_H(n,i);r?f():o&&(f(),l())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}}),[u,c,i,l,f]),v.createElement(Wk,Pe({},e,{ref:a}))})),[mH,hH]=Xy(L$,{isInside:!1}),Wk=v.forwardRef(((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:i,...s}=e,u=Vv(Sv,n),l=Jy(n),{onClose:c}=u;return v.useEffect((()=>(document.addEventListener(rE,c),()=>document.removeEventListener(rE,c))),[c]),v.useEffect((()=>{if(u.trigger){const e=e=>{const t=e.target;null!=t&&t.contains(u.trigger)&&c()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}}),[u.trigger,c]),v.createElement(wy,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:c},v.createElement(v$,Pe({"data-state":u.stateAttribute},l,s,{ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),v.createElement(xE,null,r),v.createElement(mH,{scope:n,isInside:!0},v.createElement(JU,{id:u.contentId,role:"tooltip"},o||r))))})),vH="TooltipArrow",gH=v.forwardRef(((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Jy(n);return hH(vH,n).isInside?null:v.createElement(EV,Pe({},o,r,{ref:t}))}));function yH(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function wH(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}function bH(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function _H(e,t){const{x:n,y:r}=e;let o=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){const i=t[e].x,s=t[e].y,u=t[a].x,l=t[a].y;s>r!=l>r&&n<(u-i)*(r-s)/(l-s)+i&&(o=!o)}return o}function xH(e){const t=e.slice();return t.sort(((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0)),SH(t)}function SH(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const r=e[n];for(;t.length>=2;){const e=t[t.length-1],n=t[t.length-2];if(!((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x)))break;t.pop()}t.push(r)}t.pop();const n=[];for(let t=e.length-1;t>=0;t--){const r=e[t];for(;n.length>=2;){const e=n[n.length-1],t=n[n.length-2];if(!((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x)))break;n.pop()}n.push(r)}return n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}const EH=fH,qk=Uk,$H=gH,CH=()=>{const e=window.innerWidth;return e<768?"mobile":e<1024?"tablet":"desktop"},IH=e=>{if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)},RH=e=>IH(e)&&"type"in e&&"string"==typeof e.type,wt=e=>{const t=t=>({type:e,payload:t});return t.toString=()=>`${e}`,t.type=e,t.match=t=>RH(t)&&t.type===e,t};wt("remoteReady"),wt("askLogin"),wt("reselectUser"),wt("requestLogout");const PH=wt("setConfirmLeavePage"),TH=wt("requestChangePath");wt("wsSubscribe"),wt("wsUnSubscribe"),wt("hostStoreConnect"),wt("remoteLogin");const OH=wt("remoteLogout");wt("wsOnMessage");const AH=wt("setRouterPath"),MH=wt("setDeviceType"),DH=wt("setDeviceWidth"),NH=wt("setUserError"),kH=wt("setUserIsError"),LH=wt("setUserPending"),FH=wt("setUserSuccess"),BH=wt("setUserData"),jH=wt("updateAccountData"),zH=wt("updateUser"),VH=wt("addNotification"),UH=wt("markNotification"),WH=wt("setNotificationsError"),qH=wt("setNotificationsList"),GH=wt("setNotificationsPending"),HH=wt("setNotificationsTotalCount"),KH=wt("setNotificationsUnreadCount"),YH=wt("acceptAllFollowRequests"),QH=wt("resetNotificationsState"),XH=wt("undoNotification"),JH=wt("setInstanceInfo"),ZH=wt("setInstanceInfoPending"),eK=wt("setInstanceInfoError"),tK=wt("setPlatformSettings"),nK=wt("setProfileSettings");wt("setGroupData"),wt("setGroupLoading"),wt("requestLocalStorageGet"),wt("requestLocalStorageSet"),wt("requestLocalStorageRemove"),wt("requestLocalStorageClear"),wt("requestLocalStorageKeys"),wt("requestLocalStorageHas"),wt("sendLocalStorageResponse"),wt("sendLocalStorageChanged");const uv="8.48.0",$l=globalThis;function F$(e,t,n){const r=$l,o=r.__SENTRY__=r.__SENTRY__||{},a=o[uv]=o[uv]||{};return a[e]||(a[e]=t())}const Gk=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,rK="Sentry Logger ",f2=["debug","info","warn","error","log","assert","trace"],p2={};function oK(e){if(!("console"in $l))return e();const t=$l.console,n={},r=Object.keys(p2);r.forEach((e=>{const r=p2[e];n[e]=t[e],t[e]=r}));try{return e()}finally{r.forEach((e=>{t[e]=n[e]}))}}function iK(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return Gk?f2.forEach((n=>{t[n]=(...t)=>{e&&oK((()=>{$l.console[n](`${rK}[${n}]:`,...t)}))}})):f2.forEach((e=>{t[e]=()=>{}})),t}const Ug=F$("logger",iK);function B$(){return j$($l),$l}function j$(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||uv,t[uv]=t[uv]||{}}const aK=Object.prototype.toString;function sK(e,t){return aK.call(e)===`[object ${t}]`}function uK(e){return sK(e,"Object")}function lK(e){return!(!e||!e.then||"function"!=typeof e.then)}function cK(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{Gk&&Ug.log(`Failed to add non-enumerable property "${t}" to object`,e)}}const Hk=1e3;function Kk(){return Date.now()/Hk}function dK(){const{performance:e}=$l;if(!e||!e.now)return Kk;const t=Date.now()-e.now(),n=null==e.timeOrigin?t:e.timeOrigin;return()=>(n+e.now())/Hk}const fK=dK();function Tm(){const e=$l,t=e.crypto||e.msCrypto;let n=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{const e=new Uint8Array(1);return t.getRandomValues(e),e[0]})}catch{}return"10000000100040008000100000000000".replace(/[018]/g,(e=>(e^(15&n())>>e/4).toString(16)))}function pK(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||fK(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:Tm()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{const t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function m2(){return Tm()}function h2(){return Tm().substring(16)}function Yk(e,t,n=2){if(!t||"object"!=typeof t||n<=0)return t;if(e&&t&&0===Object.keys(t).length)return e;const r={...e};for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=Yk(r[e],t[e],n-1));return r}(()=>{const{performance:e}=$l;if(!e||!e.now)return;const t=36e5,n=e.now(),r=Date.now(),o=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,a=o<t,i=e.timing&&e.timing.navigationStart,s="number"==typeof i?Math.abs(i+n-r):t;(a||s<t)&&(o<=s&&e.timeOrigin)})();const oE="_sentrySpan";function v2(e,t){t?cK(e,oE,t):delete e[oE]}function g2(e){return e[oE]}const mK=100;class z${constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:m2(),spanId:h2()}}clone(){const e=new z$;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,v2(e,g2(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&pK(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const t="function"==typeof e?e(this):e,[n,r]=t instanceof Ev?[t.getScopeData(),t.getRequestSession()]:uK(t)?[e,e.requestSession]:[],{tags:o,extra:a,user:i,contexts:s,level:u,fingerprint:l=[],propagationContext:c}=n||{};return this._tags={...this._tags,...o},this._extra={...this._extra,...a},this._contexts={...this._contexts,...s},i&&Object.keys(i).length&&(this._user=i),u&&(this._level=u),l.length&&(this._fingerprint=l),c&&(this._propagationContext=c),r&&(this._requestSession=r),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,v2(this,void 0),this._attachments=[],this.setPropagationContext({traceId:m2()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:mK;if(n<=0)return this;const r={timestamp:Kk(),...e},o=this._breadcrumbs;return o.push(r),this._breadcrumbs=o.length>n?o.slice(-n):o,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:g2(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=Yk(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext={spanId:h2(),...e},this}getPropagationContext(){return this._propagationContext}captureException(e,t){const n=t&&t.event_id?t.event_id:Tm();if(!this._client)return Ug.warn("No client configured on scope - will not capture exception!"),n;const r=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},this),n}captureMessage(e,t,n){const r=n&&n.event_id?n.event_id:Tm();if(!this._client)return Ug.warn("No client configured on scope - will not capture message!"),r;const o=new Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:o,...n,event_id:r},this),r}captureEvent(e,t){const n=t&&t.event_id?t.event_id:Tm();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(Ug.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((e=>{e(this)})),this._notifyingListeners=!1)}}const Ev=z$;function hK(){return F$("defaultCurrentScope",(()=>new Ev))}function vK(){return F$("defaultIsolationScope",(()=>new Ev))}class gK{constructor(e,t){let n,r;n=e||new Ev,r=t||new Ev,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){const t=this._pushScope();let n;try{n=e(t)}catch(e){throw this._popScope(),e}return lK(n)?n.then((e=>(this._popScope(),e)),(e=>{throw this._popScope(),e})):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}}function Lm(){const e=j$(B$());return e.stack=e.stack||new gK(hK(),vK())}function yK(e){return Lm().withScope(e)}function wK(e,t){const n=Lm();return n.withScope((()=>(n.getStackTop().scope=e,t(e))))}function y2(e){return Lm().withScope((()=>e(Lm().getIsolationScope())))}function bK(){return{withIsolationScope:y2,withScope:yK,withSetScope:wK,withSetIsolationScope:(e,t)=>y2(t),getCurrentScope:()=>Lm().getScope(),getIsolationScope:()=>Lm().getIsolationScope()}}function Qk(e){const t=j$(e);return t.acs?t.acs:bK()}function Xk(){return Qk(B$()).getCurrentScope()}function _K(){return Qk(B$()).getIsolationScope()}function xK(e,t){return Xk().captureException(e,void 0)}function SK(e,t){const n={captureContext:t};return Xk().captureMessage(e,void 0,n)}function EK(e,t){_K().setExtra(e,t)}const $K=(...e)=>{let t="";for(const n of e){if(n instanceof Error){const e=n;return EK("exceptionMessage",t),void xK(e)}if("object"!=typeof n)t+=n;else try{t+=" "+JSON.stringify(n)}catch{t+=" "+n}}SK(t)},Zy=()=>"object"!=typeof window,CK="wlsy",Jk=()=>{try{return window.localStorage}catch(e){console.warn("Error getting window.localStorage storage",e)}},IK=()=>{const e=new Set,t=Jk();if(!t)return[];for(let n=0;n<(null==t?void 0:t.length);n+=1){const r=null==t?void 0:t.key(n);"string"==typeof r&&e.add(r)}return Array.from(e)},V$=e=>{const t=`${CK}${e?`:${e}`:""}`,n=e=>`${t}:${e}`,r=()=>IK().filter((e=>e.startsWith(`${t}:`))),o=e=>e.slice(t.length+1),a=Jk(),i=e=>{try{return null==a?void 0:a.getItem(n(e))}catch{return null}},s=(e,t)=>{try{null==a||a.setItem(n(e),String(t))}catch{return}};return{getItem:i,setItem:s,removeItem:e=>{try{null==a||a.removeItem(n(e))}catch{return}},clear:()=>{try{r().forEach((e=>null==a?void 0:a.removeItem(e)))}catch{return}},keys:()=>r().map(o),has:e=>null!==i(e),getJSON:e=>{const t=i(e);if(null==t)return null;try{return JSON.parse(t)}catch{return null}},setJSON:(e,t)=>{try{s(e,JSON.stringify(t))}catch{return}}}},w2=["debug","info","warn","error"],RK=(e,t)=>{const n=w2.indexOf(e);return w2.indexOf(t)>=n},Ng=(e,t,n,...r)=>{RK(t,e)&&console.log(`[${e}] ${n}`,...r)},PK=()=>V$().getItem("logger_lvl"),TK=(e=(Zy()?"info":PK()||"warn"))=>{let t=e;return{debug:(e,...n)=>Ng("debug",t,e,...n),info:(e,...n)=>Ng("info",t,e,...n),warn:(e,...n)=>Ng("warn",t,e,...n),error:(e,...n)=>($K(e,...n),Ng("error",t,e,...n)),setLevel:e=>{t=e},getLevel:()=>t}},ap=TK(),OK=e=>{try{const{type:t,payload:n}=e,r={type:t};return void 0!==n&&(r.payload=JSON.parse(JSON.stringify(n))),r}catch(t){return ap.warn(`Could not serialize action type: ${e.type}`,t),{type:e.type,payload:`[Non-serializable payload for action: ${e.type}]`}}},Zk=({action:e,windowElement:t,whitelist:n})=>{if(t)try{const{type:r}=e;if(!n.some((({type:e})=>e===r||"*"===e)))return;const o=OK(e);t.postMessage(o,"*")}catch(e){ap.error("Failed to process or send message:",e)}},e3=({onMessage:e,whitelist:t,sourceWindow:n})=>{const r=r=>{const o=r.origin===window.location.origin,a=!n||r.source===n,i=r.data&&"object"==typeof r.data&&"type"in r.data,s=t.some((({type:e})=>e===r.data.type||"*"===e));!o&&a&&i&&s&&e(r.data)};return window.addEventListener("message",r),()=>{window.removeEventListener("message",r)}},Cm=()=>{try{return window.self!==window.top}catch{return!0}},b2=Vn("requestMicroFrontendFetch"),AK=Vn("sendMicroFrontendFetchResponse"),MK={deviceType:CH(),deviceWidth:window.innerWidth},t3=oo({name:"ui",initialState:MK,reducers:{},extraReducers:e=>{e.addCase(MH,((e,{payload:t})=>{e.deviceType=t})),e.addCase(DH,((e,{payload:t})=>{e.deviceWidth=t}))},selectors:{selectDeviceType:e=>e.deviceType,selectDeviceWidth:e=>e.deviceWidth,selectIsMobile:e=>"mobile"===e.deviceType,selectIsTablet:e=>"tablet"===e.deviceType,selectIsDesktop:e=>"desktop"===e.deviceType}});var Ex,_2,$x,x2,Cx,S2,Ix,E2,Rx,$2,Px,C2,Tx,I2,Ox,R2,Ax,P2,Mx,T2,Dx,O2,Nx,A2,kx,M2,Lx,D2,Fx,N2,Bx,k2,jx,L2,zx,F2,Vx,B2,Ux,j2,Wx,z2,qx,V2,Gx,U2,Hx,W2,Kx,q2,Yx,G2,Qx,H2,Xx,K2,Jx,Y2,Zx,Q2,eS,X2,tS,J2,nS,Z2,rS,eO,oS,tO,iS,nO,aS,rO,sS,oO,uS,iO,lS,aO,cS,sO;function n3(){if(_2)return Ex;_2=1;var e=CM(),t=e&&new e;return Ex=t}function r3(){if(x2)return $x;x2=1;var e=HE(),t=n3();return $x=t?function(e,n){return t.set(e,n),e}:e}function e0(){if(S2)return Cx;S2=1;var e=Ny(),t=bs();return Cx=function(n){return function(){var r=arguments;switch(r.length){case 0:return new n;case 1:return new n(r[0]);case 2:return new n(r[0],r[1]);case 3:return new n(r[0],r[1],r[2]);case 4:return new n(r[0],r[1],r[2],r[3]);case 5:return new n(r[0],r[1],r[2],r[3],r[4]);case 6:return new n(r[0],r[1],r[2],r[3],r[4],r[5]);case 7:return new n(r[0],r[1],r[2],r[3],r[4],r[5],r[6])}var o=e(n.prototype),a=n.apply(o,r);return t(a)?a:o}},Cx}function DK(){if(E2)return Ix;E2=1;var e=e0(),t=ri();return Ix=function(n,r,o){var a=1&r,i=e(n);return function e(){return(this&&this!==t&&this instanceof e?i:n).apply(a?o:this,arguments)}},Ix}function o3(){if($2)return Rx;$2=1;var e=Math.max;return Rx=function(t,n,r,o){for(var a=-1,i=t.length,s=r.length,u=-1,l=n.length,c=e(i-s,0),d=Array(l+c),f=!o;++u<l;)d[u]=n[u];for(;++a<s;)(f||a<i)&&(d[r[a]]=t[a]);for(;c--;)d[u++]=t[a++];return d}}function i3(){if(C2)return Px;C2=1;var e=Math.max;return Px=function(t,n,r,o){for(var a=-1,i=t.length,s=-1,u=r.length,l=-1,c=n.length,d=e(i-u,0),f=Array(d+c),p=!o;++a<d;)f[a]=t[a];for(var m=a;++l<c;)f[m+l]=n[l];for(;++s<u;)(p||a<i)&&(f[m+r[s]]=t[a++]);return f}}function NK(){if(I2)return Tx;return I2=1,Tx=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}}function U$(){if(R2)return Ox;return R2=1,Ox=function(){}}function W$(){if(P2)return Ax;P2=1;var e=Ny(),t=U$();function n(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}return n.prototype=e(t.prototype),n.prototype.constructor=n,Ax=n}function a3(){if(T2)return Mx;T2=1;var e=n3(),t=F9();return Mx=e?function(t){return e.get(t)}:t}function kK(){if(O2)return Dx;O2=1;return Dx={}}function LK(){if(A2)return Nx;A2=1;var e=kK(),t=Object.prototype.hasOwnProperty;return Nx=function(n){for(var r=n.name+"",o=e[r],a=t.call(e,r)?o.length:0;a--;){var i=o[a],s=i.func;if(null==s||s==n)return i.name}return r}}function s3(){if(M2)return kx;M2=1;var e=Ny(),t=U$();function n(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}return n.prototype=e(t.prototype),n.prototype.constructor=n,kx=n}function FK(){if(D2)return Lx;D2=1;var e=W$(),t=s3(),n=Dy();return Lx=function(r){if(r instanceof e)return r.clone();var o=new t(r.__wrapped__,r.__chain__);return o.__actions__=n(r.__actions__),o.__index__=r.__index__,o.__values__=r.__values__,o}}function BK(){if(N2)return Fx;N2=1;var e=W$(),t=s3(),n=U$(),r=Ei(),o=ta(),a=FK(),i=Object.prototype.hasOwnProperty;function s(n){if(o(n)&&!r(n)&&!(n instanceof e)){if(n instanceof t)return n;if(i.call(n,"__wrapped__"))return a(n)}return new t(n)}return s.prototype=n.prototype,s.prototype.constructor=s,Fx=s}function jK(){if(k2)return Bx;k2=1;var e=W$(),t=a3(),n=LK(),r=BK();return Bx=function(o){var a=n(o),i=r[a];if("function"!=typeof i||!(a in e.prototype))return!1;if(o===i)return!0;var s=t(i);return!!s&&o===s[0]}}function u3(){if(L2)return jx;L2=1;var e=r3(),t=OM()(e);return jx=t}function zK(){if(F2)return zx;F2=1;var e=/\{\n\/\* \[wrapped with (.+)\] \*/,t=/,? & /;return zx=function(n){var r=n.match(e);return r?r[1].split(t):[]}}function VK(){if(B2)return Vx;B2=1;var e=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;return Vx=function(t,n){var r=n.length;if(!r)return t;var o=r-1;return n[o]=(r>1?"& ":"")+n[o],n=n.join(r>2?", ":" "),t.replace(e,"{\n/* [wrapped with "+n+"] */\n")}}function UK(){if(j2)return Ux;j2=1;var e=QE(),t=L9(),n=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];return Ux=function(r,o){return e(n,(function(e){var n="_."+e[0];o&e[1]&&!t(r,n)&&r.push(n)})),r.sort()}}function l3(){if(z2)return Wx;z2=1;var e=zK(),t=VK(),n=AM(),r=UK();return Wx=function(o,a,i){var s=a+"";return n(o,t(s,r(e(s),i)))}}function c3(){if(V2)return qx;V2=1;var e=jK(),t=u3(),n=l3();return qx=function(r,o,a,i,s,u,l,c,d,f){var p=8&o;o|=p?32:64,4&(o&=~(p?64:32))||(o&=-4);var m=[r,o,s,p?u:void 0,p?l:void 0,p?void 0:u,p?void 0:l,c,d,f],v=a.apply(void 0,m);return e(r)&&t(v,m),v.placeholder=i,n(v,r,o)}}function d3(){if(U2)return Gx;return U2=1,Gx=function(e){return e.placeholder}}function WK(){if(W2)return Hx;W2=1;var e=Dy(),t=VE(),n=Math.min;return Hx=function(r,o){for(var a=r.length,i=n(o.length,a),s=e(r);i--;){var u=o[i];r[i]=t(u,a)?s[u]:void 0}return r}}function q$(){if(q2)return Kx;q2=1;var e="__lodash_placeholder__";return Kx=function(t,n){for(var r=-1,o=t.length,a=0,i=[];++r<o;){var s=t[r];(s===n||s===e)&&(t[r]=e,i[a++]=r)}return i}}function f3(){if(G2)return Yx;G2=1;var e=o3(),t=i3(),n=NK(),r=e0(),o=c3(),a=d3(),i=WK(),s=q$(),u=ri();return Yx=function l(c,d,f,p,m,v,h,g,y,b){var w=128&d,x=1&d,_=2&d,E=24&d,S=512&d,I=_?void 0:r(c);return function A(){for(var k=arguments.length,C=Array(k),P=k;P--;)C[P]=arguments[P];if(E)var R=a(A),O=n(C,R);if(p&&(C=e(C,p,m,E)),v&&(C=t(C,v,h,E)),k-=O,E&&k<b){var T=s(C,R);return o(c,d,l,A.placeholder,f,C,T,g,y,b-k)}var N=x?f:this,M=_?N[c]:c;return k=C.length,g?C=i(C,g):S&&k>1&&C.reverse(),w&&y<k&&(C.length=y),this&&this!==u&&this instanceof A&&(M=I||r(M)),M.apply(N,C)}},Yx}function qK(){if(H2)return Qx;H2=1;var e=KE(),t=e0(),n=f3(),r=c3(),o=d3(),a=q$(),i=ri();return Qx=function(s,u,l){var c=t(s);return function t(){for(var d=arguments.length,f=Array(d),p=d,m=o(t);p--;)f[p]=arguments[p];var v=d<3&&f[0]!==m&&f[d-1]!==m?[]:a(f,m);return(d-=v.length)<l?r(s,u,n,t.placeholder,void 0,f,v,void 0,void 0,l-d):e(this&&this!==i&&this instanceof t?c:s,this,f)}},Qx}function GK(){if(K2)return Xx;K2=1;var e=KE(),t=e0(),n=ri();return Xx=function(r,o,a,i){var s=1&o,u=t(r);return function t(){for(var o=-1,l=arguments.length,c=-1,d=i.length,f=Array(d+l),p=this&&this!==n&&this instanceof t?u:r;++c<d;)f[c]=i[c];for(;l--;)f[c++]=arguments[++o];return e(p,s?a:this,f)}},Xx}function HK(){if(Y2)return Jx;Y2=1;var e=o3(),t=i3(),n=q$(),r="__lodash_placeholder__",o=128,a=Math.min;return Jx=function(i,s){var u=i[1],l=s[1],c=u|l,d=c<131,f=l==o&&8==u||l==o&&256==u&&i[7].length<=s[8]||384==l&&s[7].length<=s[8]&&8==u;if(!d&&!f)return i;1&l&&(i[2]=s[2],c|=1&u?0:4);var p=s[3];if(p){var m=i[3];i[3]=m?e(m,p,s[4]):p,i[4]=m?n(i[3],r):s[4]}return(p=s[5])&&(m=i[5],i[5]=m?t(m,p,s[6]):p,i[6]=m?n(i[5],r):s[6]),(p=s[7])&&(i[7]=p),l&o&&(i[8]=null==i[8]?s[8]:a(i[8],s[8])),null==i[9]&&(i[9]=s[9]),i[0]=s[0],i[1]=c,i}}function G$(){if(Q2)return Zx;Q2=1;var e=r3(),t=DK(),n=qK(),r=f3(),o=GK(),a=a3(),i=HK(),s=u3(),u=l3(),l=kM(),c=Math.max;return Zx=function(d,f,p,m,v,h,g,y){var b=2&f;if(!b&&"function"!=typeof d)throw new TypeError("Expected a function");var w=m?m.length:0;if(w||(f&=-97,m=v=void 0),g=void 0===g?g:c(l(g),0),y=void 0===y?y:l(y),w-=v?v.length:0,64&f){var x=m,_=v;m=v=void 0}var E=b?void 0:a(d),S=[d,f,p,m,v,x,_,h,g,y];if(E&&i(S,E),d=S[0],f=S[1],p=S[2],m=S[3],v=S[4],!(y=S[9]=void 0===S[9]?b?0:d.length:c(S[9]-w,0))&&24&f&&(f&=-25),f&&1!=f)I=8==f||16==f?n(d,f,y):32!=f&&33!=f||v.length?r.apply(void 0,S):o(d,f,p,m);else var I=t(d,f,p);return u((E?e:s)(I,S),d,f)}}function KK(){if(X2)return eS;X2=1;var e=G$();return eS=function(t,n,r){return n=r?void 0:n,n=t&&null==n?t.length:n,e(t,128,void 0,void 0,void 0,void 0,n)}}function YK(){if(J2)return tS;J2=1;var e=jM();return tS=function(t){return e(t,4)}}function QK(){if(Z2)return nS;Z2=1;var e=G$();function t(n,r,o){var a=e(n,8,void 0,void 0,void 0,void 0,void 0,r=o?void 0:r);return a.placeholder=t.placeholder,a}return t.placeholder={},nS=t}function XK(){if(eO)return rS;eO=1;var e=Cl(),t=ta(),n=iF();return rS=function(r){if(!t(r))return!1;var o=e(r);return"[object Error]"==o||"[object DOMException]"==o||"string"==typeof r.message&&"string"==typeof r.name&&!n(r)}}function JK(){if(tO)return oS;tO=1;var e=kv(),t=ta();return oS=function(n){return t(n)&&"[object WeakMap]"==e(n)}}function ZK(){if(nO)return iS;nO=1;var e=jM(),t=A9();return iS=function(n){return t("function"==typeof n?n:e(n,1))}}function eY(){if(rO)return aS;rO=1;var e=G$(),t=CF(),n=t((function(t,n){return e(t,256,void 0,void 0,void 0,n)}));return aS=n}function tY(){if(oO)return sS;oO=1;var e=cM(),t=Dy(),n=Ei(),r=Dv(),o=lM(),a=Nv(),i=dM();return sS=function(s){return n(s)?e(s,a):r(s)?[s]:t(o(i(s)))}}function nY(){return iO||(iO=1,uS={ary:KK(),assign:FM(),clone:YK(),curry:QK(),forEach:QE(),isArray:Ei(),isError:XK(),isFunction:Iy(),isWeakMap:JK(),iteratee:ZK(),keys:SM(),rearg:eY(),toInteger:kM(),toPath:tY()}),uS}function rY(){if(aO)return lS;aO=1;var e=nA(),t=nY();return lS=function(n,r,o){return e(t,n,r,o)}}function oY(){if(sO)return cS;sO=1;var e=rY()("debounce",DM());return e.placeholder=tA(),cS=e}function uO(e,t,n=window){const r=v.useRef(t);v.useEffect((()=>{r.current=t}),[t]),v.useEffect((()=>{if(!n)return;const t=e=>r.current(e);return n.addEventListener(e,t),()=>{n.removeEventListener(e,t)}}),[e,n])}oY();const iY=()=>vy(t3.selectors.selectIsMobile);function lO({className:e,...t}){return G.jsx("div",{className:_e("animate-pulse rounded-md bg-muted",e),...t})}const aY="sidebar_state",sY=604800,uY="12rem",lY="18rem",cY="2rem",dY="b",p3=v.createContext(null);function t0(){const e=v.useContext(p3);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const fY=v.forwardRef((({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:o,children:a,...i},s)=>{const u=iY(),[l,c]=v.useState(!1),[d,f]=v.useState(e),p=t??d,m=v.useCallback((e=>{const t="function"==typeof e?e(p):e;n?n(t):f(t),document.cookie=`${aY}=${t}; path=/; max-age=${sY}`}),[n,p]),h=v.useCallback((()=>u?c((e=>!e)):m((e=>!e))),[u,m,c]);v.useEffect((()=>{const e=e=>{e.key===dY&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),h())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)}),[h]);const g=p?"expanded":"collapsed",y=v.useMemo((()=>({state:g,open:p,setOpen:m,isMobile:u,openMobile:l,setOpenMobile:c,toggleSidebar:h})),[g,p,m,u,l,c,h]);return G.jsx(p3.Provider,{value:y,children:G.jsx(aH,{delayDuration:0,children:G.jsx("div",{style:{"--sidebar-width":uY,"--sidebar-width-icon":cY,...o},className:_e("group/sidebar-wrapper flex min-h-svh w-full bg-gray-100 has-[[data-variant=inset]]:bg-sidebar",r),ref:s,...i,children:a})})})}));fY.displayName="SidebarProvider";const pY=v.forwardRef((({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:o,...a},i)=>{const{isMobile:s,state:u,openMobile:l,setOpenMobile:c}=t0();return"none"===n?G.jsx("div",{className:_e("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",r),ref:i,...a,children:o}):s?G.jsx(eH,{open:l,onOpenChange:c,children:G.jsxs(Fk,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":lY},side:e,children:[G.jsxs(Bk,{className:"sr-only",children:[G.jsx(jk,{children:"Sidebar"}),G.jsx(zk,{children:"Displays the mobile sidebar."})]}),G.jsx("div",{className:"flex h-full w-full flex-col",children:o})]})}):G.jsxs("div",{ref:i,className:"group peer hidden text-sidebar-foreground md:block","data-state":u,"data-collapsible":"collapsed"===u?n:"","data-variant":t,"data-side":e,children:[G.jsx("div",{className:_e("relative w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180","floating"===t||"inset"===t?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),G.jsx("div",{className:_e("fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex","left"===e?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]","floating"===t||"inset"===t?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",r),...a,children:G.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-sm group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:o})})]})}));pY.displayName="Sidebar";const mY=v.forwardRef((({className:e,onClick:t,...n},r)=>{const{toggleSidebar:o,open:a}=t0();return G.jsx(yy,{ref:r,"data-sidebar":"trigger",variant:"tertiary",size:"icon_m",className:_e("size-6 text-gray-900",e),onClick:e=>{null==t||t(e),o()},...n,children:a?G.jsx(Y5,{size:16}):G.jsx(H5,{size:16})})}));mY.displayName="SidebarTrigger";const hY=v.forwardRef((({className:e,...t},n)=>{const{toggleSidebar:r}=t0();return G.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:r,title:"Toggle Sidebar",className:_e("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})}));hY.displayName="SidebarRail";const vY=v.forwardRef((({className:e,...t},n)=>G.jsx("main",{ref:n,className:_e("relative flex w-full flex-1 flex-col bg-background","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-m md:peer-data-[variant=inset]:shadow",e),...t})));vY.displayName="SidebarInset";const gY=v.forwardRef((({className:e,...t},n)=>G.jsx(xk,{ref:n,"data-sidebar":"input",className:_e("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t})));gY.displayName="SidebarInput";const yY=v.forwardRef((({className:e,...t},n)=>G.jsx("div",{ref:n,"data-sidebar":"header",className:_e("flex flex-col gap-xxs p-xs",e),...t})));yY.displayName="SidebarHeader";const wY=v.forwardRef((({className:e,...t},n)=>G.jsx("div",{ref:n,"data-sidebar":"footer",className:_e("flex flex-col gap-2 p-2",e),...t})));wY.displayName="SidebarFooter";const bY=v.forwardRef((({className:e,...t},n)=>G.jsx(E$,{ref:n,"data-sidebar":"separator",className:_e("mx-2 w-auto bg-sidebar-border",e),...t})));bY.displayName="SidebarSeparator";const _Y=v.forwardRef((({className:e,...t},n)=>G.jsx("div",{ref:n,"data-sidebar":"content",className:_e("flex min-h-0 flex-1 flex-col gap-xxxs overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t})));_Y.displayName="SidebarContent";const xY=v.forwardRef((({className:e,...t},n)=>G.jsx("div",{ref:n,"data-sidebar":"group",className:_e("relative flex w-full min-w-0 flex-col pt-xs",e),...t})));xY.displayName="SidebarGroup";const SY=v.forwardRef((({className:e,asChild:t=!1,...n},r)=>{const o=t?yd:"div";return G.jsx(o,{ref:r,"data-sidebar":"group-label",className:_e("flex h-s shrink-0 items-center rounded-md px-xxs py-xxs text-xs font-semibold text-gray-700 opacity-60 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-xl group-data-[collapsible=icon]:opacity-0",e),...n})}));SY.displayName="SidebarGroupLabel";const EY=v.forwardRef((({className:e,asChild:t=!1,...n},r)=>{const o=t?yd:"button";return G.jsx(o,{ref:r,"data-sidebar":"group-action",className:_e("absolute right-xs top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...n})}));EY.displayName="SidebarGroupAction";const $Y=v.forwardRef((({className:e,...t},n)=>G.jsx("div",{ref:n,"data-sidebar":"group-content",className:_e("w-full text-sm",e),...t})));$Y.displayName="SidebarGroupContent";const CY=v.forwardRef((({className:e,...t},n)=>G.jsx("ul",{ref:n,"data-sidebar":"menu",className:_e("flex w-full min-w-0 flex-col p-xs font-semibold text-gray-700 [&_svg]:size-4",e),...t})));CY.displayName="SidebarMenu";const IY=v.forwardRef((({className:e,...t},n)=>G.jsx("li",{ref:n,"data-sidebar":"menu-item",className:_e("group/menu-item relative",e),...t})));IY.displayName="SidebarMenuItem";const RY=gu("peer/menu-button flex w-full items-center gap-xxs overflow-hidden rounded-sm p-xxs text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:text-blue_100 hover:bg-white focus-visible:ring-2 active:bg-white active:text-blue_100 disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-white data-[active=true]:font-medium data-[active=true]:text-blue_100 data-[state=open]:hover:bg-white data-[state=open]:hover:text-blue_100 group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:text-blue_100 hover:bg-white",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-white hover:text-blue_100 hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-s text-sm",sm:"h-m text-xs",lg:"h-l text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),PY=v.forwardRef((({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:o,className:a,...i},s)=>{const u=e?yd:"button",{isMobile:l,state:c}=t0(),d=G.jsx(u,{ref:s,"data-sidebar":"menu-button","data-size":r,"data-active":t,className:_e(RY({variant:n,size:r}),a),...i});return o?("string"==typeof o&&(o={children:o}),G.jsxs(uH,{children:[G.jsx(lH,{asChild:!0,children:d}),G.jsx(Uk,{side:"right",align:"center",hidden:"collapsed"!==c||l,...o})]})):d}));PY.displayName="SidebarMenuButton";const TY=v.forwardRef((({className:e,asChild:t=!1,showOnHover:n=!1,...r},o)=>{const a=t?yd:"button";return G.jsx(a,{ref:o,"data-sidebar":"menu-action",className:_e("absolute right-xxxs top-xxs flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-xxxs","peer-data-[size=default]/menu-button:top-xxs","peer-data-[size=lg]/menu-button:top-xs","group-data-[collapsible=icon]:hidden",n&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...r})}));TY.displayName="SidebarMenuAction";const OY=v.forwardRef((({className:e,...t},n)=>G.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:_e("pointer-events-none absolute right-xxxs flex h-m min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-xxxs","peer-data-[size=default]/menu-button:top-xxs","peer-data-[size=lg]/menu-button:top-xs","group-data-[collapsible=icon]:hidden",e),...t})));OY.displayName="SidebarMenuBadge";const AY=v.forwardRef((({className:e,showIcon:t=!1,...n},r)=>{const o=v.useMemo((()=>`${Math.floor(40*Math.random())+50}%`),[]);return G.jsxs("div",{ref:r,"data-sidebar":"menu-skeleton",className:_e("flex h-8 items-center gap-xxs rounded-md px-xxs",e),...n,children:[t&&G.jsx(lO,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),G.jsx(lO,{className:"h-xxxs max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":o}})]})}));AY.displayName="SidebarMenuSkeleton";const MY=v.forwardRef((({className:e,...t},n)=>G.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:_e("flex min-w-0 translate-x-px flex-col gap-xxxs border-l border-sidebar-border","group-data-[collapsible=icon]:hidden",e),...t})));MY.displayName="SidebarMenuSub";const DY=v.forwardRef((({...e},t)=>G.jsx("li",{ref:t,...e})));DY.displayName="SidebarMenuSubItem";const NY=v.forwardRef((({asChild:e=!1,size:t="md",isActive:n,className:r,...o},a)=>{const i=e?yd:"a";return G.jsx(i,{ref:a,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:_e("flex h-s min-w-0 -translate-x-px items-center gap-xxs overflow-hidden rounded-sm px-xxs text-sm text-gray-700 outline-none ring-sidebar-ring hover:bg-white hover:text-blue_100 focus-visible:ring-2 active:bg-white active:text-blue_100 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-blue_100","data-[active=true]:bg-white data-[active=true]:text-blue_100","sm"===t&&"text-xs","md"===t&&"text-sm","group-data-[collapsible=icon]:hidden",r),...o})}));NY.displayName="SidebarMenuSubButton";const m3="Switch",[kY,yZ]=ni(m3),[LY,FY]=kY(m3),BY=v.forwardRef(((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:a,required:i,disabled:s,value:u="on",onCheckedChange:l,...c}=e,[d,f]=v.useState(null),p=Vt(t,(e=>f(e))),m=v.useRef(!1),h=!d||!!d.closest("form"),[g=!1,y]=fd({prop:o,defaultProp:a,onChange:l});return v.createElement(LY,{scope:n,checked:g,disabled:s},v.createElement(lt.button,Pe({type:"button",role:"switch","aria-checked":g,"aria-required":i,"data-state":h3(g),"data-disabled":s?"":void 0,disabled:s,value:u},c,{ref:p,onClick:et(e.onClick,(e=>{y((e=>!e)),h&&(m.current=e.isPropagationStopped(),m.current||e.stopPropagation())}))})),h&&v.createElement(VY,{control:d,bubbles:!m.current,name:r,value:u,checked:g,required:i,disabled:s,style:{transform:"translateX(-100%)"}}))})),jY="SwitchThumb",zY=v.forwardRef(((e,t)=>{const{__scopeSwitch:n,...r}=e,o=FY(jY,n);return v.createElement(lt.span,Pe({"data-state":h3(o.checked),"data-disabled":o.disabled?"":void 0},r,{ref:t}))})),VY=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,a=v.useRef(null),i=ky(n),s=Ly(t);return v.useEffect((()=>{const e=a.current,t=window.HTMLInputElement.prototype,o=Object.getOwnPropertyDescriptor(t,"checked").set;if(i!==n&&o){const t=new Event("click",{bubbles:r});o.call(e,n),e.dispatchEvent(t)}}),[i,n,r]),v.createElement("input",Pe({type:"checkbox","aria-hidden":!0,defaultChecked:n},o,{tabIndex:-1,ref:a,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function h3(e){return e?"checked":"unchecked"}const v3=BY,UY=zY,WY=v.forwardRef((({className:e,...t},n)=>G.jsx(v3,{className:_e("group peer inline-flex h-xs w-[44px] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background data-[state=checked]:bg-blue_100 data-[state=unchecked]:bg-gray-200","disabled:cursor-not-allowed disabled:!bg-gray-100 md:hover:data-[state=checked]:bg-blue_120 md:hover:data-[state=unchecked]:!bg-gray-300",e),...t,ref:n,children:G.jsx(UY,{className:_e("pointer-events-none block size-xxs rounded-full bg-background shadow-lg ring-0 transition-[transform,width] data-[state=checked]:translate-x-[20px] data-[state=unchecked]:translate-x-0",{"md:group-hover:w-[26px] md:group-hover:data-[state=checked]:translate-x-[14px]":!t.disabled,"bg-gray-300":t.disabled})})})));WY.displayName=v3.displayName;var qY={USER:"teamcity",npm_config_user_agent:"npm/10.9.3 node/v22.18.0 linux x64 workspaces/true",SENTRY_AUTH_TOKEN:"1d93ff28a44e4c3aaaaff854277cd8583c1de670bd8744bc895670dfd9300840",npm_node_execpath:"/home/teamcity/.nvm/versions/node/v22.18.0/bin/node",npm_config_noproxy:"",HOME:"/home/teamcity",npm_package_json:"/mnt/agent/work/70fcd8585843667f/packages/network/package.json",npm_config_userconfig:"/home/teamcity/.npmrc",npm_config_local_prefix:"/mnt/agent/work/70fcd8585843667f",COLOR:"1",npm_config_progress:"",TEMP:"/mnt/agent/temp/buildTmp",npm_config_prefix:"/home/teamcity/.nvm/versions/node/v22.18.0",npm_config_npm_version:"10.9.3",npm_config_cache:"/home/teamcity/.npm",USE_NPM_LIBS:"false",npm_config_ignore_scripts:"true",npm_config_node_gyp:"/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",PATH:"/mnt/agent/work/70fcd8585843667f/packages/network/node_modules/.bin:/mnt/agent/work/70fcd8585843667f/packages/node_modules/.bin:/mnt/agent/work/70fcd8585843667f/node_modules/.bin:/mnt/agent/work/node_modules/.bin:/mnt/agent/node_modules/.bin:/mnt/node_modules/.bin:/node_modules/.bin:/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/mnt/agent/work/70fcd8585843667f/node_modules/.bin:/mnt/agent/work/node_modules/.bin:/mnt/agent/node_modules/.bin:/mnt/node_modules/.bin:/node_modules/.bin:/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/home/teamcity/.cargo/bin:/home/teamcity/.rvm/gems/ruby-3.3.9/bin:/home/teamcity/.rvm/gems/ruby-3.3.9@global/bin:/home/teamcity/.rvm/rubies/ruby-3.3.9/bin:/home/teamcity/.rvm/bin:/home/teamcity/.local/bin:/usr/lib/jvm/java-21-amazon-corretto/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/snap/bin:/usr/share/dotnet:/usr/share/dotnet/tools:/home/teamcity/google-cloud-sdk/bin:/home/teamcity/go/bin:/usr/bin/mvn:/home/teamcity/.nvm/versions/node/v22.18.0/bin",TURBO_HASH:"270c0e6eae227eeb",NODE:"/home/teamcity/.nvm/versions/node/v22.18.0/bin/node",npm_package_name:"@wellesley/network",npm_config_color:"always",DOMAIN_ENV:"test",LANG:"en_US.UTF-8",TURBO_TEAM:"wellesley",TMP:"/mnt/agent/temp/buildTmp",TURBO_API:"https://turborepo-remote-cache-fo3np.ondigitalocean.app",npm_lifecycle_script:"vite build",SHELL:"/bin/bash",npm_package_version:"1.0.694",npm_lifecycle_event:"build",TURBO_CACHE:"remote:rw",SENTRY_MAPS_UPLOAD:"true",npm_config_globalconfig:"/home/teamcity/.nvm/versions/node/v22.18.0/etc/npmrc",npm_config_init_module:"/home/teamcity/.npm-init.js",PWD:"/mnt/agent/work/70fcd8585843667f/packages/network",npm_execpath:"/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/bin/npm-cli.js",npm_config_global_prefix:"/home/teamcity/.nvm/versions/node/v22.18.0",npm_command:"run-script",TURBO_TOKEN:"wellesley-turbo-token",USE_PACKAGES_FROM_NPM:"false",INIT_CWD:"/mnt/agent/work/70fcd8585843667f/packages/network",EDITOR:"vi",NODE_ENV:"production",BUILD_NUMBER:"3777",APP_NAME:"@wellesley/network"},g3=(e=>(e.uninitialized="uninitialized",e.pending="pending",e.fulfilled="fulfilled",e.rejected="rejected",e))(g3||{});function GY(e){return{status:e,isUninitialized:"uninitialized"===e,isLoading:"pending"===e,isSuccess:"fulfilled"===e,isError:"rejected"===e}}function HY(e){return new RegExp("(^|:)//").test(e)}var KY=e=>e.replace(/\/$/,""),YY=e=>e.replace(/^\//,"");function QY(e,t){if(!e)return t;if(!t)return e;if(HY(t))return t;const n=e.endsWith("/")||!t.startsWith("?")?"/":"";return`${e=KY(e)}${n}${t=YY(t)}`}var cO=e=>[].concat(...e);function XY(){return typeof navigator>"u"||void 0===navigator.onLine||navigator.onLine}function JY(){return typeof document>"u"||"hidden"!==document.visibilityState}var dO=ld;function y3(e,t){if(e===t||!(dO(e)&&dO(t)||Array.isArray(e)&&Array.isArray(t)))return t;const n=Object.keys(t),r=Object.keys(e);let o=n.length===r.length;const a=Array.isArray(t)?[]:{};for(const r of n)a[r]=y3(e[r],t[r]),o&&(o=e[r]===a[r]);return o?e:a}var fO=(...e)=>fetch(...e),ZY=e=>e.status>=200&&e.status<=299,eQ=e=>/ion\/(vnd\.api\+)?json/.test(e.get("content-type")||"");function pO(e){if(!ld(e))return e;const t={...e};for(const[e,n]of Object.entries(t))void 0===n&&delete t[e];return t}function tQ({baseUrl:e,prepareHeaders:t=e=>e,fetchFn:n=fO,paramsSerializer:r,isJsonContentType:o=eQ,jsonContentType:a="application/json",jsonReplacer:i,timeout:s,responseHandler:u,validateStatus:l,...c}={}){return typeof fetch>"u"&&n===fO&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),async(f,p)=>{const{signal:m,getState:v,extra:h,endpoint:g,forced:y,type:b}=p;let w,{url:x,headers:_=new Headers(c.headers),params:E,responseHandler:S=u??"json",validateStatus:I=l??ZY,timeout:A=s,...k}="string"==typeof f?{url:f}:f,C={...c,signal:m,...k};_=new Headers(pO(_)),C.headers=await t(_,{getState:v,extra:h,endpoint:g,forced:y,type:b})||_;const P=e=>"object"==typeof e&&(ld(e)||Array.isArray(e)||"function"==typeof e.toJSON);if(!C.headers.has("content-type")&&P(C.body)&&C.headers.set("content-type",a),P(C.body)&&o(C.headers)&&(C.body=JSON.stringify(C.body,i)),E){const e=~x.indexOf("?")?"&":"?";x+=e+(r?r(E):new URLSearchParams(pO(E)))}x=QY(e,x);const R=new Request(x,C);w={request:new Request(x,C)};let O,T=!1,N=A&&setTimeout((()=>{T=!0,p.abort()}),A);try{O=await n(R)}catch(e){return{error:{status:T?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(e)},meta:w}}finally{N&&clearTimeout(N)}const M=O.clone();w.response=M;let j,D="";try{let e;if(await Promise.all([d(O,S).then((e=>j=e),(t=>e=t)),M.text().then((e=>D=e),(()=>{}))]),e)throw e}catch(e){return{error:{status:"PARSING_ERROR",originalStatus:O.status,data:D,error:String(e)},meta:w}}return I(O,j)?{data:j,meta:w}:{error:{status:O.status,data:j},meta:w}};async function d(e,t){if("function"==typeof t)return t(e);if("content-type"===t&&(t=o(e.headers)?"json":"text"),"json"===t){const t=await e.text();return t.length?JSON.parse(t):null}return e.text()}}var mO=class{constructor(e,t=void 0){this.value=e,this.meta=t}},H$=Vn("__rtkq/focused"),w3=Vn("__rtkq/unfocused"),K$=Vn("__rtkq/online"),b3=Vn("__rtkq/offline");function _3(e){return"query"===e.type}function nQ(e){return"mutation"===e.type}function Y$(e,t,n,r,o,a){return rQ(e)?e(t,n,r,o).map(iE).map(a):Array.isArray(e)?e.map(iE).map(a):[]}function rQ(e){return"function"==typeof e}function iE(e){return"string"==typeof e?{type:e}:e}function hO(e){return null!=e}function Om(e){let t=0;for(const n in e)t++;return t}function oQ(e,t){return e.catch(t)}var $v=Symbol("forceQueryFn"),aE=e=>"function"==typeof e[$v];function iQ({serializeQueryArgs:e,queryThunk:t,mutationThunk:n,api:r,context:o}){const a=new Map,i=new Map,{unsubscribeQueryResult:s,removeMutationResult:u,updateSubscriptionOptions:l}=r.internalActions;return{buildInitiateQuery:function(n,o){const i=(u,{subscribe:c=!0,forceRefetch:d,subscriptionOptions:f,[$v]:p,...m}={})=>(v,h)=>{var g;const y=e({queryArgs:u,endpointDefinition:o,endpointName:n}),b=t({...m,type:"query",subscribe:c,forceRefetch:d,subscriptionOptions:f,endpointName:n,originalArgs:u,queryCacheKey:y,[$v]:p}),w=r.endpoints[n].select(u),x=v(b),_=w(h()),{requestId:E,abort:S}=x,I=_.requestId!==E,A=null==(g=a.get(v))?void 0:g[y],k=()=>w(h()),C=Object.assign(p?x.then(k):I&&!A?Promise.resolve(_):Promise.all([A,x]).then(k),{arg:u,requestId:E,subscriptionOptions:f,queryCacheKey:y,abort:S,async unwrap(){const e=await C;if(e.isError)throw e.error;return e.data},refetch:()=>v(i(u,{subscribe:!1,forceRefetch:!0})),unsubscribe(){c&&v(s({queryCacheKey:y,requestId:E}))},updateSubscriptionOptions(e){C.subscriptionOptions=e,v(l({endpointName:n,requestId:E,queryCacheKey:y,options:e}))}});if(!A&&!I&&!p){const e=a.get(v)||{};e[y]=C,a.set(v,e),C.then((()=>{delete e[y],Om(e)||a.delete(v)}))}return C};return i},buildInitiateMutation:function(e){return(t,{track:r=!0,fixedCacheKey:o}={})=>(a,s)=>{const l=n({type:"mutation",endpointName:e,originalArgs:t,track:r,fixedCacheKey:o}),c=a(l),{requestId:d,abort:f,unwrap:p}=c,m=oQ(c.unwrap().then((e=>({data:e}))),(e=>({error:e}))),v=Object.assign(m,{arg:c.arg,requestId:d,abort:f,unwrap:p,reset:()=>{a(u({requestId:d,fixedCacheKey:o}))}}),h=i.get(a)||{};return i.set(a,h),h[d]=v,v.then((()=>{delete h[d],Om(h)||i.delete(a)})),o&&(h[o]=v,v.then((()=>{h[o]===v&&(delete h[o],Om(h)||i.delete(a))}))),v}},getRunningQueryThunk:function(t,n){return r=>{var i;const s=o.endpointDefinitions[t],u=e({queryArgs:n,endpointDefinition:s,endpointName:t});return null==(i=a.get(r))?void 0:i[u]}},getRunningMutationThunk:function(e,t){return e=>{var n;return null==(n=i.get(e))?void 0:n[t]}},getRunningQueriesThunk:function(){return e=>Object.values(a.get(e)||{}).filter(hO)},getRunningMutationsThunk:function(){return e=>Object.values(i.get(e)||{}).filter(hO)}}}function vO(e){return e}function aQ({reducerPath:e,baseQuery:t,context:{endpointDefinitions:n},serializeQueryArgs:r,api:o,assertTagType:a}){const i=async(e,{signal:r,abort:o,rejectWithValue:a,fulfillWithValue:i,dispatch:u,getState:l,extra:c})=>{const d=n[e.endpointName];try{let n,a=vO;const f={signal:r,abort:o,dispatch:u,getState:l,extra:c,endpoint:e.endpointName,type:e.type,forced:"query"===e.type?s(e,l()):void 0},p="query"===e.type?e[$v]:void 0;if(p?n=p():d.query?(n=await t(d.query(e.originalArgs),f,d.extraOptions),d.transformResponse&&(a=d.transformResponse)):n=await d.queryFn(e.originalArgs,f,d.extraOptions,(e=>t(e,f,d.extraOptions))),typeof process<"u"&&qY.NODE_ENV,n.error)throw new mO(n.error,n.meta);return i(await a(n.data,n.meta,e.originalArgs),{fulfilledTimeStamp:Date.now(),baseQueryMeta:n.meta,[Yh]:!0})}catch(t){let n=t;if(n instanceof mO){let t=vO;d.query&&d.transformErrorResponse&&(t=d.transformErrorResponse);try{return a(await t(n.value,n.meta,e.originalArgs),{baseQueryMeta:n.meta,[Yh]:!0})}catch(e){n=e}}throw console.error(n),n}};function s(t,n){var r,o,a;const i=null==(o=null==(r=n[e])?void 0:r.queries)?void 0:o[t.queryCacheKey],s=null==(a=n[e])?void 0:a.config.refetchOnMountOrArgChange,u=null==i?void 0:i.fulfilledTimeStamp,l=t.forceRefetch??(t.subscribe&&s);return!!l&&(!0===l||(Number(new Date)-Number(u))/1e3>=l)}const u=vC(`${e}/executeQuery`,i,{getPendingMeta:()=>({startedTimeStamp:Date.now(),[Yh]:!0}),condition(t,{getState:r}){var o,a,i;const u=r(),l=null==(a=null==(o=u[e])?void 0:o.queries)?void 0:a[t.queryCacheKey],c=null==l?void 0:l.fulfilledTimeStamp,d=t.originalArgs,f=null==l?void 0:l.originalArgs,p=n[t.endpointName];return!!aE(t)||"pending"!==(null==l?void 0:l.status)&&(!!(s(t,u)||_3(p)&&null!=(i=null==p?void 0:p.forceRefetch)&&i.call(p,{currentArg:d,previousArg:f,endpointState:l,state:u}))||!c)},dispatchConditionRejection:!0}),l=vC(`${e}/executeMutation`,i,{getPendingMeta:()=>({startedTimeStamp:Date.now(),[Yh]:!0})});function c(e){return t=>{var n,r;return(null==(r=null==(n=null==t?void 0:t.meta)?void 0:n.arg)?void 0:r.endpointName)===e}}return{queryThunk:u,mutationThunk:l,prefetch:(e,t,n)=>(r,a)=>{const i=(e=>"force"in e)(n)&&n.force,s=(e=>"ifOlderThan"in e)(n)&&n.ifOlderThan,u=(n=!0)=>{const r={forceRefetch:n,isPrefetch:!0};return o.endpoints[e].initiate(t,r)},l=o.endpoints[e].select(t)(a());if(i)r(u());else if(s){const e=null==l?void 0:l.fulfilledTimeStamp;if(!e)return void r(u());(Number(new Date)-Number(new Date(e)))/1e3>=s&&r(u())}else r(u(!1))},updateQueryData:(e,t,n,r=!0)=>(a,i)=>{const s=o.endpoints[e].select(t)(i());let u,l={patches:[],inversePatches:[],undo:()=>a(o.util.patchQueryData(e,t,l.inversePatches,r))};if("uninitialized"===s.status)return l;if("data"in s)if(ys(s.data)){const[e,t,r]=GO(s.data,n);l.patches.push(...t),l.inversePatches.push(...r),u=e}else u=n(s.data),l.patches.push({op:"replace",path:[],value:u}),l.inversePatches.push({op:"replace",path:[],value:s.data});return a(o.util.patchQueryData(e,t,l.patches,r)),l},upsertQueryData:(e,t,n)=>r=>r(o.endpoints[e].initiate(t,{subscribe:!1,forceRefetch:!0,[$v]:()=>({data:n})})),patchQueryData:(e,t,i,s)=>(u,l)=>{const c=n[e],d=r({queryArgs:t,endpointDefinition:c,endpointName:e});if(u(o.internalActions.queryResultPatched({queryCacheKey:d,patches:i})),!s)return;const f=o.endpoints[e].select(t)(l()),p=Y$(c.providesTags,f.data,void 0,t,{},a);u(o.internalActions.updateProvidedBy({queryCacheKey:d,providedTags:p}))},buildMatchThunkActions:function(e,t){return{matchPending:nv(fE(e),c(t)),matchFulfilled:nv(dd(e),c(t)),matchRejected:nv(Mm(e),c(t))}}}}function x3(e,t,n,r){return Y$(n[e.meta.arg.endpointName][t],dd(e)?e.payload:void 0,py(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,r)}function kg(e,t,n){const r=e[t];r&&n(r)}function Cv(e){return("arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)??e.requestId}function gO(e,t,n){const r=e[Cv(t)];r&&n(r)}var Hh={};function sQ({reducerPath:e,queryThunk:t,mutationThunk:n,context:{endpointDefinitions:r,apiUid:o,extractRehydrationInfo:a,hasRehydrationInfo:i},assertTagType:s,config:u}){const l=Vn(`${e}/resetApiState`),c=oo({name:`${e}/queries`,initialState:Hh,reducers:{removeQueryResult:{reducer(e,{payload:{queryCacheKey:t}}){delete e[t]},prepare:jh()},queryResultPatched:{reducer(e,{payload:{queryCacheKey:t,patches:n}}){kg(e,t,(e=>{e.data=dC(e.data,n.concat())}))},prepare:jh()}},extraReducers(e){e.addCase(t.pending,((e,{meta:t,meta:{arg:n}})=>{var r;const o=aE(n);e[r=n.queryCacheKey]??(e[r]={status:"uninitialized",endpointName:n.endpointName}),kg(e,n.queryCacheKey,(e=>{e.status="pending",e.requestId=o&&e.requestId?e.requestId:t.requestId,void 0!==n.originalArgs&&(e.originalArgs=n.originalArgs),e.startedTimeStamp=t.startedTimeStamp}))})).addCase(t.fulfilled,((e,{meta:t,payload:n})=>{kg(e,t.arg.queryCacheKey,(e=>{if(e.requestId!==t.requestId&&!aE(t.arg))return;const{merge:o}=r[t.arg.endpointName];if(e.status="fulfilled",o)if(void 0!==e.data){const{fulfilledTimeStamp:r,arg:a,baseQueryMeta:i,requestId:s}=t;let u=Pv(e.data,(e=>o(e,n,{arg:a.originalArgs,baseQueryMeta:i,fulfilledTimeStamp:r,requestId:s})));e.data=u}else e.data=n;else e.data=r[t.arg.endpointName].structuralSharing??1?y3(gs(e.data)?Z3(e.data):e.data,n):n;delete e.error,e.fulfilledTimeStamp=t.fulfilledTimeStamp}))})).addCase(t.rejected,((e,{meta:{condition:t,arg:n,requestId:r},error:o,payload:a})=>{kg(e,n.queryCacheKey,(e=>{if(!t){if(e.requestId!==r)return;e.status="rejected",e.error=a??o}}))})).addMatcher(i,((e,t)=>{const{queries:n}=a(t);for(const[t,r]of Object.entries(n))("fulfilled"===(null==r?void 0:r.status)||"rejected"===(null==r?void 0:r.status))&&(e[t]=r)}))}}),d=oo({name:`${e}/mutations`,initialState:Hh,reducers:{removeMutationResult:{reducer(e,{payload:t}){const n=Cv(t);n in e&&delete e[n]},prepare:jh()}},extraReducers(e){e.addCase(n.pending,((e,{meta:t,meta:{requestId:n,arg:r,startedTimeStamp:o}})=>{r.track&&(e[Cv(t)]={requestId:n,status:"pending",endpointName:r.endpointName,startedTimeStamp:o})})).addCase(n.fulfilled,((e,{payload:t,meta:n})=>{n.arg.track&&gO(e,n,(e=>{e.requestId===n.requestId&&(e.status="fulfilled",e.data=t,e.fulfilledTimeStamp=n.fulfilledTimeStamp)}))})).addCase(n.rejected,((e,{payload:t,error:n,meta:r})=>{r.arg.track&&gO(e,r,(e=>{e.requestId===r.requestId&&(e.status="rejected",e.error=t??n)}))})).addMatcher(i,((e,t)=>{const{mutations:n}=a(t);for(const[t,r]of Object.entries(n))("fulfilled"===(null==r?void 0:r.status)||"rejected"===(null==r?void 0:r.status))&&t!==(null==r?void 0:r.requestId)&&(e[t]=r)}))}}),f=oo({name:`${e}/invalidation`,initialState:Hh,reducers:{updateProvidedBy:{reducer(e,t){var n,r;const{queryCacheKey:o,providedTags:a}=t.payload;for(const t of Object.values(e))for(const e of Object.values(t)){const t=e.indexOf(o);-1!==t&&e.splice(t,1)}for(const{type:t,id:i}of a){const a=(n=e[t]??(e[t]={}))[r=i||"__internal_without_id"]??(n[r]=[]);a.includes(o)||a.push(o)}},prepare:jh()}},extraReducers(e){e.addCase(c.actions.removeQueryResult,((e,{payload:{queryCacheKey:t}})=>{for(const n of Object.values(e))for(const e of Object.values(n)){const n=e.indexOf(t);-1!==n&&e.splice(n,1)}})).addMatcher(i,((e,t)=>{var n,r;const{provided:o}=a(t);for(const[t,a]of Object.entries(o))for(const[o,i]of Object.entries(a)){const a=(n=e[t]??(e[t]={}))[r=o||"__internal_without_id"]??(n[r]=[]);for(const e of i)a.includes(e)||a.push(e)}})).addMatcher(cd(dd(t),py(t)),((e,t)=>{const n=x3(t,"providesTags",r,s),{queryCacheKey:o}=t.meta.arg;f.caseReducers.updateProvidedBy(e,f.actions.updateProvidedBy({queryCacheKey:o,providedTags:n}))}))}}),p=oo({name:`${e}/subscriptions`,initialState:Hh,reducers:{updateSubscriptionOptions(e,t){},unsubscribeQueryResult(e,t){},internal_getRTKQSubscriptions(){}}}),m=oo({name:`${e}/internalSubscriptions`,initialState:Hh,reducers:{subscriptionsUpdated:{reducer:(e,t)=>dC(e,t.payload),prepare:jh()}}}),v=oo({name:`${e}/config`,initialState:{online:XY(),focused:JY(),middlewareRegistered:!1,...u},reducers:{middlewareRegistered(e,{payload:t}){e.middlewareRegistered="conflict"!==e.middlewareRegistered&&o===t||"conflict"}},extraReducers:e=>{e.addCase(K$,(e=>{e.online=!0})).addCase(b3,(e=>{e.online=!1})).addCase(H$,(e=>{e.focused=!0})).addCase(w3,(e=>{e.focused=!1})).addMatcher(i,(e=>({...e})))}}),h=FO({queries:c.reducer,mutations:d.reducer,provided:f.reducer,subscriptions:m.reducer,config:v.reducer});return{reducer:(e,t)=>h(l.match(t)?void 0:e,t),actions:{...v.actions,...c.actions,...p.actions,...m.actions,...d.actions,...f.actions,resetApiState:l}}}var Ff=Symbol.for("RTKQ/skipToken"),S3={status:"uninitialized"},yO=Pv(S3,(()=>{})),wO=Pv(S3,(()=>{}));function uQ({serializeQueryArgs:e,reducerPath:t,createSelector:n}){const r=e=>yO,o=e=>wO;return{buildQuerySelector:function(t,o){return s=>{const u=e({queryArgs:s,endpointDefinition:o,endpointName:t});return n(s===Ff?r:e=>{var t,n;return(null==(n=null==(t=i(e))?void 0:t.queries)?void 0:n[u])??yO},a)}},buildMutationSelector:function(){return e=>{let t;return t="object"==typeof e?Cv(e)??Ff:e,n(t===Ff?o:e=>{var n,r;return(null==(r=null==(n=i(e))?void 0:n.mutations)?void 0:r[t])??wO},a)}},selectInvalidatedBy:function(e,n){const r=e[t],o=new Set;for(const e of n.map(iE)){const t=r.provided[e.type];if(!t)continue;let n=(void 0!==e.id?t[e.id]:cO(Object.values(t)))??[];for(const e of n)o.add(e)}return cO(Array.from(o.values()).map((e=>{const t=r.queries[e];return t?[{queryCacheKey:e,endpointName:t.endpointName,originalArgs:t.originalArgs}]:[]})))},selectCachedArgsForQuery:function(e,n){return Object.values(e[t].queries).filter((e=>(null==e?void 0:e.endpointName)===n&&"uninitialized"!==e.status)).map((e=>e.originalArgs))}};function a(e){return{...e,...GY(e.status)}}function i(e){return e[t]}}var Sm=WeakMap?new WeakMap:void 0,bO=({endpointName:e,queryArgs:t})=>{let n="";const r=null==Sm?void 0:Sm.get(t);if("string"==typeof r)n=r;else{const e=JSON.stringify(t,((e,t)=>ld(t)?Object.keys(t).sort().reduce(((e,n)=>(e[n]=t[n],e)),{}):t));ld(t)&&(null==Sm||Sm.set(t,e)),n=e}return`${e}(${n})`};function lQ(...e){return function(t){const n=fv((e=>{var n;return null==(n=t.extractRehydrationInfo)?void 0:n.call(t,e,{reducerPath:t.reducerPath??"api"})})),r={reducerPath:"api",keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1,invalidationBehavior:"delayed",...t,extractRehydrationInfo:n,serializeQueryArgs(e){let n=bO;if("serializeQueryArgs"in e.endpointDefinition){const t=e.endpointDefinition.serializeQueryArgs;n=e=>{const n=t(e);return"string"==typeof n?n:bO({...e,queryArgs:n})}}else t.serializeQueryArgs&&(n=t.serializeQueryArgs);return n(e)},tagTypes:[...t.tagTypes||[]]},o={endpointDefinitions:{},batch(e){e()},apiUid:dy(),extractRehydrationInfo:n,hasRehydrationInfo:fv((e=>null!=n(e)))},a={injectEndpoints:function(e){const t=e.endpoints({query:e=>({...e,type:"query"}),mutation:e=>({...e,type:"mutation"})});for(const[n,r]of Object.entries(t))if(!0!==e.overrideExisting&&n in o.endpointDefinitions){if("throw"===e.overrideExisting)throw new Error($o(39))}else{o.endpointDefinitions[n]=r;for(const e of i)e.injectEndpoint(n,r)}return a},enhanceEndpoints({addTagTypes:e,endpoints:t}){if(e)for(const t of e)r.tagTypes.includes(t)||r.tagTypes.push(t);if(t)for(const[e,n]of Object.entries(t))"function"==typeof n?n(o.endpointDefinitions[e]):Object.assign(o.endpointDefinitions[e]||{},n);return a}},i=e.map((e=>e.init(a,r,o)));return a.injectEndpoints({endpoints:t.endpoints})}}function cQ(e){for(let t in e)return!1;return!0}var dQ=2147482.647,fQ=({reducerPath:e,api:t,context:n,internalState:r})=>{const{removeQueryResult:o,unsubscribeQueryResult:a}=t.internalActions;function i(e){const t=r.currentSubscriptions[e];return!!t&&!cQ(t)}const s={};function u(e,t,r,a){const u=n.endpointDefinitions[t],l=(null==u?void 0:u.keepUnusedDataFor)??a.keepUnusedDataFor;if(l===1/0)return;const c=Math.max(0,Math.min(l,dQ));if(!i(e)){const t=s[e];t&&clearTimeout(t),s[e]=setTimeout((()=>{i(e)||r.dispatch(o({queryCacheKey:e})),delete s[e]}),1e3*c)}}return(r,o,i)=>{var l;if(a.match(r)){const t=o.getState()[e],{queryCacheKey:n}=r.payload;u(n,null==(l=t.queries[n])?void 0:l.endpointName,o,t.config)}if(t.util.resetApiState.match(r))for(const[e,t]of Object.entries(s))t&&clearTimeout(t),delete s[e];if(n.hasRehydrationInfo(r)){const t=o.getState()[e],{queries:a}=n.extractRehydrationInfo(r);for(const[e,n]of Object.entries(a))u(e,null==n?void 0:n.endpointName,o,t.config)}}},pQ=({reducerPath:e,context:t,context:{endpointDefinitions:n},mutationThunk:r,queryThunk:o,api:a,assertTagType:i,refetchQuery:s,internalState:u})=>{const{removeQueryResult:l}=a.internalActions,c=cd(dd(r),py(r)),d=cd(dd(r,o),Mm(r,o));let f=[];function p(n,r){const o=r.getState(),i=o[e];if(f.push(...n),"delayed"===i.config.invalidationBehavior&&function(e){var t,n;for(const n in e.queries)if("pending"===(null==(t=e.queries[n])?void 0:t.status))return!0;for(const t in e.mutations)if("pending"===(null==(n=e.mutations[t])?void 0:n.status))return!0;return!1}(i))return;const c=f;if(f=[],0===c.length)return;const d=a.util.selectInvalidatedBy(o,c);t.batch((()=>{const e=Array.from(d.values());for(const{queryCacheKey:t}of e){const e=i.queries[t],n=u.currentSubscriptions[t]??{};e&&(0===Om(n)?r.dispatch(l({queryCacheKey:t})):"uninitialized"!==e.status&&r.dispatch(s(e,t)))}}))}return(e,t)=>{c(e)?p(x3(e,"invalidatesTags",n,i),t):d(e)?p([],t):a.util.invalidateTags.match(e)&&p(Y$(e.payload,void 0,void 0,void 0,void 0,i),t)}},mQ=({reducerPath:e,queryThunk:t,api:n,refetchQuery:r,internalState:o})=>{const a={};function i({queryCacheKey:t},n){const s=n.getState()[e],u=s.queries[t],c=o.currentSubscriptions[t];if(!u||"uninitialized"===u.status)return;const{lowestPollingInterval:d,skipPollingIfUnfocused:f}=l(c);if(!Number.isFinite(d))return;const p=a[t];null!=p&&p.timeout&&(clearTimeout(p.timeout),p.timeout=void 0);const m=Date.now()+d;a[t]={nextPollTimestamp:m,pollingInterval:d,timeout:setTimeout((()=>{(s.config.focused||!f)&&n.dispatch(r(u,t)),i({queryCacheKey:t},n)}),d)}}function s({queryCacheKey:t},n){const r=n.getState()[e].queries[t],s=o.currentSubscriptions[t];if(!r||"uninitialized"===r.status)return;const{lowestPollingInterval:c}=l(s);if(!Number.isFinite(c))return void u(t);const d=a[t],f=Date.now()+c;(!d||f<d.nextPollTimestamp)&&i({queryCacheKey:t},n)}function u(e){const t=a[e];null!=t&&t.timeout&&clearTimeout(t.timeout),delete a[e]}function l(e={}){let t=!1,n=Number.POSITIVE_INFINITY;for(let r in e)e[r].pollingInterval&&(n=Math.min(e[r].pollingInterval,n),t=e[r].skipPollingIfUnfocused||t);return{lowestPollingInterval:n,skipPollingIfUnfocused:t}}return(e,r)=>{(n.internalActions.updateSubscriptionOptions.match(e)||n.internalActions.unsubscribeQueryResult.match(e))&&s(e.payload,r),(t.pending.match(e)||t.rejected.match(e)&&e.meta.condition)&&s(e.meta.arg,r),(t.fulfilled.match(e)||t.rejected.match(e)&&!e.meta.condition)&&i(e.meta.arg,r),n.util.resetApiState.match(e)&&function(){for(const e of Object.keys(a))u(e)}()}},hQ=({reducerPath:e,context:t,api:n,refetchQuery:r,internalState:o})=>{const{removeQueryResult:a}=n.internalActions;function i(n,i){const s=n.getState()[e],u=s.queries,l=o.currentSubscriptions;t.batch((()=>{for(const e of Object.keys(l)){const t=u[e],o=l[e];o&&t&&((Object.values(o).some((e=>!0===e[i]))||Object.values(o).every((e=>void 0===e[i]))&&s.config[i])&&(0===Om(o)?n.dispatch(a({queryCacheKey:e})):"uninitialized"!==t.status&&n.dispatch(r(t,e))))}}))}return(e,t)=>{H$.match(e)&&i(t,"refetchOnFocus"),K$.match(e)&&i(t,"refetchOnReconnect")}},_O=new Error("Promise never resolved before cacheEntryRemoved."),vQ=({api:e,reducerPath:t,context:n,queryThunk:r,mutationThunk:o,internalState:a})=>{const i=CS(r),s=CS(o),u=dd(r,o),l={};function c(t,r,o,a,i){const s=n.endpointDefinitions[t],u=null==s?void 0:s.onCacheEntryAdded;if(!u)return;let c={};const d=new Promise((e=>{c.cacheEntryRemoved=e})),f=Promise.race([new Promise((e=>{c.valueResolved=e})),d.then((()=>{throw _O}))]);f.catch((()=>{})),l[o]=c;const p=e.endpoints[t].select("query"===s.type?r:o),m=a.dispatch(((e,t,n)=>n)),v={...a,getCacheEntry:()=>p(a.getState()),requestId:i,extra:m,updateCachedData:"query"===s.type?n=>a.dispatch(e.util.updateQueryData(t,r,n)):void 0,cacheDataLoaded:f,cacheEntryRemoved:d},h=u(r,v);Promise.resolve(h).catch((e=>{if(e!==_O)throw e}))}return(n,a,d)=>{const f=function(t){return i(t)?t.meta.arg.queryCacheKey:s(t)?t.meta.arg.fixedCacheKey??t.meta.requestId:e.internalActions.removeQueryResult.match(t)?t.payload.queryCacheKey:e.internalActions.removeMutationResult.match(t)?Cv(t.payload):""}(n);if(r.pending.match(n)){const e=d[t].queries[f],r=a.getState()[t].queries[f];!e&&r&&c(n.meta.arg.endpointName,n.meta.arg.originalArgs,f,a,n.meta.requestId)}else if(o.pending.match(n))a.getState()[t].mutations[f]&&c(n.meta.arg.endpointName,n.meta.arg.originalArgs,f,a,n.meta.requestId);else if(u(n)){const e=l[f];null!=e&&e.valueResolved&&(e.valueResolved({data:n.payload,meta:n.meta.baseQueryMeta}),delete e.valueResolved)}else if(e.internalActions.removeQueryResult.match(n)||e.internalActions.removeMutationResult.match(n)){const e=l[f];e&&(delete l[f],e.cacheEntryRemoved())}else if(e.util.resetApiState.match(n))for(const[e,t]of Object.entries(l))delete l[e],t.cacheEntryRemoved()}},gQ=({api:e,context:t,queryThunk:n,mutationThunk:r})=>{const o=fE(n,r),a=Mm(n,r),i=dd(n,r),s={};return(n,r)=>{var u,l;if(o(n)){const{requestId:o,arg:{endpointName:a,originalArgs:i}}=n.meta,u=t.endpointDefinitions[a],l=null==u?void 0:u.onQueryStarted;if(l){const t={},n=new Promise(((e,n)=>{t.resolve=e,t.reject=n}));n.catch((()=>{})),s[o]=t;const c=e.endpoints[a].select("query"===u.type?i:o),d=r.dispatch(((e,t,n)=>n)),f={...r,getCacheEntry:()=>c(r.getState()),requestId:o,extra:d,updateCachedData:"query"===u.type?t=>r.dispatch(e.util.updateQueryData(a,i,t)):void 0,queryFulfilled:n};l(i,f)}}else if(i(n)){const{requestId:e,baseQueryMeta:t}=n.meta;null==(u=s[e])||u.resolve({data:n.payload,meta:t}),delete s[e]}else if(a(n)){const{requestId:e,rejectedWithValue:t,baseQueryMeta:r}=n.meta;null==(l=s[e])||l.reject({error:n.payload??n.error,isUnhandledError:!t,meta:r}),delete s[e]}}},yQ=({api:e,context:{apiUid:t},reducerPath:n})=>(n,r)=>{e.util.resetApiState.match(n)&&r.dispatch(e.internalActions.middlewareRegistered(t))},wQ=({api:e,queryThunk:t,internalState:n})=>{const r=`${e.reducerPath}/subscriptions`;let o=null,a=null;const{updateSubscriptionOptions:i,unsubscribeQueryResult:s}=e.internalActions,u=()=>n.currentSubscriptions,l={getSubscriptions:u,getSubscriptionCount:e=>Om(u()[e]??{}),isRequestSubscribed:(e,t)=>{var n;const r=u();return!(null==(n=null==r?void 0:r[e])||!n[t])}};return(u,c)=>{if(o||(o=JSON.parse(JSON.stringify(n.currentSubscriptions))),e.util.resetApiState.match(u))return o=n.currentSubscriptions={},a=null,[!0,!1];if(e.internalActions.internal_getRTKQSubscriptions.match(u))return[!1,l];const d=((n,r)=>{var o,a,u;if(i.match(r)){const{queryCacheKey:e,requestId:t,options:a}=r.payload;return null!=(o=null==n?void 0:n[e])&&o[t]&&(n[e][t]=a),!0}if(s.match(r)){const{queryCacheKey:e,requestId:t}=r.payload;return n[e]&&delete n[e][t],!0}if(e.internalActions.removeQueryResult.match(r))return delete n[r.payload.queryCacheKey],!0;if(t.pending.match(r)){const{meta:{arg:e,requestId:t}}=r,o=n[a=e.queryCacheKey]??(n[a]={});return o[`${t}_running`]={},e.subscribe&&(o[t]=e.subscriptionOptions??o[t]??{}),!0}let l=!1;if(t.fulfilled.match(r)||t.rejected.match(r)){const e=n[r.meta.arg.queryCacheKey]||{},t=`${r.meta.requestId}_running`;l||(l=!!e[t]),delete e[t]}if(t.rejected.match(r)){const{meta:{condition:e,arg:t,requestId:o}}=r;if(e&&t.subscribe){const e=n[u=t.queryCacheKey]??(n[u]={});e[o]=t.subscriptionOptions??e[o]??{},l=!0}}return l})(n.currentSubscriptions,u);let f=!0;if(d){a||(a=setTimeout((()=>{const t=JSON.parse(JSON.stringify(n.currentSubscriptions)),[,r]=GO(o,(()=>t));c.next(e.internalActions.subscriptionsUpdated(r)),o=t,a=null}),500));const i="string"==typeof u.type&&!!u.type.startsWith(r),s=t.rejected.match(u)&&u.meta.condition&&!!u.meta.arg.subscribe;f=!i&&!s}return[f,!1]}};function bQ(e){const{reducerPath:t,queryThunk:n,api:r,context:o}=e,{apiUid:a}=o,i={invalidateTags:Vn(`${t}/invalidateTags`)},s=e=>e.type.startsWith(`${t}/`),u=[yQ,fQ,pQ,mQ,vQ,gQ];return{middleware:n=>{let i=!1;const c={...e,internalState:{currentSubscriptions:{}},refetchQuery:l,isThisApiSliceAction:s},d=u.map((e=>e(c))),f=wQ(c),p=hQ(c);return e=>u=>{if(!BO(u))return e(u);i||(i=!0,n.dispatch(r.internalActions.middlewareRegistered(a)));const l={...n,next:e},c=n.getState(),[m,v]=f(u,l,c);let h;if(h=m?e(u):v,n.getState()[t]&&(p(u,l,c),s(u)||o.hasRehydrationInfo(u)))for(let e of d)e(u,l,c);return h}},actions:i};function l(e,t,r={}){return n({type:"query",endpointName:e.endpointName,originalArgs:e.originalArgs,subscribe:!1,forceRefetch:!0,queryCacheKey:t,...r})}}function rd(e,...t){return Object.assign(e,...t)}var xO=Symbol(),_Q=({createSelector:e=Zn}={})=>({name:xO,init(t,{baseQuery:n,tagTypes:r,reducerPath:o,serializeQueryArgs:a,keepUnusedDataFor:i,refetchOnMountOrArgChange:s,refetchOnFocus:u,refetchOnReconnect:l,invalidationBehavior:c},d){uL();const f=e=>e;Object.assign(t,{reducerPath:o,endpoints:{},internalActions:{onOnline:K$,onOffline:b3,onFocus:H$,onFocusLost:w3},util:{}});const{queryThunk:p,mutationThunk:m,patchQueryData:v,updateQueryData:h,upsertQueryData:g,prefetch:y,buildMatchThunkActions:b}=aQ({baseQuery:n,reducerPath:o,context:d,api:t,serializeQueryArgs:a,assertTagType:f}),{reducer:w,actions:x}=sQ({context:d,queryThunk:p,mutationThunk:m,reducerPath:o,assertTagType:f,config:{refetchOnFocus:u,refetchOnReconnect:l,refetchOnMountOrArgChange:s,keepUnusedDataFor:i,reducerPath:o,invalidationBehavior:c}});rd(t.util,{patchQueryData:v,updateQueryData:h,upsertQueryData:g,prefetch:y,resetApiState:x.resetApiState}),rd(t.internalActions,x);const{middleware:_,actions:E}=bQ({reducerPath:o,context:d,queryThunk:p,mutationThunk:m,api:t,assertTagType:f});rd(t.util,E),rd(t,{reducer:w,middleware:_});const{buildQuerySelector:S,buildMutationSelector:I,selectInvalidatedBy:A,selectCachedArgsForQuery:k}=uQ({serializeQueryArgs:a,reducerPath:o,createSelector:e});rd(t.util,{selectInvalidatedBy:A,selectCachedArgsForQuery:k});const{buildInitiateQuery:C,buildInitiateMutation:P,getRunningMutationThunk:R,getRunningMutationsThunk:O,getRunningQueriesThunk:T,getRunningQueryThunk:N}=iQ({queryThunk:p,mutationThunk:m,api:t,serializeQueryArgs:a,context:d});return rd(t.util,{getRunningMutationThunk:R,getRunningMutationsThunk:O,getRunningQueryThunk:N,getRunningQueriesThunk:T}),{name:xO,injectEndpoint(e,n){var r;const o=t;(r=o.endpoints)[e]??(r[e]={}),_3(n)?rd(o.endpoints[e],{name:e,select:S(e,n),initiate:C(e,n)},b(p,e)):nQ(n)&&rd(o.endpoints[e],{name:e,select:I(),initiate:P(e)},b(m,e))}}}});function xQ(e){return"query"===e.type}function SQ(e){return"mutation"===e.type}function Lg(e,...t){return Object.assign(e,...t)}function dS(e){return e.replace(e[0],e[0].toUpperCase())}var Em=WeakMap?new WeakMap:void 0,EQ=({endpointName:e,queryArgs:t})=>{let n="";const r=null==Em?void 0:Em.get(t);if("string"==typeof r)n=r;else{const e=JSON.stringify(t,((e,t)=>ld(t)?Object.keys(t).sort().reduce(((e,n)=>(e[n]=t[n],e)),{}):t));ld(t)&&(null==Em||Em.set(t,e)),n=e}return`${e}(${n})`},fS=Symbol();function SO(e,t,n,r){const o=v.useMemo((()=>({queryArgs:e,serialized:"object"==typeof e?t({queryArgs:e,endpointDefinition:n,endpointName:r}):e})),[e,t,n,r]),a=v.useRef(o);return v.useEffect((()=>{a.current.serialized!==o.serialized&&(a.current=o)}),[o]),a.current.serialized===o.serialized?a.current.queryArgs:e}function pS(e){const t=v.useRef(e);return v.useEffect((()=>{rv(t.current,e)||(t.current=e)}),[e]),rv(t.current,e)?t.current:e}var $Q=typeof window<"u"&&window.document&&window.document.createElement?v.useLayoutEffect:v.useEffect,CQ=e=>e.isUninitialized?{...e,isUninitialized:!1,isFetching:!0,isLoading:void 0===e.data,status:g3.pending}:e;function IQ({api:e,moduleOptions:{batch:t,hooks:{useDispatch:n,useSelector:r,useStore:o},unstable__sideEffectsInRender:a,createSelector:i},serializeQueryArgs:s,context:u}){const l=a?e=>e():v.useEffect;return{buildQueryHooks:function(a){const d=(t,{refetchOnReconnect:r,refetchOnFocus:o,refetchOnMountOrArgChange:i,skip:s=!1,pollingInterval:c=0,skipPollingIfUnfocused:d=!1}={})=>{const{initiate:f}=e.endpoints[a],p=n(),m=v.useRef();if(!m.current){const t=p(e.internalActions.internal_getRTKQSubscriptions());m.current=t}const h=SO(s?Ff:t,EQ,u.endpointDefinitions[a],a),g=pS({refetchOnReconnect:r,refetchOnFocus:o,pollingInterval:c,skipPollingIfUnfocused:d}),y=v.useRef(!1),b=v.useRef();let{queryCacheKey:w,requestId:x}=b.current||{},_=!1;w&&x&&(_=m.current.isRequestSubscribed(w,x));const E=!_&&y.current;return l((()=>{y.current=_})),l((()=>{E&&(b.current=void 0)}),[E]),l((()=>{var e;const t=b.current;if(h===Ff)return null==t||t.unsubscribe(),void(b.current=void 0);const n=null==(e=b.current)?void 0:e.subscriptionOptions;if(t&&t.arg===h)g!==n&&t.updateSubscriptionOptions(g);else{null==t||t.unsubscribe();const e=p(f(h,{subscriptionOptions:g,forceRefetch:i}));b.current=e}}),[p,f,i,h,g,E]),v.useEffect((()=>()=>{var e;null==(e=b.current)||e.unsubscribe(),b.current=void 0}),[]),v.useMemo((()=>({refetch:()=>{var e;if(!b.current)throw new Error($o(38));return null==(e=b.current)?void 0:e.refetch()}})),[])},f=({refetchOnReconnect:r,refetchOnFocus:o,pollingInterval:i=0,skipPollingIfUnfocused:s=!1}={})=>{const{initiate:u}=e.endpoints[a],c=n(),[d,f]=v.useState(fS),p=v.useRef(),m=pS({refetchOnReconnect:r,refetchOnFocus:o,pollingInterval:i,skipPollingIfUnfocused:s});l((()=>{var e,t;const n=null==(e=p.current)?void 0:e.subscriptionOptions;m!==n&&(null==(t=p.current)||t.updateSubscriptionOptions(m))}),[m]);const h=v.useRef(m);l((()=>{h.current=m}),[m]);const g=v.useCallback((function(e,n=!1){let r;return t((()=>{var t;null==(t=p.current)||t.unsubscribe(),p.current=r=c(u(e,{subscriptionOptions:h.current,forceRefetch:!n})),f(e)})),r}),[c,u]);return v.useEffect((()=>()=>{var e;null==(e=null==p?void 0:p.current)||e.unsubscribe()}),[]),v.useEffect((()=>{d!==fS&&!p.current&&g(d,!0)}),[d,g]),v.useMemo((()=>[g,d]),[g,d])},p=(t,{skip:n=!1,selectFromResult:l}={})=>{const{select:d}=e.endpoints[a],f=SO(n?Ff:t,s,u.endpointDefinitions[a],a),p=v.useRef(),m=v.useMemo((()=>i([d(f),(e,t)=>t,e=>f],c,{memoizeOptions:{resultEqualityCheck:rv}})),[d,f]),h=v.useMemo((()=>l?i([m],l,{devModeChecks:{identityFunctionCheck:"never"}}):m),[m,l]),g=r((e=>h(e,p.current)),rv),y=o(),b=m(y.getState(),p.current);return $Q((()=>{p.current=b}),[b]),g};return{useQueryState:p,useQuerySubscription:d,useLazyQuerySubscription:f,useLazyQuery(e){const[t,n]=f(e),r=p(n,{...e,skip:n===fS}),o=v.useMemo((()=>({lastArg:n})),[n]);return v.useMemo((()=>[t,r,o]),[t,r,o])},useQuery(e,t){const n=d(e,t),r=p(e,{selectFromResult:e===Ff||null!=t&&t.skip?void 0:CQ,...t}),{data:o,status:a,isLoading:i,isSuccess:s,isError:u,error:l}=r;return v.useDebugValue({data:o,status:a,isLoading:i,isSuccess:s,isError:u,error:l}),v.useMemo((()=>({...r,...n})),[r,n])}}},buildMutationHook:function(o){return({selectFromResult:a,fixedCacheKey:s}={})=>{const{select:u,initiate:l}=e.endpoints[o],c=n(),[d,f]=v.useState();v.useEffect((()=>()=>{null!=d&&d.arg.fixedCacheKey||null==d||d.reset()}),[d]);const p=v.useCallback((function(e){const t=c(l(e,{fixedCacheKey:s}));return f(t),t}),[c,l,s]),{requestId:m}=d||{},h=v.useMemo((()=>u({fixedCacheKey:s,requestId:null==d?void 0:d.requestId})),[s,d,u]),g=v.useMemo((()=>a?i([h],a):h),[a,h]),y=r(g,rv),b=null==s?null==d?void 0:d.arg.originalArgs:void 0,w=v.useCallback((()=>{t((()=>{d&&f(void 0),s&&c(e.internalActions.removeMutationResult({requestId:m,fixedCacheKey:s}))}))}),[c,s,d,m]),{endpointName:x,data:_,status:E,isLoading:S,isSuccess:I,isError:A,error:k}=y;v.useDebugValue({endpointName:x,data:_,status:E,isLoading:S,isSuccess:I,isError:A,error:k});const C=v.useMemo((()=>({...y,originalArgs:b,reset:w})),[y,b,w]);return v.useMemo((()=>[p,C]),[p,C])}},usePrefetch:function(t,r){const o=n(),a=pS(r);return v.useCallback(((n,r)=>o(e.util.prefetch(t,n,{...a,...r}))),[t,o,a])}};function c(e,t,n){if(null!=t&&t.endpointName&&e.isUninitialized){const{endpointName:e}=t,r=u.endpointDefinitions[e];s({queryArgs:t.originalArgs,endpointDefinition:r,endpointName:e})===s({queryArgs:n,endpointDefinition:r,endpointName:e})&&(t=void 0)}let r=e.isSuccess?e.data:null==t?void 0:t.data;void 0===r&&(r=e.data);const o=void 0!==r,a=e.isLoading,i=!o&&a,l=e.isSuccess||a&&o;return{...e,data:r,currentData:e.data,isFetching:a,isLoading:i,isSuccess:l}}}var RQ=Symbol(),PQ=({batch:e=l5,hooks:t={useDispatch:vE,useSelector:vy,useStore:ZO},createSelector:n=Zn,unstable__sideEffectsInRender:r=!1,...o}={})=>({name:RQ,init(o,{serializeQueryArgs:a},i){const s=o,{buildQueryHooks:u,buildMutationHook:l,usePrefetch:c}=IQ({api:o,moduleOptions:{batch:e,hooks:t,unstable__sideEffectsInRender:r,createSelector:n},serializeQueryArgs:a,context:i});return Lg(s,{usePrefetch:c}),Lg(i,{batch:e}),{injectEndpoint(e,t){if(xQ(t)){const{useQuery:t,useLazyQuery:n,useLazyQuerySubscription:r,useQueryState:a,useQuerySubscription:i}=u(e);Lg(s.endpoints[e],{useQuery:t,useLazyQuery:n,useLazyQuerySubscription:r,useQueryState:a,useQuerySubscription:i}),o[`use${dS(e)}Query`]=t,o[`useLazy${dS(e)}Query`]=n}else if(SQ(t)){const t=l(e);Lg(s.endpoints[e],{useMutation:t}),o[`use${dS(e)}Mutation`]=t}}}}}),TQ=lQ(_Q(),PQ());const E3=()=>I3()?location.hostname:location.hostname.replace(/\w\w\w\.|^/,"."),$3=e=>{const t=new Date;return t.setTime(t.getTime()+24*e*60*60*1e3),t.toUTCString()},C3=e=>Object.keys(e).reduce(((t,n)=>`${t}${n}${!0===e[n]?"":`=${e[n]}`};`),""),OQ=(e,t)=>{const n=Zy()?"":document.cookie,r=`; ${t||n}`.split(`; ${e}=`);if(2===r.length)return(r.pop()||"").replace("=","").split(";").shift()},AQ=(e,t)=>{Zy()||(document.cookie=C3({[e]:"",path:"/",domain:t||E3(),expires:"Thu, 01 Jan 1970 00:00:01 GMT"}))},MQ=["localhost","127.0.0.1","dev.localtest.me","wellesleydev.localtest.me"],I3=()=>MQ.includes(location.hostname),DQ=(e,t="",n=10,r)=>{Zy()||(document.cookie=C3({[e]:t,path:"/",domain:r||E3(),expires:$3(n),...!I3()&&{SameSite:"None",Secure:!0}}))},Q$={set:DQ,remove:AQ,get:OQ,getExpireDate:$3},X$="auth_token",R3=()=>Q$.get(X$)||void 0,NQ=e=>Q$.set(X$,e),kQ=()=>Q$.remove(X$),LQ=()=>!!R3(),J$={getToken:R3,setToken:NQ,removeToken:kQ,hasToken:LQ},FQ=e=>{J$.removeToken(),e(OH()),V$("user").clear()},BQ=e=>async(t,n,r)=>{const o=await e(t,n,r);return o.error&&[401].includes(o.error.status)&&FQ(n.dispatch),o},jQ=async(e,t=2e3)=>{for(;!e();)await new Promise((e=>setTimeout(e,t)))},zQ=5,VQ=e=>t=>!!e&&t.includes(e.status),EO=e=>new Promise((t=>setTimeout(t,1e3*e))),UQ=e=>async(t,n,r)=>{const o=(null==r?void 0:r.maxRetries)??5;await jQ((()=>n.getState().network.isOnline));let a=0;const i=async()=>{var s,u,l,c;const d=await e(t,n,r),f=d.error;if(a>=o)return d;a>0&&await EO(Math.pow(2,a)),a++;const p=VQ(f);switch(!0){case"mutation"===n.type:return d;case!navigator.onLine:case p([408,404]):case f&&"FETCH_ERROR"===(null==f?void 0:f.status):case f&&f.status>=500:return await i();case 429===(null==(s=null==d?void 0:d.error)?void 0:s.status):{const e=null==(c=null==(l=null==(u=d.meta)?void 0:u.response)?void 0:l.headers)?void 0:c.get("Retry-After");return await EO(+(e||"0")),await i()}default:return d}};return await i()},$O=Vn("requestOpenapiHydrationCacheHas"),CO=Vn("requestOpenapiHydrationCacheAdd"),IO=Vn("requestOpenapiHydrationCacheRemove"),RO=Vn("requestOpenapiHydrationCacheClear"),PO=Vn("sendOpenapiHydrationCacheResponse"),WQ=()=>Math.random().toString(16).slice(2),qQ=()=>{try{return!!Cm()&&window.location.origin!==window.parent.location.origin}catch{return!0}},Fg=()=>{const e=window.parent;return e.__wlsy_openapiHydrationCache||(e.__wlsy_openapiHydrationCache=new Set),e.__wlsy_openapiHydrationCache},Bg=new Set,GQ=()=>{const e=qQ(),t=new Map,n=(()=>{let n=null;return()=>{!e||n||(n=e3({sourceWindow:window.parent,onMessage:e=>{if(!PO.match(e))return;const{id:n,value:r,success:o,error:a}=e.payload,i=t.get(n);i&&(t.delete(n),window.clearTimeout(i.timeoutId),o?i.resolve(r):i.reject(new Error(a||"Unknown error")))},whitelist:[PO]}))}})(),r=(e,r)=>{const o=WQ();return new Promise(((a,i)=>{const s=window.setTimeout((()=>{t.delete(o),i(new Error("OpenAPI hydration cache request timed out"))}),8e3);t.set(o,{resolve:a,reject:i,timeoutId:s}),(e=>{n(),Zk({action:e,windowElement:window.parent,whitelist:[$O,CO,IO,RO]})})(e({id:o,...r}))}))};return{has:async t=>e?!!await r($O,{key:t}):(t=>Cm()&&!e?Fg().has(t):Bg.has(t))(t),add:async t=>{e?await r(CO,{key:t}):(t=>{!Cm()||e?Bg.add(t):Fg().add(t)})(t)},remove:async t=>{e?await r(IO,{key:t}):(t=>{!Cm()||e?Bg.delete(t):Fg().delete(t)})(t)},clear:async()=>{e?await r(RO,{}):!Cm()||e?Bg.clear():Fg().clear()}}},HQ=e=>"object"==typeof e&&null!==e,TO=GQ(),KQ=e=>async(t,n,r)=>{var o,a,i,s;if("mutation"===n.type)return e(t,n,r);const u=n.endpoint;if(!u||!(null!=r&&r.initialDataKey||null!=r&&r.initialDataKeyResolver||null!=r&&r.initialDataResolver))return e(t,n,r);const l=(null==(o=null==r?void 0:r.initialDataKeyResolver)?void 0:o.call(r,{endpoint:u,requestArgs:t}))??(null==r?void 0:r.initialDataKey),c=(null==(a=null==r?void 0:r.hydrationCacheKeyResolver)?void 0:a.call(r,{endpoint:u,requestArgs:t,initialDataKey:l}))??(l?`initialDataKey:${l}`:u);if(await TO.has(c))return e(t,n,r);const d=null==(i=n.getState().initialState)?void 0:i.value,f=(null==(s=null==r?void 0:r.initialDataResolver)?void 0:s.call(r,{endpoint:u,requestArgs:t,initialState:d}))??(()=>{if(l)return HQ(d)?d[l]:void 0})();return void 0===f?e(t,n,r):(await TO.add(c),{data:f})};var P3=(e=>(e.SERVER_RULES="serverRules",e.INVITE_PEOPLE="invitePeople",e))(P3||{});const n0="staticState",T3=V$(),Wg={path:"",baseUrl:"",search:""},YQ=e=>{if(!e)return Wg;try{return JSON.parse(decodeURIComponent(e))||Wg}catch(e){return ap.error("Error parsing static state",e),Wg}},O3=()=>new URLSearchParams(window.location.search).get(n0),QQ=({path:e,baseUrl:t,search:n}={})=>{const{pathname:r,origin:o,search:a}=window.location;return`${n0}=${encodeURIComponent(JSON.stringify({path:e||r,baseUrl:t||o,search:n||a}))}`},XQ=()=>{const e=O3();return e&&T3.setItem(n0,e),A3()},A3=()=>{try{const e=T3.getItem(n0)||O3();return YQ(e)}catch(e){return ap.error("Error parsing static state",e),Wg}},JQ={create:QQ,init:XQ,get:A3},ZQ=async e=>{const t={};e.headers.forEach(((e,n)=>{t[n]=e}));return{body:["get","head"].includes(e.method.toLowerCase())?null:await(async()=>{try{return await e.text()}catch(e){return ap.error("No body or error reading body:",e),null}})(),headers:t,url:e.url,method:e.method,mode:e.mode,credentials:e.credentials,cache:e.cache,redirect:e.redirect,referrer:e.referrer,integrity:e.integrity}},eX=e=>{const{url:t,status:n,statusText:r,headers:o,body:a}=e,i=new Response(JSON.stringify(a),{status:n,statusText:r,headers:o});return Object.defineProperties(i,{url:{value:t},type:{value:"cors"}}),i},tX=async e=>{const t=crypto.randomUUID();return new Promise(((n,r)=>{const o=e3({onMessage:({payload:{id:e,response:r}})=>{t===e&&(null==o||o(),n(eX(r)))},whitelist:[AK]});(async()=>{try{Zk({action:b2({id:t,options:await ZQ(e)}),windowElement:window.parent,whitelist:[b2]})}catch(e){r(e)}})()}))};new EventTarget;const Z$=()=>{var e;try{return(null==(e=window.wellesley)?void 0:e.v1)||window.wellesley}catch(e){ap.error("Error getting window.wellesley:",e)}},nX=e=>new Response(JSON.stringify(e),{status:200,statusText:"OK",headers:{"Content-Type":"application/json"}}),rX=e=>{var t,n;if(e.url.includes("accounts/profile")){const e=null==(n=null==(t=Z$())?void 0:t.initialState)?void 0:n.currentAccount;return!(null==e||!e.selectedUserId)&&nX(e)}},oX=Object.freeze(Object.defineProperty({__proto__:null,userHandler:rX},Symbol.toStringTag,{value:"Module"})),iX=e=>Object.values(oX).reduce(((t,n)=>t||n(e)),void 0),aX=async e=>iX(e)||await fetch(e),sX=()=>e=>Cm()?tX(e):aX(e),uX=JQ.get().baseUrl,lX=uX||"",cX=tQ({fetchFn:sX(),baseUrl:lX,responseHandler:e=>{const t=e.headers.get("content-type");if(!(null==t?void 0:t.startsWith("application/json")))return e.text();try{return e.json()}catch{return e.text()}},prepareHeaders:e=>{const t=J$.getToken();return t&&e.set("authorization",`Bearer ${t}`),e}}),dX=BQ(KQ(UQ(cX))),fX=TQ({tagTypes:["Secure","Post","Follow","Like","Settings","UserSettings","RBAC","Rbac_Config","Admin_Apps","Admin_Platform_Data","Admin_Ai_Agents_Assignments","Admin_Users","Admin_Groups","Admin_Audit_Logs","Admin_Reports","Admin_Signup_Requests","Admin_Posts","Admin_Uploads","Admin_Roles","Admin_Jobs_Stats","Admin_Federation","Admin_Domain_Block","Admin_Custom_Emojis","Admin_Domain_Allow","Admin_Link_Service_Configure","Groups","Group_Channels","GroupMembers","GroupMembership","GroupRules","Group_Roles","Group_Join_Requests","Group_Apps","Group_Ai_Agents_Assignments","User_Apps","Account","Profile","UserNoHtml","Relationship","Bookmarks","Global_Search","Events","Event","EventAttendees",...Object.values(P3)],reducerPath:"openapi",baseQuery:dX,endpoints:()=>({})}),pX=fX.injectEndpoints({endpoints:e=>({getApiMetaCompat:e.query({query:()=>({url:"/api/meta/compat"})}),postApiV1AccountsAddReason:e.mutation({query:e=>({url:"/api/v1/accounts/add-reason",method:"POST",body:e.signupReasonParams})}),postApiV1AccountsAuthenticateEmail:e.mutation({query:e=>({url:"/api/v1/accounts/authenticate/email",method:"POST",body:e.authRequest})}),postApiV1AccountsAuthenticatePhone:e.mutation({query:e=>({url:"/api/v1/accounts/authenticate/phone",method:"POST",body:e.authPhoneRequest})}),putApiV1AccountsChangeName:e.mutation({query:e=>({url:"/api/v1/accounts/change/name",method:"PUT",params:{id:e.id,name:e.name,username:e.username}})}),postApiV1AccountsCheckCaptcha:e.mutation({query:e=>({url:"/api/v1/accounts/check-captcha",method:"POST",body:e.captchaVerificationParams})}),postApiV1AccountsConfirmEmail:e.mutation({query:e=>({url:"/api/v1/accounts/confirm-email",method:"POST",body:e.codeVerificationParams})}),postApiV1AccountsConfirmPhone:e.mutation({query:e=>({url:"/api/v1/accounts/confirm-phone",method:"POST",body:e.codeVerificationParams})}),deleteApiV1AccountsDelete:e.mutation({query:()=>({url:"/api/v1/accounts/delete",method:"DELETE"})}),postApiV1AccountsEmailChangeConfirm:e.mutation({query:e=>({url:"/api/v1/accounts/email/change/confirm",method:"POST",body:e.body})}),postApiV1AccountsEmailChangeRequest:e.mutation({query:e=>({url:"/api/v1/accounts/email/change/request",method:"POST",body:e.emailChangeRequest})}),putApiV1AccountsEmailChangeResendCode:e.mutation({query:()=>({url:"/api/v1/accounts/email/change/resend-code",method:"PUT"})}),postApiV1AccountsFinishCreating:e.mutation({query:e=>({url:"/api/v1/accounts/finish-creating",method:"POST",body:e.finishCreatingAccountParams,params:{htmlContent:e.htmlContent}})}),putApiV1AccountsGetTokenByHash:e.mutation({query:e=>({url:`/api/v1/accounts/get-token/${e.hash}`,method:"PUT"})}),postApiV1AccountsLoginsAddEmailPassword:e.mutation({query:e=>({url:"/api/v1/accounts/logins/add-email-password",method:"POST",body:e.addEmailRequest})}),postApiV1AccountsLoginsAddEmailPasswordConfirm:e.mutation({query:e=>({url:"/api/v1/accounts/logins/add-email-password/confirm",method:"POST",body:e.body})}),putApiV1AccountsLoginsAddEmailPasswordResendCode:e.mutation({query:()=>({url:"/api/v1/accounts/logins/add-email-password/resend-code",method:"PUT"})}),postApiV1AccountsLoginsAddPhone:e.mutation({query:e=>({url:"/api/v1/accounts/logins/add-phone",method:"POST",body:e.addPhoneRequest})}),deleteApiV1AccountsLoginsRemoveEmailPassword:e.mutation({query:()=>({url:"/api/v1/accounts/logins/remove-email-password",method:"DELETE"})}),deleteApiV1AccountsLoginsRemovePhone:e.mutation({query:()=>({url:"/api/v1/accounts/logins/remove-phone",method:"DELETE"})}),postApiV1AccountsPasswordChangeConfirm:e.mutation({query:e=>({url:"/api/v1/accounts/password/change/confirm",method:"POST",body:e.body})}),postApiV1AccountsPasswordChangeRequest:e.mutation({query:e=>({url:"/api/v1/accounts/password/change/request",method:"POST",body:e.passwordChangeRequest})}),putApiV1AccountsPasswordChangeResendCode:e.mutation({query:()=>({url:"/api/v1/accounts/password/change/resend-code",method:"PUT"})}),postApiV1AccountsPasswordRecover:e.mutation({query:e=>({url:"/api/v1/accounts/password/recover",method:"POST",body:e.passwordRecoveryRequest})}),postApiV1AccountsPasswordRecoverChange:e.mutation({query:e=>({url:"/api/v1/accounts/password/recover/change",method:"POST",body:e.passwordRecoveryChange})}),postApiV1AccountsPasswordRecoverCheckCode:e.mutation({query:e=>({url:"/api/v1/accounts/password/recover/check-code",method:"POST",body:e.passwordRecoveryCode})}),postApiV1AccountsPhoneChangeConfirmAuth:e.mutation({query:e=>({url:"/api/v1/accounts/phone/change/confirm/auth",method:"POST",body:e.body})}),postApiV1AccountsPhoneChangeConfirmNewPhone:e.mutation({query:e=>({url:"/api/v1/accounts/phone/change/confirm/new-phone",method:"POST",body:e.body})}),postApiV1AccountsPhoneChangeNewPhone:e.mutation({query:e=>({url:"/api/v1/accounts/phone/change/new-phone",method:"POST",body:e.addPhoneRequest})}),putApiV1AccountsPhoneChangeRequest:e.mutation({query:()=>({url:"/api/v1/accounts/phone/change/request",method:"PUT"})}),putApiV1AccountsPhoneChangeResendCodeAuth:e.mutation({query:()=>({url:"/api/v1/accounts/phone/change/resend-code/auth",method:"PUT"})}),putApiV1AccountsPhoneChangeResendCodeNewPhone:e.mutation({query:()=>({url:"/api/v1/accounts/phone/change/resend-code/new-phone",method:"PUT"})}),getApiV1AccountsProfile:e.query({query:e=>({url:"/api/v1/accounts/profile",params:{htmlContent:e.htmlContent}})}),putApiV1AccountsResendCodeByHash:e.mutation({query:e=>({url:`/api/v1/accounts/resend-code/${e.hash}`,method:"PUT"})}),putApiV1AccountsResendEmailByHash:e.mutation({query:e=>({url:`/api/v1/accounts/resend-email/${e.hash}`,method:"PUT"})}),postApiV1AccountsSignup:e.mutation({query:e=>({url:"/api/v1/accounts/signup",method:"POST",body:e.accountCreate})}),postApiV1AccountsSignupPhone:e.mutation({query:e=>({url:"/api/v1/accounts/signup-phone",method:"POST",body:e.phoneSignup})}),postApiV1AccountsUserReselectUser:e.mutation({query:e=>({url:"/api/v1/accounts/user/reselect-user",method:"POST",params:{userId:e.userId,userName:e.userName}})}),getApiV1AddressesSuggest:e.query({query:e=>({url:"/api/v1/addresses/suggest",params:{lang:e.lang,text:e.text}})}),getApiV1AdminAccountByAccountId:e.query({query:e=>({url:`/api/v1/admin/account/${e.accountId}`,params:{htmlContent:e.htmlContent}})}),getApiV1AdminAuditLog:e.query({query:e=>({url:"/api/v1/admin/audit_log",params:{accountId:e.accountId,action:e.action,appId:e.appId,domainSearch:e.domainSearch,email:e.email,group:e.group,groupId:e.groupId,lastId:e.lastId,limit:e.limit,offset:e.offset,ruleId:e.ruleId,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,userId:e.userId,username:e.username}})}),putApiV1AdminChangeEmail:e.mutation({query:e=>({url:"/api/v1/admin/change/email",method:"PUT",params:{email:e.email,id:e.id,username:e.username}})}),putApiV1AdminChangePassword:e.mutation({query:e=>({url:"/api/v1/admin/change/password",method:"PUT",params:{id:e.id,password:e.password,username:e.username}})}),putApiV1AdminChangeRoleAssign:e.mutation({query:e=>({url:"/api/v1/admin/change/role/assign",method:"PUT",params:{id:e.id,role:e.role,username:e.username,htmlContent:e.htmlContent}})}),putApiV1AdminChangeRoleRevoke:e.mutation({query:e=>({url:"/api/v1/admin/change/role/revoke",method:"PUT",params:{id:e.id,role:e.role,username:e.username,htmlContent:e.htmlContent}})}),postApiV1AdminClearApErrors:e.mutation({query:e=>({url:"/api/v1/admin/clear-ap-errors",method:"POST",params:{domain:e.domain}})}),postApiV1AdminCreateAccount:e.mutation({query:e=>({url:"/api/v1/admin/create-account",method:"POST",body:e.accountCreate,params:{htmlContent:e.htmlContent}})}),postApiV1AdminCreateUser:e.mutation({query:e=>({url:"/api/v1/admin/create-user",method:"POST",body:e.userCreate,params:{account_id:e.accountId,htmlContent:e.htmlContent}})}),deleteApiV1AdminDelete:e.mutation({query:e=>({url:"/api/v1/admin/delete",method:"DELETE",params:{email:e.email,id:e.id,username:e.username}})}),deleteApiV1AdminDeleteUser:e.mutation({query:e=>({url:"/api/v1/admin/delete-user",method:"DELETE",params:{id:e.id,username:e.username}})}),getApiV1AdminDomainAllow:e.query({query:e=>({url:"/api/v1/admin/domain-allow",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),postApiV1AdminDomainAllow:e.mutation({query:e=>({url:"/api/v1/admin/domain-allow",method:"POST",body:e.allowedDomainReq})}),deleteApiV1AdminDomainAllowByDomain:e.mutation({query:e=>({url:`/api/v1/admin/domain-allow/${e.domain}`,method:"DELETE"})}),putApiV1AdminDomainBlock:e.mutation({query:e=>({url:"/api/v1/admin/domain-block",method:"PUT",body:e.blockDomainReq})}),getApiV1AdminDomainBlock:e.query({query:e=>({url:"/api/v1/admin/domain-block",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),postApiV1AdminDomainBlock:e.mutation({query:e=>({url:"/api/v1/admin/domain-block",method:"POST",body:e.blockDomainReq})}),deleteApiV1AdminDomainBlockByDomain:e.mutation({query:e=>({url:`/api/v1/admin/domain-block/${e.domain}`,method:"DELETE"})}),getApiV1AdminEmailAllow:e.query({query:()=>({url:"/api/v1/admin/email-allow"})}),postApiV1AdminEmailAllow:e.mutation({query:e=>({url:"/api/v1/admin/email-allow",method:"POST",body:e.allowedDomainReq})}),deleteApiV1AdminEmailAllowByDomain:e.mutation({query:e=>({url:`/api/v1/admin/email-allow/${e.domain}`,method:"DELETE"})}),getApiV1AdminEmailBlock:e.query({query:()=>({url:"/api/v1/admin/email-block"})}),postApiV1AdminEmailBlock:e.mutation({query:e=>({url:"/api/v1/admin/email-block",method:"POST",body:e.blockEmailRequest})}),deleteApiV1AdminEmailBlockByPattern:e.mutation({query:e=>({url:`/api/v1/admin/email-block/${e.pattern}`,method:"DELETE"})}),getApiV1AdminFederation:e.query({query:e=>({url:"/api/v1/admin/federation",params:{blockState:e.blockState,lastId:e.lastId,limit:e.limit,offset:e.offset,search:e.search,sortBy:e.sortBy,sortOrder:e.sortOrder,unavailable:e.unavailable,untilId:e.untilId,warning:e.warning}})}),getApiV1AdminFederationMetricsOperations:e.query({query:e=>({url:"/api/v1/admin/federation/metrics/operations",params:{window:e.window}})}),getApiV1AdminFederationMetricsRunningAverageSingle:e.query({query:e=>({url:"/api/v1/admin/federation/metrics/running-average-single",params:{operation:e.operation,window:e.window}})}),getApiV1AdminFederationMetricsRunningAveragesAll:e.query({query:e=>({url:"/api/v1/admin/federation/metrics/running-averages-all",params:{operations:e.operations,window:e.window}})}),getApiV1AdminFederationByDomain:e.query({query:e=>({url:`/api/v1/admin/federation/${e.domain}`})}),postApiV1AdminFeedClearUserFeed:e.mutation({query:e=>({url:"/api/v1/admin/feed/clear-user-feed",method:"POST",params:{userId:e.userId,username:e.username}})}),getApiV1AdminFeedDiagnose:e.query({query:e=>({url:"/api/v1/admin/feed/diagnose",params:{limit:e.limit,skipExactMatch:e.skipExactMatch,skipFull:e.skipFull,skipOrderMismatch:e.skipOrderMismatch,userId:e.userId,username:e.username}})}),getApiV1AdminFeedMetricsGlobalAllOperation:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/global-all-operation",params:{window:e.window}})}),getApiV1AdminFeedMetricsGlobalSingle:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/global-single",params:{operation:e.operation,window:e.window}})}),getApiV1AdminFeedMetricsHistory:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/history",params:{limit:e.limit,operation:e.operation,userId:e.userId}})}),getApiV1AdminFeedMetricsHistoryAll:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/history/all",params:{limit:e.limit,userId:e.userId}})}),getApiV1AdminFeedMetricsRunningAverageSingle:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/running-average-single",params:{operation:e.operation,userId:e.userId,window:e.window}})}),getApiV1AdminFeedMetricsRunningAveragesAll:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/running-averages-all",params:{userId:e.userId,window:e.window}})}),getApiV1AdminFeedMetricsSlowestOperations:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/slowest-operations",params:{limit:e.limit,window:e.window}})}),getApiV1AdminFeedMetricsSlowestUsers:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/slowest-users",params:{limit:e.limit,operation:e.operation,window:e.window}})}),getApiV1AdminFeedMetricsSlowestUsersAll:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/slowest-users-all",params:{limit:e.limit,sortDesc:e.sortDesc,window:e.window}})}),getApiV1AdminFeedMetricsSlowestUsersSingle:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/slowest-users-single",params:{limit:e.limit,operation:e.operation,sortDesc:e.sortDesc,window:e.window}})}),getApiV1AdminFeedMetricsSummary:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/summary",params:{includeUserCounts:e.includeUserCounts,window:e.window}})}),getApiV1AdminFeedMetricsUserCountAll:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/user-count-all",params:{window:e.window}})}),getApiV1AdminFeedMetricsUserCountSingle:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/user-count-single",params:{operation:e.operation,window:e.window}})}),postApiV1AdminFeedRegenerateUserFeed:e.mutation({query:e=>({url:"/api/v1/admin/feed/regenerate-user-feed",method:"POST",params:{clear:e.clear,userId:e.userId,username:e.username}})}),getApiV1AdminGroupsSearch:e.query({query:e=>({url:"/api/v1/admin/groups/search",params:{accountId:e.accountId,displayName:e.displayName,domain:e.domain,email:e.email,joinMode:e.joinMode,lastId:e.lastId,limit:e.limit,offset:e.offset,privacy:e.privacy,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,userId:e.userId,username:e.username,visibility:e.visibility}})}),getApiV1AdminGroupsUserByUserId:e.query({query:e=>({url:`/api/v1/admin/groups/user/${e.userId}`,params:{lastId:e.lastId,limit:e.limit,offset:e.offset,roles:e.roles,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),getApiV1AdminGroupsByAccountId:e.query({query:e=>({url:`/api/v1/admin/groups/${e.accountId}`,params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),getApiV1AdminGroupsByGroupIdCategories:e.query({query:e=>({url:`/api/v1/admin/groups/${e.groupId}/categories`,params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),getApiV1AdminGroupsByGroupIdChannels:e.query({query:e=>({url:`/api/v1/admin/groups/${e.groupId}/channels`})}),getApiV1AdminGroupsByGroupIdEvents:e.query({query:e=>({url:`/api/v1/admin/groups/${e.groupId}/events`,params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,withTranslation:e.withTranslation}})}),getApiV1AdminImpersonate:e.query({query:e=>({url:"/api/v1/admin/impersonate",params:{username:e.username}})}),getApiV1AdminLinkService:e.query({query:()=>({url:"/api/v1/admin/link-service"})}),postApiV1AdminLinkServiceConfigure:e.mutation({query:e=>({url:"/api/v1/admin/link-service/configure",method:"POST",body:e.configureRequest})}),postApiV1AdminPostsDelete:e.mutation({query:e=>({url:"/api/v1/admin/posts/delete",method:"POST",body:e.postDelete})}),deleteApiV1AdminPurge:e.mutation({query:e=>({url:"/api/v1/admin/purge",method:"DELETE",params:{id:e.id}})}),postApiV1AdminRegenerateKeys:e.mutation({query:e=>({url:"/api/v1/admin/regenerate-keys",method:"POST",params:{userId:e.userId,username:e.username}})}),postApiV1AdminRegenerateKeysAll:e.mutation({query:e=>({url:"/api/v1/admin/regenerate-keys-all",method:"POST",params:{batch:e.batch}})}),postApiV1AdminReleaseUsername:e.mutation({query:e=>({url:"/api/v1/admin/release-username",method:"POST",params:{username:e.username}})}),postApiV1AdminReportsDeletePosts:e.mutation({query:e=>({url:"/api/v1/admin/reports/delete-posts",method:"POST",body:e.body})}),getApiV1AdminReportsList:e.query({query:e=>({url:"/api/v1/admin/reports/list",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,open:e.open,postId:e.postId,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,userId:e.userId}})}),getApiV1AdminReportsByReportId:e.query({query:e=>({url:`/api/v1/admin/reports/${e.reportId}`})}),postApiV1AdminReportsByReportIdAddNote:e.mutation({query:e=>({url:`/api/v1/admin/reports/${e.reportId}/add-note`,method:"POST",body:e.body})}),postApiV1AdminReportsByReportIdAssignToSelf:e.mutation({query:e=>({url:`/api/v1/admin/reports/${e.reportId}/assign-to-self`,method:"POST"})}),deleteApiV1AdminReportsByReportIdDelete:e.mutation({query:e=>({url:`/api/v1/admin/reports/${e.reportId}/delete`,method:"DELETE"})}),postApiV1AdminReportsByReportIdRemoveNote:e.mutation({query:e=>({url:`/api/v1/admin/reports/${e.reportId}/remove-note`,method:"POST",params:{index:e.index}})}),postApiV1AdminReportsByReportIdReopen:e.mutation({query:e=>({url:`/api/v1/admin/reports/${e.reportId}/reopen`,method:"POST"})}),postApiV1AdminReportsByReportIdResolve:e.mutation({query:e=>({url:`/api/v1/admin/reports/${e.reportId}/resolve`,method:"POST"})}),postApiV1AdminReportsByReportIdUnassign:e.mutation({query:e=>({url:`/api/v1/admin/reports/${e.reportId}/unassign`,method:"POST"})}),postApiV1AdminRestartApDelivery:e.mutation({query:e=>({url:"/api/v1/admin/restart-ap-delivery",method:"POST",params:{domain:e.domain}})}),getApiV1AdminSearch:e.query({query:e=>({url:"/api/v1/admin/search",params:{accountId:e.accountId,actorType:e.actorType,country:e.country,displayName:e.displayName,domain:e.domain,email:e.email,ip:e.ip,kind:e.kind,lastId:e.lastId,limit:e.limit,offset:e.offset,role:e.role,search:e.search,sortBy:e.sortBy,sortOrder:e.sortOrder,state:e.state,untilId:e.untilId,userId:e.userId,username:e.username}})}),putApiV1AdminSignupRequestsApproveByHash:e.mutation({query:e=>({url:`/api/v1/admin/signup_requests/approve/${e.hash}`,method:"PUT"})}),deleteApiV1AdminSignupRequestsDeleteByHash:e.mutation({query:e=>({url:`/api/v1/admin/signup_requests/delete/${e.hash}`,method:"DELETE"})}),getApiV1AdminSignupRequestsList:e.query({query:e=>({url:"/api/v1/admin/signup_requests/list",params:{email:e.email,hash:e.hash,ip:e.ip,lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),putApiV1AdminSignupRequestsRejectByHash:e.mutation({query:e=>({url:`/api/v1/admin/signup_requests/reject/${e.hash}`,method:"PUT",params:{reason:e.reason}})}),getApiV1AdminUploadsJobsQueueByQueueName:e.query({query:e=>({url:`/api/v1/admin/uploads/jobs/queue/${e.queueName}`,params:{limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,uploadType:e.uploadType}})}),getApiV1AdminUploadsJobsSummary:e.query({query:()=>({url:"/api/v1/admin/uploads/jobs/summary"})}),getApiV1AdminUploadsSearch:e.query({query:e=>({url:"/api/v1/admin/uploads/search",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,tag:e.tag,untilId:e.untilId,uploadType:e.uploadType,userId:e.userId}})}),getApiV1AdminUploadsStorageByUserId:e.query({query:e=>({url:`/api/v1/admin/uploads/storage/${e.userId}`})}),postApiV1AdminUserChangeState:e.mutation({query:e=>({url:"/api/v1/admin/user/change-state",method:"POST",body:e.changeUserState})}),postApiV1AdminUserChangeStateBulk:e.mutation({query:e=>({url:"/api/v1/admin/user/change-state-bulk",method:"POST",body:e.changeUserStateBulk})}),getApiV1AdminUserByUserId:e.query({query:e=>({url:`/api/v1/admin/user/${e.userId}`})}),getApiV1AiAgentsAssignments:e.query({query:e=>({url:"/api/v1/ai-agents/assignments",params:{resourceId:e.resourceId,type:e.type}})}),deleteApiV1AiAgentsAssignments:e.mutation({query:e=>({url:"/api/v1/ai-agents/assignments",method:"DELETE",params:{id:e.id}})}),postApiV1AiAgentsAssignments:e.mutation({query:e=>({url:"/api/v1/ai-agents/assignments",method:"POST",body:e.aiAgentAssignmentCreate})}),getApiV1AiAgentsPosts:e.query({query:e=>({url:"/api/v1/ai-agents/posts",params:{limit:e.limit,ownerId:e.ownerId,since:e.since,htmlContent:e.htmlContent}})}),getApiV1AiModels:e.query({query:e=>({url:"/api/v1/ai-models",params:{capabilities:e.capabilities,deprecated:e.deprecated,enabled:e.enabled,maxContextWindow:e.maxContextWindow,maxInputPrice:e.maxInputPrice,maxMaxOutputTokens:e.maxMaxOutputTokens,maxOutputPrice:e.maxOutputPrice,minContextWindow:e.minContextWindow,minMaxOutputTokens:e.minMaxOutputTokens,modalities:e.modalities,openWeights:e.openWeights,page:e.page,pageSize:e.pageSize,providerId:e.providerId,search:e.search}})}),putApiV1AiModelsByModelId:e.mutation({query:e=>({url:`/api/v1/ai-models/${e.modelId}`,method:"PUT",body:e.aiModelUpdate,params:{scope:e.scope}})}),getApiV1AiModelsByModelId:e.query({query:e=>({url:`/api/v1/ai-models/${e.modelId}`})}),deleteApiV1AiModelsByModelId:e.mutation({query:e=>({url:`/api/v1/ai-models/${e.modelId}`,method:"DELETE",params:{scope:e.scope}})}),getApiV1AiModelsByModelIdMigrationPath:e.query({query:e=>({url:`/api/v1/ai-models/${e.modelId}/migration-path`})}),getApiV1AiModelsByModelIdResolve:e.query({query:e=>({url:`/api/v1/ai-models/${e.modelId}/resolve`})}),getApiV1AiProviders:e.query({query:e=>({url:"/api/v1/ai-providers",params:{enabledOnly:e.enabledOnly,scope:e.scope}})}),postApiV1AiProviders:e.mutation({query:e=>({url:"/api/v1/ai-providers",method:"POST",body:e.aiProviderCreate,params:{scope:e.scope}})}),putApiV1AiProvidersByProviderId:e.mutation({query:e=>({url:`/api/v1/ai-providers/${e.providerId}`,method:"PUT",body:e.aiProviderUpdate,params:{scope:e.scope}})}),getApiV1AiProvidersByProviderId:e.query({query:e=>({url:`/api/v1/ai-providers/${e.providerId}`,params:{scope:e.scope}})}),deleteApiV1AiProvidersByProviderId:e.mutation({query:e=>({url:`/api/v1/ai-providers/${e.providerId}`,method:"DELETE",params:{scope:e.scope}})}),getApiV1AiProvidersByProviderIdModels:e.query({query:e=>({url:`/api/v1/ai-providers/${e.providerId}/models`,params:{enabledOnly:e.enabledOnly,includeDeprecated:e.includeDeprecated}})}),postApiV1AiProvidersByProviderIdModels:e.mutation({query:e=>({url:`/api/v1/ai-providers/${e.providerId}/models`,method:"POST",body:e.aiModelCreate,params:{scope:e.scope}})}),postApiV1Apps:e.mutation({query:e=>({url:"/api/v1/apps",method:"POST",body:e.body,params:{enable:e.enable}})}),getApiV1Apps:e.query({query:()=>({url:"/api/v1/apps"})}),getApiV1AppsEnabled:e.query({query:()=>({url:"/api/v1/apps/enabled"})}),getApiV1AppsInstalled:e.query({query:()=>({url:"/api/v1/apps/installed"})}),getApiV1AppsUser:e.query({query:()=>({url:"/api/v1/apps/user"})}),deleteApiV1AppsUserByAppId:e.mutation({query:e=>({url:`/api/v1/apps/user/${e.appId}`,method:"DELETE"})}),putApiV1AppsUserByAppId:e.mutation({query:e=>({url:`/api/v1/apps/user/${e.appId}`,method:"PUT"})}),putApiV1AppsByAppId:e.mutation({query:e=>({url:`/api/v1/apps/${e.appId}`,method:"PUT",body:e.body,params:{enable:e.enable}})}),getApiV1AppsByAppId:e.query({query:e=>({url:`/api/v1/apps/${e.appId}`})}),deleteApiV1AppsByAppId:e.mutation({query:e=>({url:`/api/v1/apps/${e.appId}`,method:"DELETE"})}),getApiV1AppsByAppIdData:e.query({query:e=>({url:`/api/v1/apps/${e.appId}/data`,params:{owner:e.owner,tags:e.tags,type:e.type}})}),postApiV1AppsByAppIdData:e.mutation({query:e=>({url:`/api/v1/apps/${e.appId}/data`,method:"POST",body:e.dataCreate})}),putApiV1AppsByAppIdDataAndId:e.mutation({query:e=>({url:`/api/v1/apps/${e.appId}/data/${e.id}`,method:"PUT",body:e.dataCreate})}),deleteApiV1AppsByAppIdDataAndId:e.mutation({query:e=>({url:`/api/v1/apps/${e.appId}/data/${e.id}`,method:"DELETE"})}),putApiV1AppsByAppIdDefault:e.mutation({query:e=>({url:`/api/v1/apps/${e.appId}/default`,method:"PUT"})}),putApiV1AppsByAppIdDisable:e.mutation({query:e=>({url:`/api/v1/apps/${e.appId}/disable`,method:"PUT"})}),putApiV1AppsByAppIdEnable:e.mutation({query:e=>({url:`/api/v1/apps/${e.appId}/enable`,method:"PUT"})}),getApiV1AppsByAppIdStats:e.query({query:e=>({url:`/api/v1/apps/${e.appId}/stats`})}),putApiV1AppsByAppIdUserDefault:e.mutation({query:e=>({url:`/api/v1/apps/${e.appId}/user-default`,method:"PUT"})}),deleteApiV1AppsByAppIdUserDefault:e.mutation({query:e=>({url:`/api/v1/apps/${e.appId}/user-default`,method:"DELETE"})}),getApiV1Block:e.query({query:e=>({url:"/api/v1/block",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),getApiV1BlockBy:e.query({query:e=>({url:"/api/v1/block/by",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),deleteApiV1BlockByUserId:e.mutation({query:e=>({url:`/api/v1/block/${e.userId}`,method:"DELETE"})}),postApiV1BlockByUserId:e.mutation({query:e=>({url:`/api/v1/block/${e.userId}`,method:"POST"})}),getApiV1CustomEmojis:e.query({query:e=>({url:"/api/v1/custom_emojis",params:{category:e.category,lastId:e.lastId,limit:e.limit,offset:e.offset,shortcode:e.shortcode,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),deleteApiV1CustomEmojis:e.mutation({query:e=>({url:"/api/v1/custom_emojis",method:"DELETE",params:{category:e.category,shortcode:e.shortcode}})}),postApiV1CustomEmojis:e.mutation({query:e=>({url:"/api/v1/custom_emojis",method:"POST",body:e.emoji,params:{overwrite:e.overwrite}})}),getApiV1CustomEmojisCategories:e.query({query:e=>({url:"/api/v1/custom_emojis/categories",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,q:e.q,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),getApiV1CustomEmojisExport:e.query({query:e=>({url:"/api/v1/custom_emojis/export",params:{category:e.category}})}),postApiV1CustomEmojisImport:e.mutation({query:e=>({url:"/api/v1/custom_emojis/import",method:"POST",body:e.body,params:{category:e.category,domain:e.domain,overwrite:e.overwrite,visible:e.visible}})}),postApiV1CustomEmojisImportUpload:e.mutation({query:e=>({url:"/api/v1/custom_emojis/import/upload",method:"POST",params:{category:e.category,domain:e.domain,overwrite:e.overwrite,uploadId:e.uploadId,visible:e.visible}})}),getApiV1CustomEmojisSearch:e.query({query:e=>({url:"/api/v1/custom_emojis/search",params:{category:e.category,lastId:e.lastId,limit:e.limit,offset:e.offset,shortcode:e.shortcode,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),postApiV1CustomEmojisUpload:e.mutation({query:e=>({url:"/api/v1/custom_emojis/upload",method:"POST",params:{category:e.category,domain:e.domain,overwrite:e.overwrite,shortcode:e.shortcode,uploadId:e.uploadId,visible:e.visible}})}),patchApiV1CustomEmojisByShortcode:e.mutation({query:e=>({url:`/api/v1/custom_emojis/${e.shortcode}`,method:"PATCH",body:e.emojiPatchRequest})}),getApiV1Data:e.query({query:e=>({url:"/api/v1/data",params:{owner:e.owner,tags:e.tags,type:e.type}})}),postApiV1Data:e.mutation({query:e=>({url:"/api/v1/data",method:"POST",body:e.dataCreate})}),putApiV1DataById:e.mutation({query:e=>({url:`/api/v1/data/${e.id}`,method:"PUT",body:e.dataCreate})}),deleteApiV1DataById:e.mutation({query:e=>({url:`/api/v1/data/${e.id}`,method:"DELETE"})}),putApiV1Devices:e.mutation({query:e=>({url:"/api/v1/devices",method:"PUT",body:e.deviceRegistrationRequest})}),getApiV1Devices:e.query({query:()=>({url:"/api/v1/devices"})}),deleteApiV1DevicesAll:e.mutation({query:()=>({url:"/api/v1/devices/all",method:"DELETE"})}),getApiV1DevicesVapidPublicKey:e.query({query:()=>({url:"/api/v1/devices/vapid-public-key"})}),deleteApiV1DevicesByDeviceId:e.mutation({query:e=>({url:`/api/v1/devices/${e.deviceId}`,method:"DELETE"})}),getApiV1DomainBlock:e.query({query:e=>({url:"/api/v1/domain-block",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),getApiV1Drafts:e.query({query:e=>({url:"/api/v1/drafts",params:{ownerId:e.ownerId}})}),postApiV1Drafts:e.mutation({query:e=>({url:"/api/v1/drafts",method:"POST",body:e.createDraftRequest,params:{ownerId:e.ownerId}})}),getApiV1DraftsPostByPostId:e.query({query:e=>({url:`/api/v1/drafts/post/${e.postId}`})}),putApiV1DraftsByDraftId:e.mutation({query:e=>({url:`/api/v1/drafts/${e.draftId}`,method:"PUT",body:e.updateDraftRequest})}),getApiV1DraftsByDraftId:e.query({query:e=>({url:`/api/v1/drafts/${e.draftId}`})}),deleteApiV1DraftsByDraftId:e.mutation({query:e=>({url:`/api/v1/drafts/${e.draftId}`,method:"DELETE"})}),postApiV1DraftsByDraftIdPublish:e.mutation({query:e=>({url:`/api/v1/drafts/${e.draftId}/publish`,method:"POST",params:{htmlContent:e.htmlContent}})}),getApiV1Events:e.query({query:e=>({url:"/api/v1/events",params:{groupId:e.groupId,limit:e.limit,offset:e.offset,organizerId:e.organizerId,username:e.username,withTranslation:e.withTranslation}})}),postApiV1Events:e.mutation({query:e=>({url:"/api/v1/events",method:"POST",body:e.createEvent})}),getApiV1EventsCalendarGByGroupnameIcs:e.query({query:e=>({url:`/api/v1/events/calendar/g/${e.groupname}.ics`})}),getApiV1EventsCalendarPByIdIcs:e.query({query:e=>({url:`/api/v1/events/calendar/p/${e.id}.ics`})}),getApiV1EventsCalendarUByUsernameIcs:e.query({query:e=>({url:`/api/v1/events/calendar/u/${e.username}.ics`})}),getApiV1EventsFollowing:e.query({query:e=>({url:"/api/v1/events/following",params:{limit:e.limit,offset:e.offset,withTranslation:e.withTranslation}})}),getApiV1EventsMy:e.query({query:e=>({url:"/api/v1/events/my",params:{limit:e.limit,notRespondedOnly:e.notRespondedOnly,offset:e.offset,organizedOnly:e.organizedOnly,past:e.past,withTranslation:e.withTranslation}})}),getApiV1EventsSettings:e.query({query:e=>({url:"/api/v1/events/settings",params:{ownerId:e.ownerId}})}),postApiV1EventsSettingsRegeneratePrivateId:e.mutation({query:e=>({url:"/api/v1/events/settings/regeneratePrivateId",method:"POST",params:{ownerId:e.ownerId}})}),postApiV1EventsSettingsUpdate:e.mutation({query:e=>({url:"/api/v1/events/settings/update",method:"POST",body:e.updateEventsSettings,params:{ownerId:e.ownerId}})}),putApiV1EventsByEventId:e.mutation({query:e=>({url:`/api/v1/events/${e.eventId}`,method:"PUT",body:e.updateEvent})}),getApiV1EventsByEventId:e.query({query:e=>({url:`/api/v1/events/${e.eventId}`,params:{withTranslation:e.withTranslation}})}),deleteApiV1EventsByEventId:e.mutation({query:e=>({url:`/api/v1/events/${e.eventId}`,method:"DELETE"})}),getApiV1EventsByEventIdIcs:e.query({query:e=>({url:`/api/v1/events/${e.eventId}.ics`})}),postApiV1EventsByEventIdAccept:e.mutation({query:e=>({url:`/api/v1/events/${e.eventId}/accept`,method:"POST"})}),getApiV1EventsByEventIdAttendees:e.query({query:e=>({url:`/api/v1/events/${e.eventId}/attendees`,params:{limit:e.limit,offset:e.offset}})}),deleteApiV1EventsByEventIdAttendeesAndUserId:e.mutation({query:e=>({url:`/api/v1/events/${e.eventId}/attendees/${e.userId}`,method:"DELETE"})}),postApiV1EventsByEventIdAttendeesAndUserId:e.mutation({query:e=>({url:`/api/v1/events/${e.eventId}/attendees/${e.userId}`,method:"POST"})}),postApiV1EventsByEventIdCancel:e.mutation({query:e=>({url:`/api/v1/events/${e.eventId}/cancel`,method:"POST"})}),postApiV1EventsByEventIdInterested:e.mutation({query:e=>({url:`/api/v1/events/${e.eventId}/interested`,method:"POST"})}),postApiV1EventsByEventIdJoin:e.mutation({query:e=>({url:`/api/v1/events/${e.eventId}/join`,method:"POST"})}),deleteApiV1EventsByEventIdJoinOrInterested:e.mutation({query:e=>({url:`/api/v1/events/${e.eventId}/joinOrInterested`,method:"DELETE"})}),postApiV1EventsByEventIdMaybe:e.mutation({query:e=>({url:`/api/v1/events/${e.eventId}/maybe`,method:"POST"})}),getApiV1EventsByEventIdMutual:e.query({query:e=>({url:`/api/v1/events/${e.eventId}/mutual`,params:{limit:e.limit,offset:e.offset}})}),postApiV1EventsByEventIdReject:e.mutation({query:e=>({url:`/api/v1/events/${e.eventId}/reject`,method:"POST"})}),postApiV1EventsByEventIdTranslate:e.mutation({query:e=>({url:`/api/v1/events/${e.eventId}/translate`,method:"POST",params:{lang:e.lang}})}),postApiV1FaspClear:e.mutation({query:()=>({url:"/api/v1/fasp/clear",method:"POST"})}),getApiV1FaspDebugV0CallbackCallbacks:e.query({query:()=>({url:"/api/v1/fasp/debug/v0/callback/callbacks"})}),deleteApiV1FaspDebugV0CallbackCallbacksById:e.mutation({query:e=>({url:`/api/v1/fasp/debug/v0/callback/callbacks/${e.id}`,method:"DELETE"})}),postApiV1FaspRegistration:e.mutation({query:e=>({url:"/api/v1/fasp/registration",method:"POST",body:e.registrationRequest})}),postApiV1FaspByProviderIdCapabilities:e.mutation({query:e=>({url:`/api/v1/fasp/${e.providerId}/capabilities`,method:"POST",body:e.body})}),postApiV1FaspByProviderIdDebugCall:e.mutation({query:e=>({url:`/api/v1/fasp/${e.providerId}/debug-call`,method:"POST",body:e.body})}),getApiV1FaspByProviderIdRegistrationFinish:e.query({query:e=>({url:`/api/v1/fasp/${e.providerId}/registration-finish`})}),postApiV1FaspByProviderIdRegistrationFinish:e.mutation({query:e=>({url:`/api/v1/fasp/${e.providerId}/registration-finish`,method:"POST"})}),postApiV1FaspByProviderIdRequestBackfill:e.mutation({query:e=>({url:`/api/v1/fasp/${e.providerId}/request_backfill`,method:"POST",params:{category:e.category}})}),postApiV1FederationTokens:e.mutation({query:e=>({url:"/api/v1/federation/tokens",method:"POST",body:e.groupFederationTokenRequest})}),getApiV1Geo:e.query({query:e=>({url:"/api/v1/geo",params:{latitude:e.latitude,longitude:e.longitude}})}),getApiV1Groups:e.query({query:e=>({url:"/api/v1/groups",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),postApiV1Groups:e.mutation({query:e=>({url:"/api/v1/groups",method:"POST",body:e.groupCreate})}),getApiV1GroupsApps:e.query({query:()=>({url:"/api/v1/groups/apps"})}),getApiV1GroupsInvites:e.query({query:e=>({url:"/api/v1/groups/invites",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,status:e.status,untilId:e.untilId}})}),getApiV1GroupsInvitesByGroupInviteId:e.query({query:e=>({url:`/api/v1/groups/invites/${e.groupInviteId}`})}),getApiV1GroupsMemberByUserId:e.query({query:e=>({url:`/api/v1/groups/member/${e.userId}`,params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),getApiV1GroupsMemberByUserIdGroups:e.query({query:e=>({url:`/api/v1/groups/member/${e.userId}/groups`,params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),getApiV1GroupsMyGroups:e.query({query:e=>({url:"/api/v1/groups/my-groups",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),getApiV1GroupsNameByGroupname:e.query({query:e=>({url:`/api/v1/groups/name/${e.groupname}`})}),getApiV1GroupsOwned:e.query({query:e=>({url:"/api/v1/groups/owned",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),getApiV1GroupsPinned:e.query({query:e=>({url:"/api/v1/groups/pinned",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),getApiV1GroupsSearch:e.query({query:e=>({url:"/api/v1/groups/search",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,substring:e.substring,untilId:e.untilId}})}),getApiV1GroupsUsersByUserIdMutual:e.query({query:e=>({url:`/api/v1/groups/users/${e.userId}/mutual`})}),putApiV1GroupsByGroupId:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}`,method:"PUT",body:e.groupUpdate})}),getApiV1GroupsByGroupId:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}`})}),deleteApiV1GroupsByGroupId:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}`,method:"DELETE"})}),getApiV1GroupsByGroupIdAiAgentsAssignments:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/ai-agents/assignments`,params:{resourceId:e.resourceId,type:e.type}})}),deleteApiV1GroupsByGroupIdAiAgentsAssignments:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/ai-agents/assignments`,method:"DELETE",params:{assignmentId:e.assignmentId}})}),postApiV1GroupsByGroupIdAiAgentsAssignments:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/ai-agents/assignments`,method:"POST",body:e.aiAgentAssignmentCreate})}),getApiV1GroupsByGroupIdApps:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/apps`})}),deleteApiV1GroupsByGroupIdAppsAndAppId:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/apps/${e.appId}`,method:"DELETE"})}),putApiV1GroupsByGroupIdAppsAndAppId:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/apps/${e.appId}`,method:"PUT"})}),putApiV1GroupsByGroupIdBranding:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/branding`,method:"PUT",body:e.groupBrandingUpdate})}),getApiV1GroupsByGroupIdCategories:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/categories`,params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),postApiV1GroupsByGroupIdCategories:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/categories`,method:"POST",body:e.categoryCreate})}),getApiV1GroupsByGroupIdCategoriesNameAndCategoryName:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/categories/name/${e.categoryName}`})}),putApiV1GroupsByGroupIdCategoriesAndCategoryId:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/categories/${e.categoryId}`,method:"PUT",body:e.categoryUpdate})}),getApiV1GroupsByGroupIdCategoriesAndCategoryId:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/categories/${e.categoryId}`})}),deleteApiV1GroupsByGroupIdCategoriesAndCategoryId:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/categories/${e.categoryId}`,method:"DELETE"})}),getApiV1GroupsByGroupIdChannels:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/channels`})}),postApiV1GroupsByGroupIdChannels:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/channels`,method:"POST",body:e.body,params:{htmlContent:e.htmlContent}})}),getApiV1GroupsByGroupIdChannelsDefault:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/channels/default`})}),getApiV1GroupsByGroupIdChannelsLookup:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/channels/lookup`,params:{full:e.full,username:e.username,htmlContent:e.htmlContent}})}),getApiV1GroupsByGroupIdChannelsMain:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/channels/main`,params:{htmlContent:e.htmlContent}})}),getApiV1GroupsByGroupIdChannelsPublic:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/channels/public`})}),putApiV1GroupsByGroupIdChannelsAndChannelId:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/channels/${e.channelId}`,method:"PUT",body:e.body,params:{htmlContent:e.htmlContent}})}),getApiV1GroupsByGroupIdChannelsAndChannelId:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/channels/${e.channelId}`,params:{full:e.full,htmlContent:e.htmlContent}})}),deleteApiV1GroupsByGroupIdChannelsAndChannelId:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/channels/${e.channelId}`,method:"DELETE"})}),putApiV1GroupsByGroupIdChannelsAndChannelIdDefault:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/channels/${e.channelId}/default`,method:"PUT",params:{isDefault:e.isDefault,htmlContent:e.htmlContent}})}),putApiV1GroupsByGroupIdChannelsAndChannelIdMain:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/channels/${e.channelId}/main`,method:"PUT",params:{htmlContent:e.htmlContent}})}),putApiV1GroupsByGroupIdChannelsAndChannelIdUsername:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/channels/${e.channelId}/username`,method:"PUT",body:e.body,params:{htmlContent:e.htmlContent}})}),postApiV1GroupsByGroupIdFederationToken:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/federation-token`,method:"POST"})}),putApiV1GroupsByGroupIdForum:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/forum`,method:"PUT",body:e.forumUpdate})}),getApiV1GroupsByGroupIdForum:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/forum`})}),deleteApiV1GroupsByGroupIdForum:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/forum`,method:"DELETE"})}),deleteApiV1GroupsByGroupIdForumHard:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/forum/hard`,method:"DELETE"})}),getApiV1GroupsByGroupIdForumStats:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/forum/stats`})}),getApiV1GroupsByGroupIdForumTags:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/forum/tags`,params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),getApiV1GroupsByGroupIdForumTagsSearch:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/forum/tags/search`,params:{lastId:e.lastId,limit:e.limit,offset:e.offset,q:e.q,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),getApiV1GroupsByGroupIdInvites:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/invites`,params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,status:e.status,untilId:e.untilId}})}),postApiV1GroupsByGroupIdInvites:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/invites`,method:"POST",body:e.groupInviteCreate})}),deleteApiV1GroupsByGroupIdInvitesAndGroupInviteId:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/invites/${e.groupInviteId}`,method:"DELETE"})}),postApiV1GroupsByGroupIdInvitesAndGroupInviteIdAccept:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/invites/${e.groupInviteId}/accept`,method:"POST"})}),postApiV1GroupsByGroupIdInvitesAndGroupInviteIdReject:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/invites/${e.groupInviteId}/reject`,method:"POST"})}),postApiV1GroupsByGroupIdJoin:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/join`,method:"POST",params:{answerToken:e.answerToken}})}),deleteApiV1GroupsByGroupIdJoin:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/join`,method:"DELETE"})}),getApiV1GroupsByGroupIdJoinRequests:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/join-requests`,params:{createdFrom:e.createdFrom,createdTo:e.createdTo,lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,status:e.status,untilId:e.untilId,username:e.username}})}),deleteApiV1GroupsByGroupIdJoinRequestsAndGroupJoinRequestId:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/join-requests/${e.groupJoinRequestId}`,method:"DELETE",params:{purge:e.purge,reason:e.reason}})}),putApiV1GroupsByGroupIdJoinRequestsAndGroupJoinRequestId:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/join-requests/${e.groupJoinRequestId}`,method:"PUT",params:{reason:e.reason}})}),putApiV1GroupsByGroupIdMemberSettings:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/member-settings`,method:"PUT",body:e.groupMemberSettings})}),getApiV1GroupsByGroupIdMemberSettings:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/member-settings`,params:{keys:e.keys}})}),deleteApiV1GroupsByGroupIdMemberSettings:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/member-settings`,method:"DELETE",params:{keys:e.keys}})}),getApiV1GroupsByGroupIdMembers:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/members`,params:{actorType:e.actorType,createdAfter:e.createdAfter,displayName:e.displayName,domain:e.domain,limit:e.limit,offset:e.offset,order:e.order,role:e.role,sort:e.sort,username:e.username}})}),postApiV1GroupsByGroupIdMembers:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/members`,method:"POST",body:e.groupMemberCreate})}),getApiV1GroupsByGroupIdMembersSearch:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/members/search`,params:{actorType:e.actorType,country:e.country,createdAfter:e.createdAfter,displayName:e.displayName,domain:e.domain,ip:e.ip,lastId:e.lastId,limit:e.limit,offset:e.offset,role:e.role,roles:e.roles,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,username:e.username}})}),putApiV1GroupsByGroupIdMembersAndMemberId:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/members/${e.memberId}`,method:"PUT",body:e.groupMemberUpdate})}),deleteApiV1GroupsByGroupIdMembersAndMemberId:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/members/${e.memberId}`,method:"DELETE",params:{reason:e.reason}})}),deleteApiV1GroupsByGroupIdMembership:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/membership`,method:"DELETE"})}),getApiV1GroupsByGroupIdMembership:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/membership`})}),deleteApiV1GroupsByGroupIdPin:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/pin`,method:"DELETE"})}),putApiV1GroupsByGroupIdPin:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/pin`,method:"PUT",params:{pin:e.pin}})}),getApiV1GroupsByGroupIdQuestions:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/questions`})}),postApiV1GroupsByGroupIdQuestions:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/questions`,method:"POST",body:e.questionCreate})}),postApiV1GroupsByGroupIdQuestionsAnswers:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/questions/answers`,method:"POST",body:e.questionAnswerCreate})}),putApiV1GroupsByGroupIdQuestionsAndQuestionId:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/questions/${e.questionId}`,method:"PUT",body:e.questionUpdate})}),deleteApiV1GroupsByGroupIdQuestionsAndQuestionId:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/questions/${e.questionId}`,method:"DELETE"})}),postApiV1GroupsByGroupIdReportsDeletePosts:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/reports/delete-posts`,method:"POST",body:e.body})}),getApiV1GroupsByGroupIdReportsList:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/reports/list`,params:{lastId:e.lastId,limit:e.limit,offset:e.offset,open:e.open,postId:e.postId,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,userId:e.userId}})}),getApiV1GroupsByGroupIdReportsAndReportId:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/reports/${e.reportId}`})}),postApiV1GroupsByGroupIdReportsAndReportIdAddNote:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/reports/${e.reportId}/add-note`,method:"POST",body:e.body})}),postApiV1GroupsByGroupIdReportsAndReportIdRemoveNote:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/reports/${e.reportId}/remove-note`,method:"POST",params:{index:e.index}})}),postApiV1GroupsByGroupIdReportsAndReportIdReopen:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/reports/${e.reportId}/reopen`,method:"POST"})}),postApiV1GroupsByGroupIdReportsAndReportIdResolve:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/reports/${e.reportId}/resolve`,method:"POST"})}),getApiV1GroupsByGroupIdRules:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/rules`})}),postApiV1GroupsByGroupIdRules:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/rules`,method:"POST",params:{hint:e.hint,ordering:e.ordering,text:e.text}})}),postApiV1GroupsByGroupIdRulesReorder:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/rules/reorder`,method:"POST",body:e.body})}),deleteApiV1GroupsByGroupIdRulesAndId:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/rules/${e.id}`,method:"DELETE"})}),putApiV1GroupsByGroupIdRulesAndRuleId:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/rules/${e.ruleId}`,method:"PUT",body:e.ruleUpdate})}),putApiV1GroupsByGroupIdSettings:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/settings`,method:"PUT",body:e.groupSettings})}),getApiV1GroupsByGroupIdSettings:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/settings`,params:{keys:e.keys}})}),deleteApiV1GroupsByGroupIdSettings:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/settings`,method:"DELETE",params:{keys:e.keys}})}),getApiV1GroupsByGroupIdUsers:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/users`,params:{lastId:e.lastId,limit:e.limit,offset:e.offset,order:e.order,role:e.role,sort:e.sort,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),getApiV1Import:e.query({query:()=>({url:"/api/v1/import"})}),postApiV1Import:e.mutation({query:e=>({url:"/api/v1/import",method:"POST",body:e.body,params:{overwrite:e.overwrite,type:e.type}})}),postApiV1ImportStartById:e.mutation({query:e=>({url:`/api/v1/import/start/${e.id}`,method:"POST"})}),getApiV1ImportById:e.query({query:e=>({url:`/api/v1/import/${e.id}`})}),getApiV1Instance:e.query({query:()=>({url:"/api/v1/instance"})}),getApiV1InstanceCountries:e.query({query:()=>({url:"/api/v1/instance/countries"})}),getApiV1InstanceDomains:e.query({query:e=>({url:"/api/v1/instance/domains",params:{domain:e.domain,limit:e.limit,software:e.software}})}),getApiV1InstanceExtendedDescription:e.query({query:()=>({url:"/api/v1/instance/extended_description"})}),getApiV1InstanceSupportedLanguages:e.query({query:()=>({url:"/api/v1/instance/supported_languages"})}),getApiV1InstanceTimezones:e.query({query:()=>({url:"/api/v1/instance/timezones"})}),getApiV1JobsListJobs:e.query({query:e=>({url:"/api/v1/jobs/list-jobs",params:{limit:e.limit,offset:e.offset}})}),getApiV1JobsListStats:e.query({query:e=>({url:"/api/v1/jobs/list-stats",params:{queue:e.queue}})}),getApiV1JobsListStatsAll:e.query({query:()=>({url:"/api/v1/jobs/list-stats-all"})}),getApiV1JobsLists:e.query({query:e=>({url:"/api/v1/jobs/lists",params:{limit:e.limit,listKind:e.listKind,offset:e.offset,queue:e.queue}})}),getApiV1JobsStats:e.query({query:()=>({url:"/api/v1/jobs/stats"})}),getApiV1JobsStatsPerDay:e.query({query:e=>({url:"/api/v1/jobs/stats-per-day",params:{lastDays:e.lastDays,queue:e.queue}})}),getApiV1Links:e.query({query:e=>({url:"/api/v1/links",params:{url:e.url}})}),getApiV1Lists:e.query({query:()=>({url:"/api/v1/lists"})}),postApiV1Lists:e.mutation({query:e=>({url:"/api/v1/lists",method:"POST",body:e.userListCreate})}),putApiV1ListsByListId:e.mutation({query:e=>({url:`/api/v1/lists/${e.listId}`,method:"PUT",body:e.userListCreate})}),getApiV1ListsByListId:e.query({query:e=>({url:`/api/v1/lists/${e.listId}`})}),deleteApiV1ListsByListId:e.mutation({query:e=>({url:`/api/v1/lists/${e.listId}`,method:"DELETE"})}),getApiV1ListsByListIdUsers:e.query({query:e=>({url:`/api/v1/lists/${e.listId}/users`})}),deleteApiV1ListsByListIdUsersAndUserId:e.mutation({query:e=>({url:`/api/v1/lists/${e.listId}/users/${e.userId}`,method:"DELETE"})}),postApiV1ListsByListIdUsersAndUserId:e.mutation({query:e=>({url:`/api/v1/lists/${e.listId}/users/${e.userId}`,method:"POST"})}),getApiV1Metrics:e.query({query:e=>({url:"/api/v1/metrics",params:{from:e.from,period:e.period,to:e.to}})}),getApiV1MetricsTotals:e.query({query:()=>({url:"/api/v1/metrics/totals"})}),getApiV1Mute:e.query({query:e=>({url:"/api/v1/mute",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),deleteApiV1MuteByUserId:e.mutation({query:e=>({url:`/api/v1/mute/${e.userId}`,method:"DELETE"})}),postApiV1MuteByUserId:e.mutation({query:e=>({url:`/api/v1/mute/${e.userId}`,method:"POST",params:{duration:e.duration}})}),getApiV1NamesCheck:e.query({query:e=>({url:"/api/v1/names/check",params:{name:e.name,nameScope:e.nameScope,scope:e.scope}})}),putApiV1Notes:e.mutation({query:e=>({url:"/api/v1/notes",method:"PUT",body:e.noteUpdate})}),getApiV1Notes:e.query({query:e=>({url:"/api/v1/notes",params:{userIds:e.userIds}})}),deleteApiV1NotesByUserId:e.mutation({query:e=>({url:`/api/v1/notes/${e.userId}`,method:"DELETE"})}),getApiV1Notifications:e.query({query:e=>({url:"/api/v1/notifications",params:{excludeTypes:e.excludeTypes,lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,status:e.status,types:e.types,untilId:e.untilId,htmlContent:e.htmlContent}})}),getApiV1NotificationsCount:e.query({query:e=>({url:"/api/v1/notifications/count",params:{excludeTypes:e.excludeTypes,status:e.status,types:e.types}})}),postApiV1NotificationsMarkAll:e.mutation({query:e=>({url:"/api/v1/notifications/mark-all",method:"POST",params:{status:e.status}})}),getApiV1NotificationsById:e.query({query:e=>({url:`/api/v1/notifications/${e.id}`,params:{htmlContent:e.htmlContent}})}),postApiV1NotificationsByIdMark:e.mutation({query:e=>({url:`/api/v1/notifications/${e.id}/mark`,method:"POST",params:{status:e.status,htmlContent:e.htmlContent}})}),getApiV1Passkeys:e.query({query:()=>({url:"/api/v1/passkeys"})}),getApiV1PasskeysBeginAuth:e.query({query:e=>({url:"/api/v1/passkeys/begin-auth",params:{username:e.username}})}),getApiV1PasskeysBeginRegister:e.query({query:()=>({url:"/api/v1/passkeys/begin-register"})}),postApiV1PasskeysFinishAuth:e.mutation({query:e=>({url:"/api/v1/passkeys/finish-auth",method:"POST",body:e.jsonObject})}),postApiV1PasskeysFinishRegister:e.mutation({query:e=>({url:"/api/v1/passkeys/finish-register",method:"POST",body:e.jsonObject})}),deleteApiV1PasskeysByCredentialId:e.mutation({query:e=>({url:`/api/v1/passkeys/${e.credentialId}`,method:"DELETE"})}),postApiV1PollsByPollIdRefresh:e.mutation({query:e=>({url:`/api/v1/polls/${e.pollId}/refresh`,method:"POST"})}),postApiV1PollsByPollIdVote:e.mutation({query:e=>({url:`/api/v1/polls/${e.pollId}/vote`,method:"POST",body:e.body})}),getApiV1Posts:e.query({query:e=>({url:"/api/v1/posts",params:{all:e.all,bookmarkedOnly:e.bookmarkedOnly,forumTags:e.forumTags,includeBookmarkStatus:e.includeBookmarkStatus,includeComments:e.includeComments,includeFollowStatus:e.includeFollowStatus,includePinnedStatus:e.includePinnedStatus,includeReply:e.includeReply,lastId:e.lastId,limit:e.limit,limitFirstLevelComments:e.limitFirstLevelComments,limitSecondLevelComments:e.limitSecondLevelComments,listId:e.listId,maxLevel:e.maxLevel,minLevel:e.minLevel,offset:e.offset,ownerId:e.ownerId,pinned:e.pinned,repostKind:e.repostKind,repostOf:e.repostOf,repostsOnly:e.repostsOnly,search:e.search,skipReposts:e.skipReposts,sortBy:e.sortBy,sortOrder:e.sortOrder,tag:e.tag,untilId:e.untilId,userId:e.userId,username:e.username,withRepostedBy:e.withRepostedBy,withTranslation:e.withTranslation,withTrends:e.withTrends,htmlContent:e.htmlContent}})}),postApiV1Posts:e.mutation({query:e=>({url:"/api/v1/posts",method:"POST",body:e.createPost,params:{ownerId:e.ownerId,htmlContent:e.htmlContent}})}),getApiV1PostsBookmarked:e.query({query:e=>({url:"/api/v1/posts/bookmarked",params:{includeComments:e.includeComments,includeReply:e.includeReply,lastId:e.lastId,limit:e.limit,my:e.my,offset:e.offset,ownerId:e.ownerId,search:e.search,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,htmlContent:e.htmlContent}})}),getApiV1PostsFeedsFollowing:e.query({query:e=>({url:"/api/v1/posts/feeds/following",params:{ignoreCache:e.ignoreCache,includeBookmarkStatus:e.includeBookmarkStatus,includeFollowStatus:e.includeFollowStatus,lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,withRepostedBy:e.withRepostedBy,withTranslation:e.withTranslation,htmlContent:e.htmlContent}})}),getApiV1PostsFeedsPublic:e.query({query:e=>({url:"/api/v1/posts/feeds/public",params:{includeBookmarkStatus:e.includeBookmarkStatus,includeFollowStatus:e.includeFollowStatus,lastId:e.lastId,limit:e.limit,local:e.local,offset:e.offset,skipReposts:e.skipReposts,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,withRepostedBy:e.withRepostedBy,withTranslation:e.withTranslation,withTrends:e.withTrends,htmlContent:e.htmlContent}})}),getApiV1PostsLiked:e.query({query:e=>({url:"/api/v1/posts/liked",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,ownerId:e.ownerId,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,htmlContent:e.htmlContent}})}),putApiV1PostsMarkdown2Html:e.mutation({query:e=>({url:"/api/v1/posts/markdown2html",method:"PUT",body:e.body})}),getApiV1PostsMentioned:e.query({query:e=>({url:"/api/v1/posts/mentioned",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,ownerId:e.ownerId,private:e.private,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,htmlContent:e.htmlContent}})}),getApiV1PostsMy:e.query({query:e=>({url:"/api/v1/posts/my",params:{bookmarkedOnly:e.bookmarkedOnly,includeBookmarkStatus:e.includeBookmarkStatus,includeComments:e.includeComments,lastId:e.lastId,limit:e.limit,offset:e.offset,ownerId:e.ownerId,repostsOnly:e.repostsOnly,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,htmlContent:e.htmlContent}})}),getApiV1PostsPins:e.query({query:e=>({url:"/api/v1/posts/pins",params:{ownerId:e.ownerId,postOnly:e.postOnly}})}),deleteApiV1PostsPinsByPostId:e.mutation({query:e=>({url:`/api/v1/posts/pins/${e.postId}`,method:"DELETE"})}),postApiV1PostsPinsByPostId:e.mutation({query:e=>({url:`/api/v1/posts/pins/${e.postId}`,method:"POST"})}),getApiV1PostsReplies:e.query({query:e=>({url:"/api/v1/posts/replies",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,ownerId:e.ownerId,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,userId:e.userId,username:e.username,htmlContent:e.htmlContent}})}),getApiV1PostsSubscribe:e.query({query:e=>({url:"/api/v1/posts/subscribe",params:{all:e.all,ownerId:e.ownerId,htmlContent:e.htmlContent}})}),putApiV1PostsByPostId:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}`,method:"PUT",body:e.createPost,params:{htmlContent:e.htmlContent}})}),getApiV1PostsByPostId:e.query({query:e=>({url:`/api/v1/posts/${e.postId}`,params:{includeBookmarkStatus:e.includeBookmarkStatus,limitFirstLevelComments:e.limitFirstLevelComments,limitSecondLevelComments:e.limitSecondLevelComments,maxLevel:e.maxLevel,minLevel:e.minLevel,withComments:e.withComments,withParents:e.withParents,withRepostedBy:e.withRepostedBy,withRootParent:e.withRootParent,withTranslation:e.withTranslation,withTrends:e.withTrends,htmlContent:e.htmlContent}})}),deleteApiV1PostsByPostId:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}`,method:"DELETE"})}),getApiV1PostsByPostIdActiveUsers:e.query({query:e=>({url:`/api/v1/posts/${e.postId}/active-users`,params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),deleteApiV1PostsByPostIdBookmark:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/bookmark`,method:"DELETE"})}),postApiV1PostsByPostIdBookmark:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/bookmark`,method:"POST"})}),getApiV1PostsByPostIdComments:e.query({query:e=>({url:`/api/v1/posts/${e.postId}/comments`,params:{lastId:e.lastId,limit:e.limit,limitFirstLevelComments:e.limitFirstLevelComments,maxLevel:e.maxLevel,minLevel:e.minLevel,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,htmlContent:e.htmlContent}})}),postApiV1PostsByPostIdComments:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/comments`,method:"POST",body:e.createPost,params:{htmlContent:e.htmlContent}})}),putApiV1PostsByPostIdCommentsAndCommentId:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/comments/${e.commentId}`,method:"PUT",body:e.createPost,params:{htmlContent:e.htmlContent}})}),deleteApiV1PostsByPostIdCommentsAndCommentId:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/comments/${e.commentId}`,method:"DELETE"})}),postApiV1PostsByPostIdDetach:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/detach`,method:"POST"})}),postApiV1PostsByPostIdDownvote:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/downvote`,method:"POST",params:{htmlContent:e.htmlContent}})}),getApiV1PostsByPostIdEdits:e.query({query:e=>({url:`/api/v1/posts/${e.postId}/edits`,params:{htmlContent:e.htmlContent}})}),getApiV1PostsByPostIdLikes:e.query({query:e=>({url:`/api/v1/posts/${e.postId}/likes`,params:{includeFollowedStatus:e.includeFollowedStatus,includeFollowingStatus:e.includeFollowingStatus,lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,htmlContent:e.htmlContent}})}),deleteApiV1PostsByPostIdLikes:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/likes`,method:"DELETE"})}),postApiV1PostsByPostIdLikes:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/likes`,method:"POST"})}),postApiV1PostsByPostIdRefreshCard:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/refresh-card`,method:"POST"})}),deleteApiV1PostsByPostIdRepost:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/repost`,method:"DELETE"})}),postApiV1PostsByPostIdRepost:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/repost`,method:"POST",body:e.createPost,params:{htmlContent:e.htmlContent}})}),getApiV1PostsByPostIdReposts:e.query({query:e=>({url:`/api/v1/posts/${e.postId}/reposts`,params:{includeFollowedStatus:e.includeFollowedStatus,includeFollowingStatus:e.includeFollowingStatus,kind:e.kind,lastId:e.lastId,limit:e.limit,offset:e.offset,skipDuplicates:e.skipDuplicates,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,htmlContent:e.htmlContent}})}),postApiV1PostsByPostIdSubscribe:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/subscribe`,method:"POST"})}),deleteApiV1PostsByPostIdSubscribe:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/subscribe`,method:"DELETE"})}),postApiV1PostsByPostIdTrackView:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/track-view`,method:"POST"})}),postApiV1PostsByPostIdTranslate:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/translate`,method:"POST",params:{htmlContent:e.htmlContent,lang:e.lang}})}),postApiV1PostsByPostIdUpvote:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/upvote`,method:"POST",params:{htmlContent:e.htmlContent}})}),getApiV1PostsByPostIdVotes:e.query({query:e=>({url:`/api/v1/posts/${e.postId}/votes`,params:{htmlContent:e.htmlContent}})}),getApiV1Rbac:e.query({query:()=>({url:"/api/v1/rbac"})}),getApiV1RbacActorsByActorIdPermissions:e.query({query:e=>({url:`/api/v1/rbac/actors/${e.actorId}/permissions`,params:{targetScope:e.targetScope}})}),getApiV1RbacActorsByActorIdRoles:e.query({query:e=>({url:`/api/v1/rbac/actors/${e.actorId}/roles`,params:{targetScope:e.targetScope}})}),putApiV1RbacRolesByRoleId:e.mutation({query:e=>({url:`/api/v1/rbac/roles/${e.roleId}`,method:"PUT",body:e.rbacRoleTemplate})}),getApiV1RbacScopesByScopeRoles:e.query({query:e=>({url:`/api/v1/rbac/scopes/${e.scope}/roles`})}),postApiV1RbacScopesByScopeRoles:e.mutation({query:e=>({url:`/api/v1/rbac/scopes/${e.scope}/roles`,method:"POST",body:e.rbacRoleTemplate})}),deleteApiV1RbacScopesByScopeRolesAndRoleName:e.mutation({query:e=>({url:`/api/v1/rbac/scopes/${e.scope}/roles/${e.roleName}`,method:"DELETE"})}),getApiV1RbacByResource:e.query({query:e=>({url:`/api/v1/rbac/${e.resource}`})}),postApiV1Reports:e.mutation({query:e=>({url:"/api/v1/reports",method:"POST",body:e.createReport})}),putApiV1Rules:e.mutation({query:e=>({url:"/api/v1/rules",method:"PUT",body:e.rule})}),getApiV1Rules:e.query({query:()=>({url:"/api/v1/rules"})}),postApiV1Rules:e.mutation({query:e=>({url:"/api/v1/rules",method:"POST",body:e.ruleCreate})}),postApiV1RulesReorder:e.mutation({query:e=>({url:"/api/v1/rules/reorder",method:"POST",body:e.body})}),deleteApiV1RulesById:e.mutation({query:e=>({url:`/api/v1/rules/${e.id}`,method:"DELETE"})}),getApiV1Search:e.query({query:e=>({url:"/api/v1/search",params:{actorType:e.actorType,fasp:e.fasp,faspHydrated:e.faspHydrated,filter:e.filter,followStatus:e.followStatus,followers:e.followers,following:e.following,groupId:e.groupId,groupMemberRole:e.groupMemberRole,includeRelations:e.includeRelations,lastId:e.lastId,limit:e.limit,offset:e.offset,ownerId:e.ownerId,q:e.q,resolve:e.resolve,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,withComments:e.withComments,withParent:e.withParent,htmlContent:e.htmlContent}})}),deleteApiV1SessionsAll:e.mutation({query:()=>({url:"/api/v1/sessions/all",method:"DELETE"})}),getApiV1SessionsList:e.query({query:()=>({url:"/api/v1/sessions/list"})}),putApiV1SessionsRevokeAll:e.mutation({query:()=>({url:"/api/v1/sessions/revoke/all",method:"PUT"})}),putApiV1SessionsRevokeBySessionKey:e.mutation({query:e=>({url:`/api/v1/sessions/revoke/${e.sessionKey}`,method:"PUT"})}),deleteApiV1SessionsBySessionKey:e.mutation({query:e=>({url:`/api/v1/sessions/${e.sessionKey}`,method:"DELETE"})}),putApiV1Settings:e.mutation({query:e=>({url:"/api/v1/settings",method:"PUT",body:e.platformSettings})}),getApiV1Settings:e.query({query:e=>({url:"/api/v1/settings",params:{keys:e.keys}})}),deleteApiV1Settings:e.mutation({query:e=>({url:"/api/v1/settings",method:"DELETE",params:{keys:e.keys}})}),getApiV1SettingsNames:e.query({query:e=>({url:"/api/v1/settings/names",params:{type:e.type}})}),putApiV1SettingsUser:e.mutation({query:e=>({url:"/api/v1/settings/user",method:"PUT",body:e.userSettings})}),getApiV1SettingsUser:e.query({query:e=>({url:"/api/v1/settings/user",params:{keys:e.keys}})}),deleteApiV1SettingsUser:e.mutation({query:e=>({url:"/api/v1/settings/user",method:"DELETE",params:{keys:e.keys}})}),getApiV1TagsFeatured:e.query({query:e=>({url:"/api/v1/tags/featured",params:{scope:e.scope,userId:e.userId}})}),deleteApiV1TagsFeaturedByName:e.mutation({query:e=>({url:`/api/v1/tags/featured/${e.name}`,method:"DELETE",params:{scope:e.scope}})}),postApiV1TagsFeaturedByName:e.mutation({query:e=>({url:`/api/v1/tags/featured/${e.name}`,method:"POST",params:{scope:e.scope}})}),postApiV1TagsFollowByName:e.mutation({query:e=>({url:`/api/v1/tags/follow/${e.name}`,method:"POST",params:{scope:e.scope}})}),getApiV1TagsFollowed:e.query({query:e=>({url:"/api/v1/tags/followed",params:{scope:e.scope}})}),putApiV1TagsList:e.mutation({query:e=>({url:"/api/v1/tags/list",method:"PUT",body:e.body,params:{scope:e.scope,soft:e.soft,type:e.type}})}),patchApiV1TagsList:e.mutation({query:e=>({url:"/api/v1/tags/list",method:"PATCH",body:e.body,params:{scope:e.scope,soft:e.soft,type:e.type}})}),getApiV1TagsList:e.query({query:e=>({url:"/api/v1/tags/list",params:{scope:e.scope,soft:e.soft,type:e.type}})}),deleteApiV1TagsList:e.mutation({query:e=>({url:"/api/v1/tags/list",method:"DELETE",body:e.body,params:{scope:e.scope,soft:e.soft,type:e.type}})}),putApiV1TagsPolicy:e.mutation({query:e=>({url:"/api/v1/tags/policy",method:"PUT",body:e.setTagPolicyRequest,params:{scope:e.scope}})}),getApiV1TagsPolicy:e.query({query:e=>({url:"/api/v1/tags/policy",params:{scope:e.scope}})}),postApiV1TagsReport:e.mutation({query:e=>({url:"/api/v1/tags/report",method:"POST",body:e.createTagReportRequest,params:{name:e.name,scope:e.scope}})}),getApiV1TagsReports:e.query({query:e=>({url:"/api/v1/tags/reports",params:{scope:e.scope}})}),getApiV1TagsSearch:e.query({query:e=>({url:"/api/v1/tags/search",params:{limit:e.limit,name:e.name,offset:e.offset,scope:e.scope}})}),getApiV1TagsTrending:e.query({query:e=>({url:"/api/v1/tags/trending",params:{limit:e.limit,offset:e.offset,scope:e.scope,sortBy:e.sortBy,sortOrder:e.sortOrder}})}),postApiV1TagsUnfollowByName:e.mutation({query:e=>({url:`/api/v1/tags/unfollow/${e.name}`,method:"POST",params:{scope:e.scope}})}),getApiV1TagsByName:e.query({query:e=>({url:`/api/v1/tags/${e.name}`,params:{historySince:e.historySince,scope:e.scope}})}),postApiV1TranslateText:e.mutation({query:e=>({url:"/api/v1/translate/text",method:"POST",body:e.translationRequest})}),getApiV1TrendsLinks:e.query({query:()=>({url:"/api/v1/trends/links"})}),getApiV1TrendsPosts:e.query({query:e=>({url:"/api/v1/trends/posts",params:{htmlContent:e.htmlContent}})}),getApiV1TrendsTags:e.query({query:e=>({url:"/api/v1/trends/tags",params:{scope:e.scope}})}),postApiV1Uploads:e.mutation({query:e=>({url:"/api/v1/uploads",method:"POST",body:e.createUpload})}),postApiV1UploadsBatch:e.mutation({query:e=>({url:"/api/v1/uploads/batch",method:"POST",body:e.body})}),postApiV1UploadsList:e.mutation({query:e=>({url:"/api/v1/uploads/list",method:"POST",body:e.uploadList})}),getApiV1UploadsSearch:e.query({query:e=>({url:"/api/v1/uploads/search",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,tag:e.tag,untilId:e.untilId,uploadType:e.uploadType}})}),getApiV1UploadsUsages:e.query({query:e=>({url:"/api/v1/uploads/usages",params:{ids:e.ids}})}),getApiV1UploadsById:e.query({query:e=>({url:`/api/v1/uploads/${e.id}`})}),deleteApiV1UploadsById:e.mutation({query:e=>({url:`/api/v1/uploads/${e.id}`,method:"DELETE"})}),postApiV1UploadsByIdMeta:e.mutation({query:e=>({url:`/api/v1/uploads/${e.id}/meta`,method:"POST",body:e.body})}),putApiV1UploadsByIdMeta:e.mutation({query:e=>({url:`/api/v1/uploads/${e.id}/meta`,method:"PUT",body:e.body})}),postApiV1UploadsByIdPrivacy:e.mutation({query:e=>({url:`/api/v1/uploads/${e.id}/privacy`,method:"POST",body:e.updateUploadPrivacy})}),postApiV1UploadsByIdTags:e.mutation({query:e=>({url:`/api/v1/uploads/${e.id}/tags`,method:"POST",body:e.body})}),putApiV1UploadsByIdTags:e.mutation({query:e=>({url:`/api/v1/uploads/${e.id}/tags`,method:"PUT",body:e.body})}),postApiV1UploadsByIdThumbnail:e.mutation({query:e=>({url:`/api/v1/uploads/${e.id}/thumbnail`,method:"POST",body:e.changeVideoThumbnail})}),getApiV1UserAlias:e.query({query:()=>({url:"/api/v1/user-alias"})}),deleteApiV1UserAlias:e.mutation({query:e=>({url:"/api/v1/user-alias",method:"DELETE",params:{uri:e.uri}})}),postApiV1UserAlias:e.mutation({query:e=>({url:"/api/v1/user-alias",method:"POST",params:{acct:e.acct}})}),getApiV1UserDomainBlock:e.query({query:()=>({url:"/api/v1/user-domain-block"})}),deleteApiV1UserDomainBlockByDomain:e.mutation({query:e=>({url:`/api/v1/user-domain-block/${e.domain}`,method:"DELETE"})}),postApiV1UserDomainBlockByDomain:e.mutation({query:e=>({url:`/api/v1/user-domain-block/${e.domain}`,method:"POST"})}),deleteApiV1Users:e.mutation({query:e=>({url:"/api/v1/users",method:"DELETE",params:{id:e.id,name:e.name}})}),postApiV1Users:e.mutation({query:e=>({url:"/api/v1/users",method:"POST",body:e.userCreate,params:{htmlContent:e.htmlContent}})}),getApiV1Users:e.query({query:e=>({url:"/api/v1/users",params:{full:e.full,includeBlockedByStatus:e.includeBlockedByStatus,includeBlockedStatus:e.includeBlockedStatus,includeFollowedStatus:e.includeFollowedStatus,includeFollowingStatus:e.includeFollowingStatus,includeMutedStatus:e.includeMutedStatus,relations:e.relations,username:e.username,htmlContent:e.htmlContent}})}),getApiV1UsersConnections:e.query({query:e=>({url:"/api/v1/users/connections",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,status:e.status,untilId:e.untilId}})}),postApiV1UsersFollowByUsername:e.mutation({query:e=>({url:`/api/v1/users/follow/${e.username}`,method:"POST",params:{domain:e.domain,mutual:e.mutual,scheme:e.scheme}})}),postApiV1UsersFollowByUsernameAccept:e.mutation({query:e=>({url:`/api/v1/users/follow/${e.username}/accept`,method:"POST"})}),postApiV1UsersFollowByUsernamePend:e.mutation({query:e=>({url:`/api/v1/users/follow/${e.username}/pend`,method:"POST"})}),postApiV1UsersFollowByUsernameReject:e.mutation({query:e=>({url:`/api/v1/users/follow/${e.username}/reject`,method:"POST"})}),postApiV1UsersFollowByUsernameUndo:e.mutation({query:e=>({url:`/api/v1/users/follow/${e.username}/undo`,method:"POST",params:{domain:e.domain,mutual:e.mutual,scheme:e.scheme}})}),getApiV1UsersFollowees:e.query({query:e=>({url:"/api/v1/users/followees",params:{anyStatus:e.anyStatus,lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,status:e.status,untilId:e.untilId}})}),getApiV1UsersFollowers:e.query({query:e=>({url:"/api/v1/users/followers",params:{anyStatus:e.anyStatus,lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,status:e.status,untilId:e.untilId}})}),getApiV1UsersInviteLinks:e.query({query:e=>({url:"/api/v1/users/invite-links",params:{active:e.active,lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),postApiV1UsersInviteLinks:e.mutation({query:e=>({url:"/api/v1/users/invite-links",method:"POST",body:e.signupInviteLinkCreate})}),putApiV1UsersInviteLinksDeactivateByCode:e.mutation({query:e=>({url:`/api/v1/users/invite-links/deactivate/${e.code}`,method:"PUT"})}),getApiV1UsersProfile:e.query({query:e=>({url:"/api/v1/users/profile",params:{htmlContent:e.htmlContent}})}),getApiV1UsersRelationships:e.query({query:e=>({url:"/api/v1/users/relationships",params:{filter:e.filter,targets:e.targets}})}),getApiV1UsersRemoteByUserNameFullFollowers:e.query({query:e=>({url:`/api/v1/users/remote/${e.userNameFull}/followers`,params:{limit:e.limit,offset:e.offset}})}),getApiV1UsersRemoteByUserNameFullFollowing:e.query({query:e=>({url:`/api/v1/users/remote/${e.userNameFull}/following`,params:{limit:e.limit,offset:e.offset}})}),getApiV1UsersRenameHistory:e.query({query:()=>({url:"/api/v1/users/rename-history"})}),putApiV1UsersByUserId:e.mutation({query:e=>({url:`/api/v1/users/${e.userId}`,method:"PUT",body:e.userUpdate,params:{htmlContent:e.htmlContent}})}),getApiV1UsersByUserId:e.query({query:e=>({url:`/api/v1/users/${e.userId}`,params:{full:e.full,includeBlockedByStatus:e.includeBlockedByStatus,includeBlockedStatus:e.includeBlockedStatus,includeFollowedStatus:e.includeFollowedStatus,includeFollowingStatus:e.includeFollowingStatus,includeMutedStatus:e.includeMutedStatus,relations:e.relations,htmlContent:e.htmlContent}})}),getApiV1UsersByUserIdFollowers:e.query({query:e=>({url:`/api/v1/users/${e.userId}/followers`,params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),getApiV1UsersByUserIdFollowing:e.query({query:e=>({url:`/api/v1/users/${e.userId}/following`,params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),putApiV1UsersByUserIdMedia:e.mutation({query:e=>({url:`/api/v1/users/${e.userId}/media`,method:"PUT",body:e.userUpdateMedia,params:{htmlContent:e.htmlContent}})}),getRoot:e.query({query:e=>({url:"/",params:{format:e.format}})}),getUser:e.query({query:e=>({url:`/@${e.username}`,params:{format:e.format}})}),getUserEvent:e.query({query:e=>({url:`/@${e.username}/events/${e.eventId}`,params:{format:e.format}})}),getUserPost:e.query({query:e=>({url:`/@${e.username}/posts/${e.postId}`,params:{format:e.format}})}),getAbout:e.query({query:e=>({url:"/about",params:{format:e.format}})}),getFeed:e.query({query:e=>({url:"/feed",params:{format:e.format}})}),getFeedDiscover:e.query({query:e=>({url:"/feed/discover",params:{format:e.format}})}),getFeedFollowing:e.query({query:e=>({url:"/feed/following",params:{format:e.format}})}),getGroup:e.query({query:e=>({url:`/g/${e.groupName}`,params:{format:e.format}})}),getGroupChannel:e.query({query:e=>({url:`/g/${e.groupName}/@${e.channelName}`,params:{format:e.format}})}),getGroupChannelPost:e.query({query:e=>({url:`/g/${e.groupName}/@${e.channelName}/posts/${e.postId}`,params:{format:e.format}})}),getGroupEvent:e.query({query:e=>({url:`/g/${e.groupName}/events/${e.eventId}`,params:{format:e.format}})}),getGroupForumCategory:e.query({query:e=>({url:`/g/${e.groupName}/forum/c/${e.categoryName}`,params:{format:e.format}})}),getGroupForumPost:e.query({query:e=>({url:`/g/${e.groupName}/forum/posts/${e.postId}`,params:{format:e.format}})}),getForumTag:e.query({query:e=>({url:`/g/${e.groupName}/forum/tag/${e.tagName}`,params:{format:e.format}})}),getPrivacy:e.query({query:e=>({url:"/privacy",params:{format:e.format}})}),getTerms:e.query({query:e=>({url:"/terms",params:{format:e.format}})})}),overrideExisting:!1}),OO={forgotPasswordStep:"request",forgotPasswordFields:null,signupStep:"rules",signupFields:null,token:null,newEmail:null,isPending:!!J$.getToken(),isAuthenticated:!1,isAskLoginOpen:!1},mX=oo({name:"auth",initialState:OO,reducers:{setAskLoginOpen:(e,t)=>{e.isAskLoginOpen=t.payload},login:(e,t)=>{e.isAuthenticated=!0,e.token=t.payload||null,e.isPending=!1},logout:()=>({...OO,isPending:!1}),setNewEmail:(e,t)=>{e.newEmail=t.payload},setForgotPasswordStep:(e,t)=>{e.forgotPasswordStep=t.payload},updateForgotPasswordFields:(e,t)=>{e.forgotPasswordFields={...e.forgotPasswordFields,...t.payload}},resetForgotPasswordFields:e=>{e.forgotPasswordFields=null},setSignupStep:(e,t)=>{e.signupStep=t.payload},updateSignupFields:(e,t)=>{e.signupFields={...e.signupFields,...t.payload}},resetSignupFields:e=>{e.signupFields=null},setPending:(e,t)=>{e.isPending=t.payload}},selectors:{selectAskLoginOpen:e=>e.isAskLoginOpen,selectToken:e=>e.token,selectNewEmail:e=>e.newEmail,selectForgotPasswordStep:e=>e.forgotPasswordStep,selectForgotPasswordFields:e=>e.forgotPasswordFields,selectSignupStep:e=>e.signupStep,selectSignupFields:e=>e.signupFields,selectPending:e=>e.isPending,selectIsAuthenticated:e=>e.isAuthenticated}}),hX={data:null,isPending:!1,isSuccess:!1},vX=oo({name:"userNoHTML",initialState:hX,reducers:{setUser:(e,t)=>{e.data=t.payload},setPending:(e,t)=>{e.isPending=t.payload},setSuccess:(e,{payload:t})=>{e.isSuccess=t},setError:(e,{payload:t})=>{e.error=t}},selectors:{selectUser:e=>e.data,selectPending:e=>e.isPending,selectError:e=>e.error,selectSuccess:e=>e.isSuccess}}),AO={data:null,isError:!1,isPending:!1,isSuccess:!1},gX=oo({name:"user",initialState:AO,reducers:{reset:e=>{Object.assign(e,AO)}},extraReducers:e=>{e.addCase(BH,((e,{payload:t})=>{e.data=t})).addCase(jH,((e,{payload:t})=>{e.data&&Object.assign(e.data,t||{})})).addCase(FH,((e,{payload:t})=>{e.isSuccess=t})).addCase(LH,((e,{payload:t})=>{e.isPending=t})).addCase(kH,((e,{payload:t})=>{e.isError=t})).addCase(NH,((e,{payload:t})=>{e.error=t})).addCase(zH,((e,{payload:t})=>{var n;null!=(n=e.data)&&n.users&&(e.data.users=e.data.users.map((e=>t.id===e.id?t:e)))}))},selectors:{selectIsError:e=>e.isError,selectError:e=>e.error,selectPending:e=>e.isPending,selectData:e=>e.data,selectAccount:e=>{var t;return null==(t=e.data)?void 0:t.account},selectAccountId:e=>{var t;return null==(t=e.data)?void 0:t.account.id},selectUsers:e=>{var t;return null==(t=e.data)?void 0:t.users},selectUserById:(e,t)=>{var n;return null==(n=e.data)?void 0:n.users.find((({id:e})=>e===t))},selectCurrentUser:e=>{var t;return null==(t=e.data)?void 0:t.users.find((({id:t})=>{var n;return t===(null==(n=e.data)?void 0:n.selectedUserId)}))},selectSelectedUserId:e=>{var t;return null==(t=e.data)?void 0:t.selectedUserId},selectSuccess:e=>e.isSuccess}});var LO;const yX={value:(null==(LO=Z$())?void 0:LO.initialState)??null},wX=oo({name:"initialState",initialState:yX,reducers:{setInitialState:(e,t)=>{e.value=t.payload},clearInitialState:e=>{e.value=null}},selectors:{selectInitialState:e=>e.value}}),eC=e=>e,r0=Zn(eC,(e=>e.data)),bX=Zn(eC,(e=>e.error)),_X=Zn(eC,(e=>e.isPending)),xX=Zn(r0,(e=>null==e?void 0:e.rules)),SX=Zn(r0,(e=>null==e?void 0:e.contact_account)),EX=Zn(r0,(e=>(null==e?void 0:e.stats)&&Object.fromEntries(Object.entries(e.stats).map((([e,t])=>[e,t??0]))))),$X={data:null,isPending:!1},CX=oo({name:"instanceInfo",initialState:$X,reducers:{},extraReducers:e=>{e.addCase(JH,((e,{payload:t})=>{e.data=t})).addCase(ZH,((e,{payload:t})=>{e.isPending=t})).addCase(eK,((e,{payload:t})=>{e.error=t}))},selectors:{selectInstanceInfo:r0,selectInstanceInfoError:bX,selectInstanceInfoPending:_X,selectPlatformRules:xX,selectInstanceContacts:SX,selectInstanceStats:EX,selectDescription:e=>{var t;return null==(t=e.data)?void 0:t.description},selectStats:e=>{var t;return null==(t=e.data)?void 0:t.stats},selectRegistrations:e=>{var t;return null==(t=e.data)?void 0:t.configuration.registrations}}}),IX={data:null,isPending:!1,isSuccess:!1},RX=oo({name:"profileSettings",initialState:IX,reducers:{setPending:(e,t)=>{e.isPending=t.payload},setSuccess:(e,{payload:t})=>{e.isSuccess=t},setError:(e,{payload:t})=>{e.error=t}},extraReducers:e=>{e.addCase(nK,((e,{payload:t})=>{e.data=t}))},selectors:{selectProfileSettings:e=>e.data,selectPending:e=>e.isPending,selectError:e=>e.error,selectSuccess:e=>e.isSuccess}}),PX={sms:"wellesley.admin.sms",openai:"wellesley.admin.openai",uploads:"wellesley.admin.uploads",captcha:"wellesley.admin.captcha",language:"wellesley.admin.language",mediacache:"wellesley.admin.mediacache",translation:"wellesley.admin.translation",link_service:"wellesley.admin.link_service"},sE={posts:"wellesley.posts",translation:"wellesley.translation",registration:"wellesley.registration",confirmationCode:"wellesley.confirmationCode",uploadsPolicyDoc:"wellesley.uploads.policy.doc",uploadsPolicyAudio:"wellesley.uploads.policy.audio",uploadsPolicyImage:"wellesley.uploads.policy.image",uploadsPolicyVideo:"wellesley.uploads.policy.video",captcha:"wellesley.captcha",access:"wellesley.access",branding:"wellesley.branding",instanceAdmin:"wellesley.instance.admin",legal:"wellesley.instance.legal",domainBlocks:"wellesley.instance.domainBlocks",contacts:"wellesley.instance.contacts"},Im=e=>(null==e?void 0:e.map((e=>e.value||e)))||[],TX={data:null,isPending:!1},{posts:mS,uploadsPolicyDoc:MO,uploadsPolicyAudio:hS,uploadsPolicyImage:jg,uploadsPolicyVideo:Kh,registration:M3,captcha:OX,instanceAdmin:AX,branding:MX,translation:DX,domainBlocks:NX,access:kX}=sE,{captcha:LX,language:FX,translation:BX,openai:jX,link_service:zX}=PX,sp=e=>e.data,VX=Zn(sp,(e=>{var t,n,r;return{max_characters:(null==(t=null==e?void 0:e[mS])?void 0:t.max_characters)||0,max_media_attachments:(null==(n=null==e?void 0:e[mS])?void 0:n.max_media_attachments)||0,max_pins:(null==(r=null==e?void 0:e[mS])?void 0:r.max_pins)||0}})),tC=Zn(sp,(e=>{var t,n,r;return{...null==e?void 0:e[jg],maxSize:(null==(t=null==e?void 0:e[jg])?void 0:t.maxSize)||0,maxMatrix:(null==(n=null==e?void 0:e[jg])?void 0:n.maxMatrix)||0,maxResolution:(null==(r=null==e?void 0:e[jg])?void 0:r.maxResolution)||0}})),UX=Zn(tC,(e=>Im(e.extensions))),nC=Zn(sp,(e=>{var t,n,r,o;return{...null==e?void 0:e[Kh],maxSize:(null==(t=null==e?void 0:e[Kh])?void 0:t.maxSize)||0,maxMatrix:(null==(n=null==e?void 0:e[Kh])?void 0:n.maxMatrix)||0,maxDuration:(null==(r=null==e?void 0:e[Kh])?void 0:r.maxDuration)||0,maxResolution:(null==(o=null==e?void 0:e[Kh])?void 0:o.maxResolution)||0}})),WX=Zn(nC,(e=>Im(e.extensions))),D3=Zn(sp,(e=>{var t,n;return{...null==e?void 0:e[hS],maxSize:null==(t=null==e?void 0:e[hS])?void 0:t.maxSize,keepOriginal:(null==(n=null==e?void 0:e[hS])?void 0:n.keepOriginal)||0}})),N3=Zn(sp,(e=>{var t;return{...null==e?void 0:e[MO],maxSize:(null==(t=null==e?void 0:e[MO])?void 0:t.maxSize)||0}})),k3=Zn([tC,nC,D3,N3],((e,t,n,r)=>({IMAGE:Im(null==e?void 0:e.extensions),VIDEO:Im(null==t?void 0:t.extensions),AUDIO:Im(null==n?void 0:n.extensions),DOCUMENT:Im(null==r?void 0:r.extensions)}))),qX=Zn(k3,(e=>Object.keys(e).reduce(((t,n)=>[...t,...e[n]||[]]),[]))),GX=Zn(sp,(e=>{var t;return null==(t=null==e?void 0:e[M3])?void 0:t.invites})),HX=oo({name:"platformSettings",initialState:TX,reducers:{setError:(e,t)=>{e.error=t.payload},setPending:(e,t)=>{e.isPending=t.payload}},extraReducers:e=>{e.addCase(tK,((e,{payload:t})=>{e.data={...e.data,...t}}))},selectors:{selectSettings:sp,selectPostConfig:VX,selectDocPolicy:N3,selectImagePolicy:tC,selectVideoPolicy:nC,selectAudioPolicy:D3,selectInvitesEnabled:GX,selectImageExtensions:UX,selectVideoExtensions:WX,selectSupportedExtensions:k3,selectFullExtensionsList:qX,selectRegistration:e=>{var t;return null==(t=e.data)?void 0:t[M3]},selectLanguageDetection:e=>{var t;return null==(t=e.data)?void 0:t[FX]},selectLanguageTranslation:e=>{var t;return null==(t=e.data)?void 0:t[BX]},selectOpenai:e=>{var t;return null==(t=e.data)?void 0:t[jX]},selectCaptcha:e=>{var t;return null==(t=e.data)?void 0:t[OX]},selectAdminCaptcha:e=>{var t;return null==(t=e.data)?void 0:t[LX]},selectPlatformTranslation:e=>{var t;return null==(t=e.data)?void 0:t[DX]},selectAccess:e=>{var t;return null==(t=e.data)?void 0:t[kX]},selectBranding:e=>{var t;return null==(t=e.data)?void 0:t[MX]},selectLinkService:e=>{var t;return null==(t=e.data)?void 0:t[zX]},selectInstanceAdmin:e=>{var t;return null==(t=e.data)?void 0:t[AX]},selectLegal:e=>{var t;return null==(t=e.data)?void 0:t[sE.legal]},selectDomainBlocks:e=>{var t;return null==(t=e.data)?void 0:t[NX]},selectContacts:e=>{var t;return null==(t=e.data)?void 0:t[sE.contacts]}}}),DO={data:{userId:"",list:[]},count:{},isPending:!1},KX=e=>e,YX=e=>e.error,QX=e=>e.isPending,XX=e=>{var t;return null==(t=e.count)?void 0:t.total},JX=e=>{var t;return null==(t=e.count)?void 0:t.unread},ZX=e=>e.data.userId,rC=Zn(KX,(e=>e.data.list)),eJ=Zn(rC,(e=>null==e?void 0:e.filter((e=>"UNREAD"===e.status)))),tJ=Zn(rC,(e=>null==e?void 0:e.at(-1))),nJ=oo({name:"notifications",initialState:DO,reducers:{updateNotification:(e,t)=>{var n;if(!e.data.list)return;const r=t.payload;e.data.list=null==(n=e.data.list)?void 0:n.map((e=>e.id===r.id?{...e,...r}:e))},readAll:e=>{var t;e.data.list&&(e.data.list=null==(t=e.data.list)?void 0:t.map((e=>({...e,status:"READ"}))))}},extraReducers:e=>{e.addCase(GH,((e,t)=>{e.isPending=t.payload})).addCase(WH,((e,t)=>{e.error=t.payload})).addCase(qH,((e,t)=>{const n=t.payload.userId,r=t.payload.list;e.data={userId:n,list:[...e.data.list||[],...r.filter((t=>{var n;return!(null!=(n=e.data.list)&&n.some((e=>e.id===t.id)))}))]}})).addCase(VH,((e,t)=>{e.count.unread=(e.count.unread||0)+1,e.data.list&&(e.data.list=[t.payload,...e.data.list||[]])})).addCase(UH,((e,t)=>{e.data.list&&(e.data.list=e.data.list.map((e=>e.id===t.payload.id?{...e,status:t.payload.status}:e)))})).addCase(HH,((e,t)=>{e.count.total=t.payload})).addCase(KH,((e,t)=>{e.count.unread=t.payload})).addCase(QH,(()=>DO)).addCase(XH,((e,t)=>{var n,r,o;const a=t.payload;"UNREAD"===(null==(r=null==(n=e.data.list)?void 0:n.find((e=>e.id===a)))?void 0:r.status)&&e.count.unread&&(e.count.unread-=1),e.data.list=(null==(o=e.data.list)?void 0:o.filter((e=>e.id!==a)))||[]})).addCase(YH,(e=>{e.data.list&&(e.data.list=e.data.list.map((e=>"FOLLOW_REQUEST"===e.type?{...e,followResponse:"Accepted"}:e)))}))},selectors:{selectError:YX,selectIsPending:QX,selectTotalCount:XX,selectUnreadCount:JX,selectNotifications:rC,selectUnreadNotifications:eJ,selectLastNotification:tJ,selectNotificationsOwner:ZX}}),L3=KL(pX,Kg,t3,mX,gX,vX,wX,CX,nJ,RX,HX);Vn("app/hydrate");var NO,ev={exports:{}},rJ=ev.exports;
89
89
  /**
90
90
  * @license
91
91
  * Lodash <https://lodash.com/>
@@ -93,4 +93,4 @@ const R5=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),rA=(...e)=>e.f
93
93
  * Released under MIT license <https://lodash.com/license>
94
94
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
95
95
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
96
- */function oJ(){return N2||(N2=1,e=ev,t=ev.exports,function(){var n,r="Expected a function",o="__lodash_hash_undefined__",a="__lodash_placeholder__",i=16,s=32,u=64,l=128,c=256,d=1/0,f=9007199254740991,p=NaN,m=4294967295,v=m-1,h=m>>>1,g=[["ary",l],["bind",1],["bindKey",2],["curry",8],["curryRight",i],["flip",512],["partial",s],["partialRight",u],["rearg",c]],y="[object Arguments]",b="[object Array]",w="[object Boolean]",x="[object Date]",_="[object Error]",E="[object Function]",S="[object GeneratorFunction]",I="[object Map]",A="[object Number]",k="[object Object]",C="[object Promise]",P="[object RegExp]",R="[object Set]",O="[object String]",T="[object Symbol]",N="[object WeakMap]",M="[object ArrayBuffer]",j="[object DataView]",D="[object Float32Array]",q="[object Float64Array]",z="[object Int8Array]",L="[object Int16Array]",$="[object Int32Array]",V="[object Uint8Array]",B="[object Uint8ClampedArray]",F="[object Uint16Array]",U="[object Uint32Array]",G=/\b__p \+= '';/g,W=/\b(__p \+=) '' \+/g,H=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Q=/&(?:amp|lt|gt|quot|#39);/g,K=/[&<>"']/g,Y=RegExp(Q.source),J=RegExp(K.source),X=/<%-([\s\S]+?)%>/g,Z=/<%([\s\S]+?)%>/g,ee=/<%=([\s\S]+?)%>/g,te=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ne=/^\w*$/,re=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,oe=/[\\^$.*+?()[\]{}|]/g,ae=RegExp(oe.source),ie=/^\s+/,se=/\s/,ue=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,le=/\{\n\/\* \[wrapped with (.+)\] \*/,ce=/,? & /,de=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,fe=/[()=,{}\[\]\/\s]/,pe=/\\(\\)?/g,me=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ve=/\w*$/,he=/^[-+]0x[0-9a-f]+$/i,ge=/^0b[01]+$/i,ye=/^\[object .+?Constructor\]$/,be=/^0o[0-7]+$/i,we=/^(?:0|[1-9]\d*)$/,xe=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,_e=/($^)/,Ee=/['\n\r\u2028\u2029\\]/g,Se="\\ud800-\\udfff",Ie="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ae="\\u2700-\\u27bf",ke="a-z\\xdf-\\xf6\\xf8-\\xff",Ce="A-Z\\xc0-\\xd6\\xd8-\\xde",Pe="\\ufe0e\\ufe0f",Re="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\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",Oe="['’]",Te="["+Se+"]",Ne="["+Re+"]",Me="["+Ie+"]",je="\\d+",De="["+Ae+"]",qe="["+ke+"]",ze="[^"+Se+Re+je+Ae+ke+Ce+"]",Le="\\ud83c[\\udffb-\\udfff]",$e="[^"+Se+"]",Ve="(?:\\ud83c[\\udde6-\\uddff]){2}",Be="[\\ud800-\\udbff][\\udc00-\\udfff]",Fe="["+Ce+"]",Ue="\\u200d",Ge="(?:"+qe+"|"+ze+")",We="(?:"+Fe+"|"+ze+")",He="(?:['’](?:d|ll|m|re|s|t|ve))?",Qe="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ke="(?:"+Me+"|"+Le+")?",Ye="["+Pe+"]?",Je=Ye+Ke+"(?:"+Ue+"(?:"+[$e,Ve,Be].join("|")+")"+Ye+Ke+")*",Xe="(?:"+[De,Ve,Be].join("|")+")"+Je,Ze="(?:"+[$e+Me+"?",Me,Ve,Be,Te].join("|")+")",et=RegExp(Oe,"g"),tt=RegExp(Me,"g"),nt=RegExp(Le+"(?="+Le+")|"+Ze+Je,"g"),rt=RegExp([Fe+"?"+qe+"+"+He+"(?="+[Ne,Fe,"$"].join("|")+")",We+"+"+Qe+"(?="+[Ne,Fe+Ge,"$"].join("|")+")",Fe+"?"+Ge+"+"+He,Fe+"+"+Qe,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",je,Xe].join("|"),"g"),ot=RegExp("["+Ue+Se+Ie+Pe+"]"),at=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,it=["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"],st=-1,ut={};ut[D]=ut[q]=ut[z]=ut[L]=ut[$]=ut[V]=ut[B]=ut[F]=ut[U]=!0,ut[y]=ut[b]=ut[M]=ut[w]=ut[j]=ut[x]=ut[_]=ut[E]=ut[I]=ut[A]=ut[k]=ut[P]=ut[R]=ut[O]=ut[N]=!1;var lt={};lt[y]=lt[b]=lt[M]=lt[j]=lt[w]=lt[x]=lt[D]=lt[q]=lt[z]=lt[L]=lt[$]=lt[I]=lt[A]=lt[k]=lt[P]=lt[R]=lt[O]=lt[T]=lt[V]=lt[B]=lt[F]=lt[U]=!0,lt[_]=lt[E]=lt[N]=!1;var ct={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},dt=parseFloat,ft=parseInt,pt="object"==typeof Da&&Da&&Da.Object===Object&&Da,mt="object"==typeof self&&self&&self.Object===Object&&self,vt=pt||mt||Function("return this")(),ht=t&&!t.nodeType&&t,gt=ht&&e&&!e.nodeType&&e,yt=gt&&gt.exports===ht,bt=yt&&pt.process,wt=function(){try{return gt&&gt.require&&gt.require("util").types||bt&&bt.binding&&bt.binding("util")}catch{}}(),xt=wt&&wt.isArrayBuffer,_t=wt&&wt.isDate,Et=wt&&wt.isMap,St=wt&&wt.isRegExp,It=wt&&wt.isSet,At=wt&&wt.isTypedArray;function kt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Ct(e,t,n,r){for(var o=-1,a=null==e?0:e.length;++o<a;){var i=e[o];t(r,i,n(i),e)}return r}function Pt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function Rt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Ot(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function Tt(e,t){for(var n=-1,r=null==e?0:e.length,o=0,a=[];++n<r;){var i=e[n];t(i,n,e)&&(a[o++]=i)}return a}function Nt(e,t){return!(null==e||!e.length)&&Ft(e,t,0)>-1}function Mt(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}function jt(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}function Dt(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function qt(e,t,n,r){var o=-1,a=null==e?0:e.length;for(r&&a&&(n=e[++o]);++o<a;)n=t(n,e[o],o,e);return n}function zt(e,t,n,r){var o=null==e?0:e.length;for(r&&o&&(n=e[--o]);o--;)n=t(n,e[o],o,e);return n}function Lt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var $t=Ht("length");function Vt(e,t,n){var r;return n(e,(function(e,n,o){if(t(e,n,o))return r=n,!1})),r}function Bt(e,t,n,r){for(var o=e.length,a=n+(r?1:-1);r?a--:++a<o;)if(t(e[a],a,e))return a;return-1}function Ft(e,t,n){return t==t?function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}(e,t,n):Bt(e,Gt,n)}function Ut(e,t,n,r){for(var o=n-1,a=e.length;++o<a;)if(r(e[o],t))return o;return-1}function Gt(e){return e!=e}function Wt(e,t){var n=null==e?0:e.length;return n?Yt(e,t)/n:p}function Ht(e){return function(t){return null==t?n:t[e]}}function Qt(e){return function(t){return null==e?n:e[t]}}function Kt(e,t,n,r,o){return o(e,(function(e,o,a){n=r?(r=!1,e):t(n,e,o,a)})),n}function Yt(e,t){for(var r,o=-1,a=e.length;++o<a;){var i=t(e[o]);i!==n&&(r=r===n?i:r+i)}return r}function Jt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Xt(e){return e&&e.slice(0,vn(e)+1).replace(ie,"")}function Zt(e){return function(t){return e(t)}}function en(e,t){return jt(t,(function(t){return e[t]}))}function tn(e,t){return e.has(t)}function nn(e,t){for(var n=-1,r=e.length;++n<r&&Ft(t,e[n],0)>-1;);return n}function rn(e,t){for(var n=e.length;n--&&Ft(t,e[n],0)>-1;);return n}var on=Qt({"À":"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"}),an=Qt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function sn(e){return"\\"+ct[e]}function un(e){return ot.test(e)}function ln(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function cn(e,t){return function(n){return e(t(n))}}function dn(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var s=e[n];(s===t||s===a)&&(e[n]=a,i[o++]=n)}return i}function fn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function pn(e){return un(e)?function(e){for(var t=nt.lastIndex=0;nt.test(e);)++t;return t}(e):$t(e)}function mn(e){return un(e)?function(e){return e.match(nt)||[]}(e):function(e){return e.split("")}(e)}function vn(e){for(var t=e.length;t--&&se.test(e.charAt(t)););return t}var hn=Qt({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),gn=function e(t){var se,Se=(t=null==t?vt:gn.defaults(vt.Object(),t,gn.pick(vt,it))).Array,Ie=t.Date,Ae=t.Error,ke=t.Function,Ce=t.Math,Pe=t.Object,Re=t.RegExp,Oe=t.String,Te=t.TypeError,Ne=Se.prototype,Me=ke.prototype,je=Pe.prototype,De=t["__core-js_shared__"],qe=Me.toString,ze=je.hasOwnProperty,Le=0,$e=(se=/[^.]+$/.exec(De&&De.keys&&De.keys.IE_PROTO||""))?"Symbol(src)_1."+se:"",Ve=je.toString,Be=qe.call(Pe),Fe=vt._,Ue=Re("^"+qe.call(ze).replace(oe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ge=yt?t.Buffer:n,We=t.Symbol,He=t.Uint8Array,Qe=Ge?Ge.allocUnsafe:n,Ke=cn(Pe.getPrototypeOf,Pe),Ye=Pe.create,Je=je.propertyIsEnumerable,Xe=Ne.splice,Ze=We?We.isConcatSpreadable:n,nt=We?We.iterator:n,ot=We?We.toStringTag:n,ct=function(){try{var e=ma(Pe,"defineProperty");return e({},"",{}),e}catch{}}(),pt=t.clearTimeout!==vt.clearTimeout&&t.clearTimeout,mt=Ie&&Ie.now!==vt.Date.now&&Ie.now,ht=t.setTimeout!==vt.setTimeout&&t.setTimeout,gt=Ce.ceil,bt=Ce.floor,wt=Pe.getOwnPropertySymbols,$t=Ge?Ge.isBuffer:n,Qt=t.isFinite,yn=Ne.join,bn=cn(Pe.keys,Pe),wn=Ce.max,xn=Ce.min,_n=Ie.now,En=t.parseInt,Sn=Ce.random,In=Ne.reverse,An=ma(t,"DataView"),kn=ma(t,"Map"),Cn=ma(t,"Promise"),Pn=ma(t,"Set"),Rn=ma(t,"WeakMap"),On=ma(Pe,"create"),Tn=Rn&&new Rn,Nn={},Mn=$a(An),jn=$a(kn),Dn=$a(Cn),qn=$a(Pn),zn=$a(Rn),Ln=We?We.prototype:n,$n=Ln?Ln.valueOf:n,Vn=Ln?Ln.toString:n;function Bn(e){if(rs(e)&&!Wi(e)&&!(e instanceof Wn)){if(e instanceof Gn)return e;if(ze.call(e,"__wrapped__"))return Va(e)}return new Gn(e)}var Fn=function(){function e(){}return function(t){if(!ns(t))return{};if(Ye)return Ye(t);e.prototype=t;var r=new e;return e.prototype=n,r}}();function Un(){}function Gn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=n}function Wn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=m,this.__views__=[]}function Hn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Qn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Kn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Yn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Kn;++t<n;)this.add(e[t])}function Jn(e){var t=this.__data__=new Qn(e);this.size=t.size}function Xn(e,t){var n=Wi(e),r=!n&&Gi(e),o=!n&&!r&&Yi(e),a=!n&&!r&&!o&&ds(e),i=n||r||o||a,s=i?Jt(e.length,Oe):[],u=s.length;for(var l in e)(t||ze.call(e,l))&&(!i||!("length"==l||o&&("offset"==l||"parent"==l)||a&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||xa(l,u)))&&s.push(l);return s}function Zn(e){var t=e.length;return t?e[Yr(0,t-1)]:n}function er(e,t){return qa(To(e),lr(t,0,e.length))}function tr(e){return qa(To(e))}function nr(e,t,r){(r!==n&&!Bi(e[t],r)||r===n&&!(t in e))&&sr(e,t,r)}function rr(e,t,r){var o=e[t];(!ze.call(e,t)||!Bi(o,r)||r===n&&!(t in e))&&sr(e,t,r)}function or(e,t){for(var n=e.length;n--;)if(Bi(e[n][0],t))return n;return-1}function ar(e,t,n,r){return mr(e,(function(e,o,a){t(r,e,n(e),a)})),r}function ir(e,t){return e&&No(t,Ns(t),e)}function sr(e,t,n){"__proto__"==t&&ct?ct(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ur(e,t){for(var r=-1,o=t.length,a=Se(o),i=null==e;++r<o;)a[r]=i?n:Cs(e,t[r]);return a}function lr(e,t,r){return e==e&&(r!==n&&(e=e<=r?e:r),t!==n&&(e=e>=t?e:t)),e}function cr(e,t,r,o,a,i){var s,u=1&t,l=2&t,c=4&t;if(r&&(s=a?r(e,o,a,i):r(e)),s!==n)return s;if(!ns(e))return e;var d=Wi(e);if(d){if(s=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&ze.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!u)return To(e,s)}else{var f=ga(e),p=f==E||f==S;if(Yi(e))return Ao(e,u);if(f==k||f==y||p&&!a){if(s=l||p?{}:ba(e),!u)return l?function(e,t){return No(e,ha(e),t)}(e,function(e,t){return e&&No(t,Ms(t),e)}(s,e)):function(e,t){return No(e,va(e),t)}(e,ir(s,e))}else{if(!lt[f])return a?e:{};s=function(e,t,n){var r=e.constructor;switch(t){case M:return ko(e);case w:case x:return new r(+e);case j:return function(e,t){var n=t?ko(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case D:case q:case z:case L:case $:case V:case B:case F:case U:return Co(e,n);case I:return new r;case A:case O:return new r(e);case P:return function(e){var t=new e.constructor(e.source,ve.exec(e));return t.lastIndex=e.lastIndex,t}(e);case R:return new r;case T:return function(e){return $n?Pe($n.call(e)):{}}(e)}}(e,f,u)}}i||(i=new Jn);var m=i.get(e);if(m)return m;i.set(e,s),us(e)?e.forEach((function(n){s.add(cr(n,t,r,n,e,i))})):os(e)&&e.forEach((function(n,o){s.set(o,cr(n,t,r,o,e,i))}));var v=d?n:(c?l?sa:ia:l?Ms:Ns)(e);return Pt(v||e,(function(n,o){v&&(n=e[o=n]),rr(s,o,cr(n,t,r,o,e,i))})),s}function dr(e,t,r){var o=r.length;if(null==e)return!o;for(e=Pe(e);o--;){var a=r[o],i=t[a],s=e[a];if(s===n&&!(a in e)||!i(s))return!1}return!0}function fr(e,t,o){if("function"!=typeof e)throw new Te(r);return Na((function(){e.apply(n,o)}),t)}function pr(e,t,n,r){var o=-1,a=Nt,i=!0,s=e.length,u=[],l=t.length;if(!s)return u;n&&(t=jt(t,Zt(n))),r?(a=Mt,i=!1):t.length>=200&&(a=tn,i=!1,t=new Yn(t));e:for(;++o<s;){var c=e[o],d=null==n?c:n(c);if(c=r||0!==c?c:0,i&&d==d){for(var f=l;f--;)if(t[f]===d)continue e;u.push(c)}else a(t,d,r)||u.push(c)}return u}Bn.templateSettings={escape:X,evaluate:Z,interpolate:ee,variable:"",imports:{_:Bn}},Bn.prototype=Un.prototype,Bn.prototype.constructor=Bn,Gn.prototype=Fn(Un.prototype),Gn.prototype.constructor=Gn,Wn.prototype=Fn(Un.prototype),Wn.prototype.constructor=Wn,Hn.prototype.clear=function(){this.__data__=On?On(null):{},this.size=0},Hn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Hn.prototype.get=function(e){var t=this.__data__;if(On){var r=t[e];return r===o?n:r}return ze.call(t,e)?t[e]:n},Hn.prototype.has=function(e){var t=this.__data__;return On?t[e]!==n:ze.call(t,e)},Hn.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=On&&t===n?o:t,this},Qn.prototype.clear=function(){this.__data__=[],this.size=0},Qn.prototype.delete=function(e){var t=this.__data__,n=or(t,e);return!(n<0||(n==t.length-1?t.pop():Xe.call(t,n,1),--this.size,0))},Qn.prototype.get=function(e){var t=this.__data__,r=or(t,e);return r<0?n:t[r][1]},Qn.prototype.has=function(e){return or(this.__data__,e)>-1},Qn.prototype.set=function(e,t){var n=this.__data__,r=or(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Kn.prototype.clear=function(){this.size=0,this.__data__={hash:new Hn,map:new(kn||Qn),string:new Hn}},Kn.prototype.delete=function(e){var t=fa(this,e).delete(e);return this.size-=t?1:0,t},Kn.prototype.get=function(e){return fa(this,e).get(e)},Kn.prototype.has=function(e){return fa(this,e).has(e)},Kn.prototype.set=function(e,t){var n=fa(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Yn.prototype.add=Yn.prototype.push=function(e){return this.__data__.set(e,o),this},Yn.prototype.has=function(e){return this.__data__.has(e)},Jn.prototype.clear=function(){this.__data__=new Qn,this.size=0},Jn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Jn.prototype.get=function(e){return this.__data__.get(e)},Jn.prototype.has=function(e){return this.__data__.has(e)},Jn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Qn){var r=n.__data__;if(!kn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Kn(r)}return n.set(e,t),this.size=n.size,this};var mr=Do(_r),vr=Do(Er,!0);function hr(e,t){var n=!0;return mr(e,(function(e,r,o){return n=!!t(e,r,o)})),n}function gr(e,t,r){for(var o=-1,a=e.length;++o<a;){var i=e[o],s=t(i);if(null!=s&&(u===n?s==s&&!cs(s):r(s,u)))var u=s,l=i}return l}function yr(e,t){var n=[];return mr(e,(function(e,r,o){t(e,r,o)&&n.push(e)})),n}function br(e,t,n,r,o){var a=-1,i=e.length;for(n||(n=wa),o||(o=[]);++a<i;){var s=e[a];t>0&&n(s)?t>1?br(s,t-1,n,r,o):Dt(o,s):r||(o[o.length]=s)}return o}var wr=qo(),xr=qo(!0);function _r(e,t){return e&&wr(e,t,Ns)}function Er(e,t){return e&&xr(e,t,Ns)}function Sr(e,t){return Tt(t,(function(t){return Zi(e[t])}))}function Ir(e,t){for(var r=0,o=(t=_o(t,e)).length;null!=e&&r<o;)e=e[La(t[r++])];return r&&r==o?e:n}function Ar(e,t,n){var r=t(e);return Wi(e)?r:Dt(r,n(e))}function kr(e){return null==e?e===n?"[object Undefined]":"[object Null]":ot&&ot in Pe(e)?function(e){var t=ze.call(e,ot),r=e[ot];try{e[ot]=n;var o=!0}catch{}var a=Ve.call(e);return o&&(t?e[ot]=r:delete e[ot]),a}(e):function(e){return Ve.call(e)}(e)}function Cr(e,t){return e>t}function Pr(e,t){return null!=e&&ze.call(e,t)}function Rr(e,t){return null!=e&&t in Pe(e)}function Or(e,t,r){for(var o=r?Mt:Nt,a=e[0].length,i=e.length,s=i,u=Se(i),l=1/0,c=[];s--;){var d=e[s];s&&t&&(d=jt(d,Zt(t))),l=xn(d.length,l),u[s]=!r&&(t||a>=120&&d.length>=120)?new Yn(s&&d):n}d=e[0];var f=-1,p=u[0];e:for(;++f<a&&c.length<l;){var m=d[f],v=t?t(m):m;if(m=r||0!==m?m:0,!(p?tn(p,v):o(c,v,r))){for(s=i;--s;){var h=u[s];if(!(h?tn(h,v):o(e[s],v,r)))continue e}p&&p.push(v),c.push(m)}}return c}function Tr(e,t,r){var o=null==(e=Ra(e,t=_o(t,e)))?e:e[La(Xa(t))];return null==o?n:kt(o,e,r)}function Nr(e){return rs(e)&&kr(e)==y}function Mr(e,t,r,o,a){return e===t||(null==e||null==t||!rs(e)&&!rs(t)?e!=e&&t!=t:function(e,t,r,o,a,i){var s=Wi(e),u=Wi(t),l=s?b:ga(e),c=u?b:ga(t),d=(l=l==y?k:l)==k,f=(c=c==y?k:c)==k,p=l==c;if(p&&Yi(e)){if(!Yi(t))return!1;s=!0,d=!1}if(p&&!d)return i||(i=new Jn),s||ds(e)?oa(e,t,r,o,a,i):function(e,t,n,r,o,a,i){switch(n){case j:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case M:return!(e.byteLength!=t.byteLength||!a(new He(e),new He(t)));case w:case x:case A:return Bi(+e,+t);case _:return e.name==t.name&&e.message==t.message;case P:case O:return e==t+"";case I:var s=ln;case R:var u=1&r;if(s||(s=fn),e.size!=t.size&&!u)return!1;var l=i.get(e);if(l)return l==t;r|=2,i.set(e,t);var c=oa(s(e),s(t),r,o,a,i);return i.delete(e),c;case T:if($n)return $n.call(e)==$n.call(t)}return!1}(e,t,l,r,o,a,i);if(!(1&r)){var m=d&&ze.call(e,"__wrapped__"),v=f&&ze.call(t,"__wrapped__");if(m||v){var h=m?e.value():e,g=v?t.value():t;return i||(i=new Jn),a(h,g,r,o,i)}}return!!p&&(i||(i=new Jn),function(e,t,r,o,a,i){var s=1&r,u=ia(e),l=u.length,c=ia(t),d=c.length;if(l!=d&&!s)return!1;for(var f=l;f--;){var p=u[f];if(!(s?p in t:ze.call(t,p)))return!1}var m=i.get(e),v=i.get(t);if(m&&v)return m==t&&v==e;var h=!0;i.set(e,t),i.set(t,e);for(var g=s;++f<l;){var y=e[p=u[f]],b=t[p];if(o)var w=s?o(b,y,p,t,e,i):o(y,b,p,e,t,i);if(!(w===n?y===b||a(y,b,r,o,i):w)){h=!1;break}g||(g="constructor"==p)}if(h&&!g){var x=e.constructor,_=t.constructor;x!=_&&"constructor"in e&&"constructor"in t&&!("function"==typeof x&&x instanceof x&&"function"==typeof _&&_ instanceof _)&&(h=!1)}return i.delete(e),i.delete(t),h}(e,t,r,o,a,i))}(e,t,r,o,Mr,a))}function jr(e,t,r,o){var a=r.length,i=a,s=!o;if(null==e)return!i;for(e=Pe(e);a--;){var u=r[a];if(s&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++a<i;){var l=(u=r[a])[0],c=e[l],d=u[1];if(s&&u[2]){if(c===n&&!(l in e))return!1}else{var f=new Jn;if(o)var p=o(c,d,l,e,t,f);if(!(p===n?Mr(d,c,3,o,f):p))return!1}}return!0}function Dr(e){return!(!ns(e)||function(e){return!!$e&&$e in e}(e))&&(Zi(e)?Ue:ye).test($a(e))}function qr(e){return"function"==typeof e?e:null==e?au:"object"==typeof e?Wi(e)?Fr(e[0],e[1]):Br(e):mu(e)}function zr(e){if(!Aa(e))return bn(e);var t=[];for(var n in Pe(e))ze.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Lr(e){if(!ns(e))return function(e){var t=[];if(null!=e)for(var n in Pe(e))t.push(n);return t}(e);var t=Aa(e),n=[];for(var r in e)"constructor"==r&&(t||!ze.call(e,r))||n.push(r);return n}function $r(e,t){return e<t}function Vr(e,t){var n=-1,r=Qi(e)?Se(e.length):[];return mr(e,(function(e,o,a){r[++n]=t(e,o,a)})),r}function Br(e){var t=pa(e);return 1==t.length&&t[0][2]?Ca(t[0][0],t[0][1]):function(n){return n===e||jr(n,e,t)}}function Fr(e,t){return Ea(e)&&ka(t)?Ca(La(e),t):function(r){var o=Cs(r,e);return o===n&&o===t?Ps(r,e):Mr(t,o,3)}}function Ur(e,t,r,o,a){e!==t&&wr(t,(function(i,s){if(a||(a=new Jn),ns(i))!function(e,t,r,o,a,i,s){var u=Oa(e,r),l=Oa(t,r),c=s.get(l);if(c)nr(e,r,c);else{var d=i?i(u,l,r+"",e,t,s):n,f=d===n;if(f){var p=Wi(l),m=!p&&Yi(l),v=!p&&!m&&ds(l);d=l,p||m||v?Wi(u)?d=u:Ki(u)?d=To(u):m?(f=!1,d=Ao(l,!0)):v?(f=!1,d=Co(l,!0)):d=[]:is(l)||Gi(l)?(d=u,Gi(u)?d=bs(u):(!ns(u)||Zi(u))&&(d=ba(l))):f=!1}f&&(s.set(l,d),a(d,l,o,i,s),s.delete(l)),nr(e,r,d)}}(e,t,s,r,Ur,o,a);else{var u=o?o(Oa(e,s),i,s+"",e,t,a):n;u===n&&(u=i),nr(e,s,u)}}),Ms)}function Gr(e,t){var r=e.length;if(r)return xa(t+=t<0?r:0,r)?e[t]:n}function Wr(e,t,n){t=t.length?jt(t,(function(e){return Wi(e)?function(t){return Ir(t,1===e.length?e[0]:e)}:e})):[au];var r=-1;return t=jt(t,Zt(da())),function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(Vr(e,(function(e,n,o){return{criteria:jt(t,(function(t){return t(e)})),index:++r,value:e}})),(function(e,t){return function(e,t,n){for(var r=-1,o=e.criteria,a=t.criteria,i=o.length,s=n.length;++r<i;){var u=Po(o[r],a[r]);if(u)return r>=s?u:u*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}))}function Hr(e,t,n){for(var r=-1,o=t.length,a={};++r<o;){var i=t[r],s=Ir(e,i);n(s,i)&&to(a,_o(i,e),s)}return a}function Qr(e,t,n,r){var o=r?Ut:Ft,a=-1,i=t.length,s=e;for(e===t&&(t=To(t)),n&&(s=jt(e,Zt(n)));++a<i;)for(var u=0,l=t[a],c=n?n(l):l;(u=o(s,c,u,r))>-1;)s!==e&&Xe.call(s,u,1),Xe.call(e,u,1);return e}function Kr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==a){var a=o;xa(o)?Xe.call(e,o,1):mo(e,o)}}return e}function Yr(e,t){return e+bt(Sn()*(t-e+1))}function Jr(e,t){var n="";if(!e||t<1||t>f)return n;do{t%2&&(n+=e),(t=bt(t/2))&&(e+=e)}while(t);return n}function Xr(e,t){return Ma(Pa(e,t,au),e+"")}function Zr(e){return Zn(Bs(e))}function eo(e,t){var n=Bs(e);return qa(n,lr(t,0,n.length))}function to(e,t,r,o){if(!ns(e))return e;for(var a=-1,i=(t=_o(t,e)).length,s=i-1,u=e;null!=u&&++a<i;){var l=La(t[a]),c=r;if("__proto__"===l||"constructor"===l||"prototype"===l)return e;if(a!=s){var d=u[l];(c=o?o(d,l,u):n)===n&&(c=ns(d)?d:xa(t[a+1])?[]:{})}rr(u,l,c),u=u[l]}return e}var no=Tn?function(e,t){return Tn.set(e,t),e}:au,ro=ct?function(e,t){return ct(e,"toString",{configurable:!0,enumerable:!1,value:nu(t),writable:!0})}:au;function oo(e){return qa(Bs(e))}function ao(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=Se(o);++r<o;)a[r]=e[r+t];return a}function io(e,t){var n;return mr(e,(function(e,r,o){return!(n=t(e,r,o))})),!!n}function so(e,t,n){var r=0,o=null==e?r:e.length;if("number"==typeof t&&t==t&&o<=h){for(;r<o;){var a=r+o>>>1,i=e[a];null!==i&&!cs(i)&&(n?i<=t:i<t)?r=a+1:o=a}return o}return uo(e,t,au,n)}function uo(e,t,r,o){var a=0,i=null==e?0:e.length;if(0===i)return 0;for(var s=(t=r(t))!=t,u=null===t,l=cs(t),c=t===n;a<i;){var d=bt((a+i)/2),f=r(e[d]),p=f!==n,m=null===f,h=f==f,g=cs(f);if(s)var y=o||h;else y=c?h&&(o||p):u?h&&p&&(o||!m):l?h&&p&&!m&&(o||!g):!m&&!g&&(o?f<=t:f<t);y?a=d+1:i=d}return xn(i,v)}function lo(e,t){for(var n=-1,r=e.length,o=0,a=[];++n<r;){var i=e[n],s=t?t(i):i;if(!n||!Bi(s,u)){var u=s;a[o++]=0===i?0:i}}return a}function co(e){return"number"==typeof e?e:cs(e)?p:+e}function fo(e){if("string"==typeof e)return e;if(Wi(e))return jt(e,fo)+"";if(cs(e))return Vn?Vn.call(e):"";var t=e+"";return"0"==t&&1/e==-d?"-0":t}function po(e,t,n){var r=-1,o=Nt,a=e.length,i=!0,s=[],u=s;if(n)i=!1,o=Mt;else if(a>=200){var l=t?null:Xo(e);if(l)return fn(l);i=!1,o=tn,u=new Yn}else u=t?[]:s;e:for(;++r<a;){var c=e[r],d=t?t(c):c;if(c=n||0!==c?c:0,i&&d==d){for(var f=u.length;f--;)if(u[f]===d)continue e;t&&u.push(d),s.push(c)}else o(u,d,n)||(u!==s&&u.push(d),s.push(c))}return s}function mo(e,t){return null==(e=Ra(e,t=_o(t,e)))||delete e[La(Xa(t))]}function vo(e,t,n,r){return to(e,t,n(Ir(e,t)),r)}function ho(e,t,n,r){for(var o=e.length,a=r?o:-1;(r?a--:++a<o)&&t(e[a],a,e););return n?ao(e,r?0:a,r?a+1:o):ao(e,r?a+1:0,r?o:a)}function go(e,t){var n=e;return n instanceof Wn&&(n=n.value()),qt(t,(function(e,t){return t.func.apply(t.thisArg,Dt([e],t.args))}),n)}function yo(e,t,n){var r=e.length;if(r<2)return r?po(e[0]):[];for(var o=-1,a=Se(r);++o<r;)for(var i=e[o],s=-1;++s<r;)s!=o&&(a[o]=pr(a[o]||i,e[s],t,n));return po(br(a,1),t,n)}function bo(e,t,r){for(var o=-1,a=e.length,i=t.length,s={};++o<a;){var u=o<i?t[o]:n;r(s,e[o],u)}return s}function wo(e){return Ki(e)?e:[]}function xo(e){return"function"==typeof e?e:au}function _o(e,t){return Wi(e)?e:Ea(e,t)?[e]:za(ws(e))}var Eo=Xr;function So(e,t,r){var o=e.length;return r=r===n?o:r,!t&&r>=o?e:ao(e,t,r)}var Io=pt||function(e){return vt.clearTimeout(e)};function Ao(e,t){if(t)return e.slice();var n=e.length,r=Qe?Qe(n):new e.constructor(n);return e.copy(r),r}function ko(e){var t=new e.constructor(e.byteLength);return new He(t).set(new He(e)),t}function Co(e,t){var n=t?ko(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Po(e,t){if(e!==t){var r=e!==n,o=null===e,a=e==e,i=cs(e),s=t!==n,u=null===t,l=t==t,c=cs(t);if(!u&&!c&&!i&&e>t||i&&s&&l&&!u&&!c||o&&s&&l||!r&&l||!a)return 1;if(!o&&!i&&!c&&e<t||c&&r&&a&&!o&&!i||u&&r&&a||!s&&a||!l)return-1}return 0}function Ro(e,t,n,r){for(var o=-1,a=e.length,i=n.length,s=-1,u=t.length,l=wn(a-i,0),c=Se(u+l),d=!r;++s<u;)c[s]=t[s];for(;++o<i;)(d||o<a)&&(c[n[o]]=e[o]);for(;l--;)c[s++]=e[o++];return c}function Oo(e,t,n,r){for(var o=-1,a=e.length,i=-1,s=n.length,u=-1,l=t.length,c=wn(a-s,0),d=Se(c+l),f=!r;++o<c;)d[o]=e[o];for(var p=o;++u<l;)d[p+u]=t[u];for(;++i<s;)(f||o<a)&&(d[p+n[i]]=e[o++]);return d}function To(e,t){var n=-1,r=e.length;for(t||(t=Se(r));++n<r;)t[n]=e[n];return t}function No(e,t,r,o){var a=!r;r||(r={});for(var i=-1,s=t.length;++i<s;){var u=t[i],l=o?o(r[u],e[u],u,r,e):n;l===n&&(l=e[u]),a?sr(r,u,l):rr(r,u,l)}return r}function Mo(e,t){return function(n,r){var o=Wi(n)?Ct:ar,a=t?t():{};return o(n,e,da(r,2),a)}}function jo(e){return Xr((function(t,r){var o=-1,a=r.length,i=a>1?r[a-1]:n,s=a>2?r[2]:n;for(i=e.length>3&&"function"==typeof i?(a--,i):n,s&&_a(r[0],r[1],s)&&(i=a<3?n:i,a=1),t=Pe(t);++o<a;){var u=r[o];u&&e(t,u,o,i)}return t}))}function Do(e,t){return function(n,r){if(null==n)return n;if(!Qi(n))return e(n,r);for(var o=n.length,a=t?o:-1,i=Pe(n);(t?a--:++a<o)&&!1!==r(i[a],a,i););return n}}function qo(e){return function(t,n,r){for(var o=-1,a=Pe(t),i=r(t),s=i.length;s--;){var u=i[e?s:++o];if(!1===n(a[u],u,a))break}return t}}function zo(e){return function(t){var r=un(t=ws(t))?mn(t):n,o=r?r[0]:t.charAt(0),a=r?So(r,1).join(""):t.slice(1);return o[e]()+a}}function Lo(e){return function(t){return qt(Zs(Gs(t).replace(et,"")),e,"")}}function $o(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 n=Fn(e.prototype),r=e.apply(n,t);return ns(r)?r:n}}function Vo(e){return function(t,r,o){var a=Pe(t);if(!Qi(t)){var i=da(r,3);t=Ns(t),r=function(e){return i(a[e],e,a)}}var s=e(t,r,o);return s>-1?a[i?t[s]:s]:n}}function Bo(e){return aa((function(t){var o=t.length,a=o,i=Gn.prototype.thru;for(e&&t.reverse();a--;){var s=t[a];if("function"!=typeof s)throw new Te(r);if(i&&!u&&"wrapper"==la(s))var u=new Gn([],!0)}for(a=u?a:o;++a<o;){var l=la(s=t[a]),c="wrapper"==l?ua(s):n;u=c&&Sa(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?u[la(c[0])].apply(u,c[3]):1==s.length&&Sa(s)?u[l]():u.thru(s)}return function(){var e=arguments,n=e[0];if(u&&1==e.length&&Wi(n))return u.plant(n).value();for(var r=0,a=o?t[r].apply(this,e):n;++r<o;)a=t[r].call(this,a);return a}}))}function Fo(e,t,r,o,a,i,s,u,c,d){var f=t&l,p=1&t,m=2&t,v=24&t,h=512&t,g=m?n:$o(e);return function l(){for(var y=arguments.length,b=Se(y),w=y;w--;)b[w]=arguments[w];if(v)var x=ca(l),_=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(b,x);if(o&&(b=Ro(b,o,a,v)),i&&(b=Oo(b,i,s,v)),y-=_,v&&y<d){var E=dn(b,x);return Yo(e,t,Fo,l.placeholder,r,b,E,u,c,d-y)}var S=p?r:this,I=m?S[e]:e;return y=b.length,u?b=function(e,t){for(var r=e.length,o=xn(t.length,r),a=To(e);o--;){var i=t[o];e[o]=xa(i,r)?a[i]:n}return e}(b,u):h&&y>1&&b.reverse(),f&&c<y&&(b.length=c),this&&this!==vt&&this instanceof l&&(I=g||$o(I)),I.apply(S,b)}}function Uo(e,t){return function(n,r){return function(e,t,n,r){return _r(e,(function(e,o,a){t(r,n(e),o,a)})),r}(n,e,t(r),{})}}function Go(e,t){return function(r,o){var a;if(r===n&&o===n)return t;if(r!==n&&(a=r),o!==n){if(a===n)return o;"string"==typeof r||"string"==typeof o?(r=fo(r),o=fo(o)):(r=co(r),o=co(o)),a=e(r,o)}return a}}function Wo(e){return aa((function(t){return t=jt(t,Zt(da())),Xr((function(n){var r=this;return e(t,(function(e){return kt(e,r,n)}))}))}))}function Ho(e,t){var r=(t=t===n?" ":fo(t)).length;if(r<2)return r?Jr(t,e):t;var o=Jr(t,gt(e/pn(t)));return un(t)?So(mn(o),0,e).join(""):o.slice(0,e)}function Qo(e){return function(t,r,o){return o&&"number"!=typeof o&&_a(t,r,o)&&(r=o=n),t=vs(t),r===n?(r=t,t=0):r=vs(r),function(e,t,n,r){for(var o=-1,a=wn(gt((t-e)/(n||1)),0),i=Se(a);a--;)i[r?a:++o]=e,e+=n;return i}(t,r,o=o===n?t<r?1:-1:vs(o),e)}}function Ko(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=ys(t),n=ys(n)),e(t,n)}}function Yo(e,t,r,o,a,i,l,c,d,f){var p=8&t;t|=p?s:u,4&(t&=~(p?u:s))||(t&=-4);var m=[e,t,a,p?i:n,p?l:n,p?n:i,p?n:l,c,d,f],v=r.apply(n,m);return Sa(e)&&Ta(v,m),v.placeholder=o,ja(v,e,t)}function Jo(e){var t=Ce[e];return function(e,n){if(e=ys(e),(n=null==n?0:xn(hs(n),292))&&Qt(e)){var r=(ws(e)+"e").split("e");return+((r=(ws(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Xo=Pn&&1/fn(new Pn([,-0]))[1]==d?function(e){return new Pn(e)}:cu;function Zo(e){return function(t){var n=ga(t);return n==I?ln(t):n==R?function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}(t):function(e,t){return jt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function ea(e,t,o,d,f,p,m,v){var h=2&t;if(!h&&"function"!=typeof e)throw new Te(r);var g=d?d.length:0;if(g||(t&=-97,d=f=n),m=m===n?m:wn(hs(m),0),v=v===n?v:hs(v),g-=f?f.length:0,t&u){var y=d,b=f;d=f=n}var w=h?n:ua(e),x=[e,t,o,d,f,y,b,p,m,v];if(w&&function(e,t){var n=e[1],r=t[1],o=n|r,i=o<131,s=r==l&&8==n||r==l&&n==c&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!i&&!s)return e;1&r&&(e[2]=t[2],o|=1&n?0:4);var u=t[3];if(u){var d=e[3];e[3]=d?Ro(d,u,t[4]):u,e[4]=d?dn(e[3],a):t[4]}(u=t[5])&&(d=e[5],e[5]=d?Oo(d,u,t[6]):u,e[6]=d?dn(e[5],a):t[6]),(u=t[7])&&(e[7]=u),r&l&&(e[8]=null==e[8]?t[8]:xn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=o}(x,w),e=x[0],t=x[1],o=x[2],d=x[3],f=x[4],!(v=x[9]=x[9]===n?h?0:e.length:wn(x[9]-g,0))&&24&t&&(t&=-25),t&&1!=t)_=8==t||t==i?function(e,t,r){var o=$o(e);return function a(){for(var i=arguments.length,s=Se(i),u=i,l=ca(a);u--;)s[u]=arguments[u];var c=i<3&&s[0]!==l&&s[i-1]!==l?[]:dn(s,l);return(i-=c.length)<r?Yo(e,t,Fo,a.placeholder,n,s,c,n,n,r-i):kt(this&&this!==vt&&this instanceof a?o:e,this,s)}}(e,t,v):t!=s&&33!=t||f.length?Fo.apply(n,x):function(e,t,n,r){var o=1&t,a=$o(e);return function t(){for(var i=-1,s=arguments.length,u=-1,l=r.length,c=Se(l+s),d=this&&this!==vt&&this instanceof t?a:e;++u<l;)c[u]=r[u];for(;s--;)c[u++]=arguments[++i];return kt(d,o?n:this,c)}}(e,t,o,d);else var _=function(e,t,n){var r=1&t,o=$o(e);return function t(){return(this&&this!==vt&&this instanceof t?o:e).apply(r?n:this,arguments)}}(e,t,o);return ja((w?no:Ta)(_,x),e,t)}function ta(e,t,r,o){return e===n||Bi(e,je[r])&&!ze.call(o,r)?t:e}function na(e,t,r,o,a,i){return ns(e)&&ns(t)&&(i.set(t,e),Ur(e,t,n,na,i),i.delete(t)),e}function ra(e){return is(e)?n:e}function oa(e,t,r,o,a,i){var s=1&r,u=e.length,l=t.length;if(u!=l&&!(s&&l>u))return!1;var c=i.get(e),d=i.get(t);if(c&&d)return c==t&&d==e;var f=-1,p=!0,m=2&r?new Yn:n;for(i.set(e,t),i.set(t,e);++f<u;){var v=e[f],h=t[f];if(o)var g=s?o(h,v,f,t,e,i):o(v,h,f,e,t,i);if(g!==n){if(g)continue;p=!1;break}if(m){if(!Lt(t,(function(e,t){if(!tn(m,t)&&(v===e||a(v,e,r,o,i)))return m.push(t)}))){p=!1;break}}else if(v!==h&&!a(v,h,r,o,i)){p=!1;break}}return i.delete(e),i.delete(t),p}function aa(e){return Ma(Pa(e,n,Ha),e+"")}function ia(e){return Ar(e,Ns,va)}function sa(e){return Ar(e,Ms,ha)}var ua=Tn?function(e){return Tn.get(e)}:cu;function la(e){for(var t=e.name+"",n=Nn[t],r=ze.call(Nn,t)?n.length:0;r--;){var o=n[r],a=o.func;if(null==a||a==e)return o.name}return t}function ca(e){return(ze.call(Bn,"placeholder")?Bn:e).placeholder}function da(){var e=Bn.iteratee||iu;return e=e===iu?qr:e,arguments.length?e(arguments[0],arguments[1]):e}function fa(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function pa(e){for(var t=Ns(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,ka(o)]}return t}function ma(e,t){var r=function(e,t){return null==e?n:e[t]}(e,t);return Dr(r)?r:n}var va=wt?function(e){return null==e?[]:(e=Pe(e),Tt(wt(e),(function(t){return Je.call(e,t)})))}:gu,ha=wt?function(e){for(var t=[];e;)Dt(t,va(e)),e=Ke(e);return t}:gu,ga=kr;function ya(e,t,n){for(var r=-1,o=(t=_o(t,e)).length,a=!1;++r<o;){var i=La(t[r]);if(!(a=null!=e&&n(e,i)))break;e=e[i]}return a||++r!=o?a:!!(o=null==e?0:e.length)&&ts(o)&&xa(i,o)&&(Wi(e)||Gi(e))}function ba(e){return"function"!=typeof e.constructor||Aa(e)?{}:Fn(Ke(e))}function wa(e){return Wi(e)||Gi(e)||!!(Ze&&e&&e[Ze])}function xa(e,t){var n=typeof e;return!!(t=t??f)&&("number"==n||"symbol"!=n&&we.test(e))&&e>-1&&e%1==0&&e<t}function _a(e,t,n){if(!ns(n))return!1;var r=typeof t;return!!("number"==r?Qi(n)&&xa(t,n.length):"string"==r&&t in n)&&Bi(n[t],e)}function Ea(e,t){if(Wi(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!cs(e))||ne.test(e)||!te.test(e)||null!=t&&e in Pe(t)}function Sa(e){var t=la(e),n=Bn[t];if("function"!=typeof n||!(t in Wn.prototype))return!1;if(e===n)return!0;var r=ua(n);return!!r&&e===r[0]}(An&&ga(new An(new ArrayBuffer(1)))!=j||kn&&ga(new kn)!=I||Cn&&ga(Cn.resolve())!=C||Pn&&ga(new Pn)!=R||Rn&&ga(new Rn)!=N)&&(ga=function(e){var t=kr(e),r=t==k?e.constructor:n,o=r?$a(r):"";if(o)switch(o){case Mn:return j;case jn:return I;case Dn:return C;case qn:return R;case zn:return N}return t});var Ia=De?Zi:yu;function Aa(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||je)}function ka(e){return e==e&&!ns(e)}function Ca(e,t){return function(r){return null!=r&&r[e]===t&&(t!==n||e in Pe(r))}}function Pa(e,t,r){return t=wn(t===n?e.length-1:t,0),function(){for(var n=arguments,o=-1,a=wn(n.length-t,0),i=Se(a);++o<a;)i[o]=n[t+o];o=-1;for(var s=Se(t+1);++o<t;)s[o]=n[o];return s[t]=r(i),kt(e,this,s)}}function Ra(e,t){return t.length<2?e:Ir(e,ao(t,0,-1))}function Oa(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Ta=Da(no),Na=ht||function(e,t){return vt.setTimeout(e,t)},Ma=Da(ro);function ja(e,t,n){var r=t+"";return Ma(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(ue,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Pt(g,(function(n){var r="_."+n[0];t&n[1]&&!Nt(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(le);return t?t[1].split(ce):[]}(r),n)))}function Da(e){var t=0,r=0;return function(){var o=_n(),a=16-(o-r);if(r=o,a>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(n,arguments)}}function qa(e,t){var r=-1,o=e.length,a=o-1;for(t=t===n?o:t;++r<t;){var i=Yr(r,a),s=e[i];e[i]=e[r],e[r]=s}return e.length=t,e}var za=function(e){var t=Di(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(re,(function(e,n,r,o){t.push(r?o.replace(pe,"$1"):n||e)})),t}));function La(e){if("string"==typeof e||cs(e))return e;var t=e+"";return"0"==t&&1/e==-d?"-0":t}function $a(e){if(null!=e){try{return qe.call(e)}catch{}try{return e+""}catch{}}return""}function Va(e){if(e instanceof Wn)return e.clone();var t=new Gn(e.__wrapped__,e.__chain__);return t.__actions__=To(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Ba=Xr((function(e,t){return Ki(e)?pr(e,br(t,1,Ki,!0)):[]})),Fa=Xr((function(e,t){var r=Xa(t);return Ki(r)&&(r=n),Ki(e)?pr(e,br(t,1,Ki,!0),da(r,2)):[]})),Ua=Xr((function(e,t){var r=Xa(t);return Ki(r)&&(r=n),Ki(e)?pr(e,br(t,1,Ki,!0),n,r):[]}));function Ga(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:hs(n);return o<0&&(o=wn(r+o,0)),Bt(e,da(t,3),o)}function Wa(e,t,r){var o=null==e?0:e.length;if(!o)return-1;var a=o-1;return r!==n&&(a=hs(r),a=r<0?wn(o+a,0):xn(a,o-1)),Bt(e,da(t,3),a,!0)}function Ha(e){return null!=e&&e.length?br(e,1):[]}function Qa(e){return e&&e.length?e[0]:n}var Ka=Xr((function(e){var t=jt(e,wo);return t.length&&t[0]===e[0]?Or(t):[]})),Ya=Xr((function(e){var t=Xa(e),r=jt(e,wo);return t===Xa(r)?t=n:r.pop(),r.length&&r[0]===e[0]?Or(r,da(t,2)):[]})),Ja=Xr((function(e){var t=Xa(e),r=jt(e,wo);return(t="function"==typeof t?t:n)&&r.pop(),r.length&&r[0]===e[0]?Or(r,n,t):[]}));function Xa(e){var t=null==e?0:e.length;return t?e[t-1]:n}var Za=Xr(ei);function ei(e,t){return e&&e.length&&t&&t.length?Qr(e,t):e}var ti=aa((function(e,t){var n=null==e?0:e.length,r=ur(e,t);return Kr(e,jt(t,(function(e){return xa(e,n)?+e:e})).sort(Po)),r}));function ni(e){return null==e?e:In.call(e)}var ri=Xr((function(e){return po(br(e,1,Ki,!0))})),oi=Xr((function(e){var t=Xa(e);return Ki(t)&&(t=n),po(br(e,1,Ki,!0),da(t,2))})),ai=Xr((function(e){var t=Xa(e);return t="function"==typeof t?t:n,po(br(e,1,Ki,!0),n,t)}));function ii(e){if(!e||!e.length)return[];var t=0;return e=Tt(e,(function(e){if(Ki(e))return t=wn(e.length,t),!0})),Jt(t,(function(t){return jt(e,Ht(t))}))}function si(e,t){if(!e||!e.length)return[];var r=ii(e);return null==t?r:jt(r,(function(e){return kt(t,n,e)}))}var ui=Xr((function(e,t){return Ki(e)?pr(e,t):[]})),li=Xr((function(e){return yo(Tt(e,Ki))})),ci=Xr((function(e){var t=Xa(e);return Ki(t)&&(t=n),yo(Tt(e,Ki),da(t,2))})),di=Xr((function(e){var t=Xa(e);return t="function"==typeof t?t:n,yo(Tt(e,Ki),n,t)})),fi=Xr(ii),pi=Xr((function(e){var t=e.length,r=t>1?e[t-1]:n;return r="function"==typeof r?(e.pop(),r):n,si(e,r)}));function mi(e){var t=Bn(e);return t.__chain__=!0,t}function vi(e,t){return t(e)}var hi=aa((function(e){var t=e.length,r=t?e[0]:0,o=this.__wrapped__,a=function(t){return ur(t,e)};return!(t>1||this.__actions__.length)&&o instanceof Wn&&xa(r)?((o=o.slice(r,+r+(t?1:0))).__actions__.push({func:vi,args:[a],thisArg:n}),new Gn(o,this.__chain__).thru((function(e){return t&&!e.length&&e.push(n),e}))):this.thru(a)})),gi=Mo((function(e,t,n){ze.call(e,n)?++e[n]:sr(e,n,1)})),yi=Vo(Ga),bi=Vo(Wa);function wi(e,t){return(Wi(e)?Pt:mr)(e,da(t,3))}function xi(e,t){return(Wi(e)?Rt:vr)(e,da(t,3))}var _i=Mo((function(e,t,n){ze.call(e,n)?e[n].push(t):sr(e,n,[t])})),Ei=Xr((function(e,t,n){var r=-1,o="function"==typeof t,a=Qi(e)?Se(e.length):[];return mr(e,(function(e){a[++r]=o?kt(t,e,n):Tr(e,t,n)})),a})),Si=Mo((function(e,t,n){sr(e,n,t)}));function Ii(e,t){return(Wi(e)?jt:Vr)(e,da(t,3))}var Ai=Mo((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),ki=Xr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&_a(e,t[0],t[1])?t=[]:n>2&&_a(t[0],t[1],t[2])&&(t=[t[0]]),Wr(e,br(t,1),[])})),Ci=mt||function(){return vt.Date.now()};function Pi(e,t,r){return t=r?n:t,t=e&&null==t?e.length:t,ea(e,l,n,n,n,n,t)}function Ri(e,t){var o;if("function"!=typeof t)throw new Te(r);return e=hs(e),function(){return--e>0&&(o=t.apply(this,arguments)),e<=1&&(t=n),o}}var Oi=Xr((function(e,t,n){var r=1;if(n.length){var o=dn(n,ca(Oi));r|=s}return ea(e,r,t,n,o)})),Ti=Xr((function(e,t,n){var r=3;if(n.length){var o=dn(n,ca(Ti));r|=s}return ea(t,r,e,n,o)}));function Ni(e,t,o){var a,i,s,u,l,c,d=0,f=!1,p=!1,m=!0;if("function"!=typeof e)throw new Te(r);function v(t){var r=a,o=i;return a=i=n,d=t,u=e.apply(o,r)}function h(e){var r=e-c;return c===n||r>=t||r<0||p&&e-d>=s}function g(){var e=Ci();if(h(e))return y(e);l=Na(g,function(e){var n=t-(e-c);return p?xn(n,s-(e-d)):n}(e))}function y(e){return l=n,m&&a?v(e):(a=i=n,u)}function b(){var e=Ci(),r=h(e);if(a=arguments,i=this,c=e,r){if(l===n)return function(e){return d=e,l=Na(g,t),f?v(e):u}(c);if(p)return Io(l),l=Na(g,t),v(c)}return l===n&&(l=Na(g,t)),u}return t=ys(t)||0,ns(o)&&(f=!!o.leading,s=(p="maxWait"in o)?wn(ys(o.maxWait)||0,t):s,m="trailing"in o?!!o.trailing:m),b.cancel=function(){l!==n&&Io(l),d=0,a=c=i=l=n},b.flush=function(){return l===n?u:y(Ci())},b}var Mi=Xr((function(e,t){return fr(e,1,t)})),ji=Xr((function(e,t,n){return fr(e,ys(t)||0,n)}));function Di(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Te(r);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var i=e.apply(this,r);return n.cache=a.set(o,i)||a,i};return n.cache=new(Di.Cache||Kn),n}function qi(e){if("function"!=typeof e)throw new Te(r);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)}}Di.Cache=Kn;var zi=Eo((function(e,t){var n=(t=1==t.length&&Wi(t[0])?jt(t[0],Zt(da())):jt(br(t,1),Zt(da()))).length;return Xr((function(r){for(var o=-1,a=xn(r.length,n);++o<a;)r[o]=t[o].call(this,r[o]);return kt(e,this,r)}))})),Li=Xr((function(e,t){var r=dn(t,ca(Li));return ea(e,s,n,t,r)})),$i=Xr((function(e,t){var r=dn(t,ca($i));return ea(e,u,n,t,r)})),Vi=aa((function(e,t){return ea(e,c,n,n,n,t)}));function Bi(e,t){return e===t||e!=e&&t!=t}var Fi=Ko(Cr),Ui=Ko((function(e,t){return e>=t})),Gi=Nr(function(){return arguments}())?Nr:function(e){return rs(e)&&ze.call(e,"callee")&&!Je.call(e,"callee")},Wi=Se.isArray,Hi=xt?Zt(xt):function(e){return rs(e)&&kr(e)==M};function Qi(e){return null!=e&&ts(e.length)&&!Zi(e)}function Ki(e){return rs(e)&&Qi(e)}var Yi=$t||yu,Ji=_t?Zt(_t):function(e){return rs(e)&&kr(e)==x};function Xi(e){if(!rs(e))return!1;var t=kr(e);return t==_||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!is(e)}function Zi(e){if(!ns(e))return!1;var t=kr(e);return t==E||t==S||"[object AsyncFunction]"==t||"[object Proxy]"==t}function es(e){return"number"==typeof e&&e==hs(e)}function ts(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=f}function ns(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function rs(e){return null!=e&&"object"==typeof e}var os=Et?Zt(Et):function(e){return rs(e)&&ga(e)==I};function as(e){return"number"==typeof e||rs(e)&&kr(e)==A}function is(e){if(!rs(e)||kr(e)!=k)return!1;var t=Ke(e);if(null===t)return!0;var n=ze.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&qe.call(n)==Be}var ss=St?Zt(St):function(e){return rs(e)&&kr(e)==P},us=It?Zt(It):function(e){return rs(e)&&ga(e)==R};function ls(e){return"string"==typeof e||!Wi(e)&&rs(e)&&kr(e)==O}function cs(e){return"symbol"==typeof e||rs(e)&&kr(e)==T}var ds=At?Zt(At):function(e){return rs(e)&&ts(e.length)&&!!ut[kr(e)]},fs=Ko($r),ps=Ko((function(e,t){return e<=t}));function ms(e){if(!e)return[];if(Qi(e))return ls(e)?mn(e):To(e);if(nt&&e[nt])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[nt]());var t=ga(e);return(t==I?ln:t==R?fn:Bs)(e)}function vs(e){return e?(e=ys(e))===d||e===-d?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function hs(e){var t=vs(e),n=t%1;return t==t?n?t-n:t:0}function gs(e){return e?lr(hs(e),0,m):0}function ys(e){if("number"==typeof e)return e;if(cs(e))return p;if(ns(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ns(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Xt(e);var n=ge.test(e);return n||be.test(e)?ft(e.slice(2),n?2:8):he.test(e)?p:+e}function bs(e){return No(e,Ms(e))}function ws(e){return null==e?"":fo(e)}var xs=jo((function(e,t){if(Aa(t)||Qi(t))No(t,Ns(t),e);else for(var n in t)ze.call(t,n)&&rr(e,n,t[n])})),_s=jo((function(e,t){No(t,Ms(t),e)})),Es=jo((function(e,t,n,r){No(t,Ms(t),e,r)})),Ss=jo((function(e,t,n,r){No(t,Ns(t),e,r)})),Is=aa(ur),As=Xr((function(e,t){e=Pe(e);var r=-1,o=t.length,a=o>2?t[2]:n;for(a&&_a(t[0],t[1],a)&&(o=1);++r<o;)for(var i=t[r],s=Ms(i),u=-1,l=s.length;++u<l;){var c=s[u],d=e[c];(d===n||Bi(d,je[c])&&!ze.call(e,c))&&(e[c]=i[c])}return e})),ks=Xr((function(e){return e.push(n,na),kt(Ds,n,e)}));function Cs(e,t,r){var o=null==e?n:Ir(e,t);return o===n?r:o}function Ps(e,t){return null!=e&&ya(e,t,Rr)}var Rs=Uo((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ve.call(t)),e[t]=n}),nu(au)),Os=Uo((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ve.call(t)),ze.call(e,t)?e[t].push(n):e[t]=[n]}),da),Ts=Xr(Tr);function Ns(e){return Qi(e)?Xn(e):zr(e)}function Ms(e){return Qi(e)?Xn(e,!0):Lr(e)}var js=jo((function(e,t,n){Ur(e,t,n)})),Ds=jo((function(e,t,n,r){Ur(e,t,n,r)})),qs=aa((function(e,t){var n={};if(null==e)return n;var r=!1;t=jt(t,(function(t){return t=_o(t,e),r||(r=t.length>1),t})),No(e,sa(e),n),r&&(n=cr(n,7,ra));for(var o=t.length;o--;)mo(n,t[o]);return n})),zs=aa((function(e,t){return null==e?{}:function(e,t){return Hr(e,t,(function(t,n){return Ps(e,n)}))}(e,t)}));function Ls(e,t){if(null==e)return{};var n=jt(sa(e),(function(e){return[e]}));return t=da(t),Hr(e,n,(function(e,n){return t(e,n[0])}))}var $s=Zo(Ns),Vs=Zo(Ms);function Bs(e){return null==e?[]:en(e,Ns(e))}var Fs=Lo((function(e,t,n){return t=t.toLowerCase(),e+(n?Us(t):t)}));function Us(e){return Xs(ws(e).toLowerCase())}function Gs(e){return(e=ws(e))&&e.replace(xe,on).replace(tt,"")}var Ws=Lo((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Hs=Lo((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Qs=zo("toLowerCase"),Ks=Lo((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),Ys=Lo((function(e,t,n){return e+(n?" ":"")+Xs(t)})),Js=Lo((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Xs=zo("toUpperCase");function Zs(e,t,r){return e=ws(e),(t=r?n:t)===n?function(e){return at.test(e)}(e)?function(e){return e.match(rt)||[]}(e):function(e){return e.match(de)||[]}(e):e.match(t)||[]}var eu=Xr((function(e,t){try{return kt(e,n,t)}catch(e){return Xi(e)?e:new Ae(e)}})),tu=aa((function(e,t){return Pt(t,(function(t){t=La(t),sr(e,t,Oi(e[t],e))})),e}));function nu(e){return function(){return e}}var ru=Bo(),ou=Bo(!0);function au(e){return e}function iu(e){return qr("function"==typeof e?e:cr(e,1))}var su=Xr((function(e,t){return function(n){return Tr(n,e,t)}})),uu=Xr((function(e,t){return function(n){return Tr(e,n,t)}}));function lu(e,t,n){var r=Ns(t),o=Sr(t,r);null==n&&(!ns(t)||!o.length&&r.length)&&(n=t,t=e,e=this,o=Sr(t,Ns(t)));var a=!(ns(n)&&"chain"in n&&!n.chain),i=Zi(e);return Pt(o,(function(n){var r=t[n];e[n]=r,i&&(e.prototype[n]=function(){var t=this.__chain__;if(a||t){var n=e(this.__wrapped__);return(n.__actions__=To(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Dt([this.value()],arguments))})})),e}function cu(){}var du=Wo(jt),fu=Wo(Ot),pu=Wo(Lt);function mu(e){return Ea(e)?Ht(La(e)):function(e){return function(t){return Ir(t,e)}}(e)}var vu=Qo(),hu=Qo(!0);function gu(){return[]}function yu(){return!1}var bu=Go((function(e,t){return e+t}),0),wu=Jo("ceil"),xu=Go((function(e,t){return e/t}),1),_u=Jo("floor"),Eu=Go((function(e,t){return e*t}),1),Su=Jo("round"),Iu=Go((function(e,t){return e-t}),0);return Bn.after=function(e,t){if("function"!=typeof t)throw new Te(r);return e=hs(e),function(){if(--e<1)return t.apply(this,arguments)}},Bn.ary=Pi,Bn.assign=xs,Bn.assignIn=_s,Bn.assignInWith=Es,Bn.assignWith=Ss,Bn.at=Is,Bn.before=Ri,Bn.bind=Oi,Bn.bindAll=tu,Bn.bindKey=Ti,Bn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Wi(e)?e:[e]},Bn.chain=mi,Bn.chunk=function(e,t,r){t=(r?_a(e,t,r):t===n)?1:wn(hs(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var a=0,i=0,s=Se(gt(o/t));a<o;)s[i++]=ao(e,a,a+=t);return s},Bn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,o=[];++t<n;){var a=e[t];a&&(o[r++]=a)}return o},Bn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=Se(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return Dt(Wi(n)?To(n):[n],br(t,1))},Bn.cond=function(e){var t=null==e?0:e.length,n=da();return e=t?jt(e,(function(e){if("function"!=typeof e[1])throw new Te(r);return[n(e[0]),e[1]]})):[],Xr((function(n){for(var r=-1;++r<t;){var o=e[r];if(kt(o[0],this,n))return kt(o[1],this,n)}}))},Bn.conforms=function(e){return function(e){var t=Ns(e);return function(n){return dr(n,e,t)}}(cr(e,1))},Bn.constant=nu,Bn.countBy=gi,Bn.create=function(e,t){var n=Fn(e);return null==t?n:ir(n,t)},Bn.curry=function e(t,r,o){var a=ea(t,8,n,n,n,n,n,r=o?n:r);return a.placeholder=e.placeholder,a},Bn.curryRight=function e(t,r,o){var a=ea(t,i,n,n,n,n,n,r=o?n:r);return a.placeholder=e.placeholder,a},Bn.debounce=Ni,Bn.defaults=As,Bn.defaultsDeep=ks,Bn.defer=Mi,Bn.delay=ji,Bn.difference=Ba,Bn.differenceBy=Fa,Bn.differenceWith=Ua,Bn.drop=function(e,t,r){var o=null==e?0:e.length;return o?ao(e,(t=r||t===n?1:hs(t))<0?0:t,o):[]},Bn.dropRight=function(e,t,r){var o=null==e?0:e.length;return o?ao(e,0,(t=o-(t=r||t===n?1:hs(t)))<0?0:t):[]},Bn.dropRightWhile=function(e,t){return e&&e.length?ho(e,da(t,3),!0,!0):[]},Bn.dropWhile=function(e,t){return e&&e.length?ho(e,da(t,3),!0):[]},Bn.fill=function(e,t,r,o){var a=null==e?0:e.length;return a?(r&&"number"!=typeof r&&_a(e,t,r)&&(r=0,o=a),function(e,t,r,o){var a=e.length;for((r=hs(r))<0&&(r=-r>a?0:a+r),(o=o===n||o>a?a:hs(o))<0&&(o+=a),o=r>o?0:gs(o);r<o;)e[r++]=t;return e}(e,t,r,o)):[]},Bn.filter=function(e,t){return(Wi(e)?Tt:yr)(e,da(t,3))},Bn.flatMap=function(e,t){return br(Ii(e,t),1)},Bn.flatMapDeep=function(e,t){return br(Ii(e,t),d)},Bn.flatMapDepth=function(e,t,r){return r=r===n?1:hs(r),br(Ii(e,t),r)},Bn.flatten=Ha,Bn.flattenDeep=function(e){return null!=e&&e.length?br(e,d):[]},Bn.flattenDepth=function(e,t){return null!=e&&e.length?br(e,t=t===n?1:hs(t)):[]},Bn.flip=function(e){return ea(e,512)},Bn.flow=ru,Bn.flowRight=ou,Bn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var o=e[t];r[o[0]]=o[1]}return r},Bn.functions=function(e){return null==e?[]:Sr(e,Ns(e))},Bn.functionsIn=function(e){return null==e?[]:Sr(e,Ms(e))},Bn.groupBy=_i,Bn.initial=function(e){return null!=e&&e.length?ao(e,0,-1):[]},Bn.intersection=Ka,Bn.intersectionBy=Ya,Bn.intersectionWith=Ja,Bn.invert=Rs,Bn.invertBy=Os,Bn.invokeMap=Ei,Bn.iteratee=iu,Bn.keyBy=Si,Bn.keys=Ns,Bn.keysIn=Ms,Bn.map=Ii,Bn.mapKeys=function(e,t){var n={};return t=da(t,3),_r(e,(function(e,r,o){sr(n,t(e,r,o),e)})),n},Bn.mapValues=function(e,t){var n={};return t=da(t,3),_r(e,(function(e,r,o){sr(n,r,t(e,r,o))})),n},Bn.matches=function(e){return Br(cr(e,1))},Bn.matchesProperty=function(e,t){return Fr(e,cr(t,1))},Bn.memoize=Di,Bn.merge=js,Bn.mergeWith=Ds,Bn.method=su,Bn.methodOf=uu,Bn.mixin=lu,Bn.negate=qi,Bn.nthArg=function(e){return e=hs(e),Xr((function(t){return Gr(t,e)}))},Bn.omit=qs,Bn.omitBy=function(e,t){return Ls(e,qi(da(t)))},Bn.once=function(e){return Ri(2,e)},Bn.orderBy=function(e,t,r,o){return null==e?[]:(Wi(t)||(t=null==t?[]:[t]),Wi(r=o?n:r)||(r=null==r?[]:[r]),Wr(e,t,r))},Bn.over=du,Bn.overArgs=zi,Bn.overEvery=fu,Bn.overSome=pu,Bn.partial=Li,Bn.partialRight=$i,Bn.partition=Ai,Bn.pick=zs,Bn.pickBy=Ls,Bn.property=mu,Bn.propertyOf=function(e){return function(t){return null==e?n:Ir(e,t)}},Bn.pull=Za,Bn.pullAll=ei,Bn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Qr(e,t,da(n,2)):e},Bn.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?Qr(e,t,n,r):e},Bn.pullAt=ti,Bn.range=vu,Bn.rangeRight=hu,Bn.rearg=Vi,Bn.reject=function(e,t){return(Wi(e)?Tt:yr)(e,qi(da(t,3)))},Bn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,o=[],a=e.length;for(t=da(t,3);++r<a;){var i=e[r];t(i,r,e)&&(n.push(i),o.push(r))}return Kr(e,o),n},Bn.rest=function(e,t){if("function"!=typeof e)throw new Te(r);return Xr(e,t=t===n?t:hs(t))},Bn.reverse=ni,Bn.sampleSize=function(e,t,r){return t=(r?_a(e,t,r):t===n)?1:hs(t),(Wi(e)?er:eo)(e,t)},Bn.set=function(e,t,n){return null==e?e:to(e,t,n)},Bn.setWith=function(e,t,r,o){return o="function"==typeof o?o:n,null==e?e:to(e,t,r,o)},Bn.shuffle=function(e){return(Wi(e)?tr:oo)(e)},Bn.slice=function(e,t,r){var o=null==e?0:e.length;return o?(r&&"number"!=typeof r&&_a(e,t,r)?(t=0,r=o):(t=null==t?0:hs(t),r=r===n?o:hs(r)),ao(e,t,r)):[]},Bn.sortBy=ki,Bn.sortedUniq=function(e){return e&&e.length?lo(e):[]},Bn.sortedUniqBy=function(e,t){return e&&e.length?lo(e,da(t,2)):[]},Bn.split=function(e,t,r){return r&&"number"!=typeof r&&_a(e,t,r)&&(t=r=n),(r=r===n?m:r>>>0)?(e=ws(e))&&("string"==typeof t||null!=t&&!ss(t))&&!(t=fo(t))&&un(e)?So(mn(e),0,r):e.split(t,r):[]},Bn.spread=function(e,t){if("function"!=typeof e)throw new Te(r);return t=null==t?0:wn(hs(t),0),Xr((function(n){var r=n[t],o=So(n,0,t);return r&&Dt(o,r),kt(e,this,o)}))},Bn.tail=function(e){var t=null==e?0:e.length;return t?ao(e,1,t):[]},Bn.take=function(e,t,r){return e&&e.length?ao(e,0,(t=r||t===n?1:hs(t))<0?0:t):[]},Bn.takeRight=function(e,t,r){var o=null==e?0:e.length;return o?ao(e,(t=o-(t=r||t===n?1:hs(t)))<0?0:t,o):[]},Bn.takeRightWhile=function(e,t){return e&&e.length?ho(e,da(t,3),!1,!0):[]},Bn.takeWhile=function(e,t){return e&&e.length?ho(e,da(t,3)):[]},Bn.tap=function(e,t){return t(e),e},Bn.throttle=function(e,t,n){var o=!0,a=!0;if("function"!=typeof e)throw new Te(r);return ns(n)&&(o="leading"in n?!!n.leading:o,a="trailing"in n?!!n.trailing:a),Ni(e,t,{leading:o,maxWait:t,trailing:a})},Bn.thru=vi,Bn.toArray=ms,Bn.toPairs=$s,Bn.toPairsIn=Vs,Bn.toPath=function(e){return Wi(e)?jt(e,La):cs(e)?[e]:To(za(ws(e)))},Bn.toPlainObject=bs,Bn.transform=function(e,t,n){var r=Wi(e),o=r||Yi(e)||ds(e);if(t=da(t,4),null==n){var a=e&&e.constructor;n=o?r?new a:[]:ns(e)&&Zi(a)?Fn(Ke(e)):{}}return(o?Pt:_r)(e,(function(e,r,o){return t(n,e,r,o)})),n},Bn.unary=function(e){return Pi(e,1)},Bn.union=ri,Bn.unionBy=oi,Bn.unionWith=ai,Bn.uniq=function(e){return e&&e.length?po(e):[]},Bn.uniqBy=function(e,t){return e&&e.length?po(e,da(t,2)):[]},Bn.uniqWith=function(e,t){return t="function"==typeof t?t:n,e&&e.length?po(e,n,t):[]},Bn.unset=function(e,t){return null==e||mo(e,t)},Bn.unzip=ii,Bn.unzipWith=si,Bn.update=function(e,t,n){return null==e?e:vo(e,t,xo(n))},Bn.updateWith=function(e,t,r,o){return o="function"==typeof o?o:n,null==e?e:vo(e,t,xo(r),o)},Bn.values=Bs,Bn.valuesIn=function(e){return null==e?[]:en(e,Ms(e))},Bn.without=ui,Bn.words=Zs,Bn.wrap=function(e,t){return Li(xo(t),e)},Bn.xor=li,Bn.xorBy=ci,Bn.xorWith=di,Bn.zip=fi,Bn.zipObject=function(e,t){return bo(e||[],t||[],rr)},Bn.zipObjectDeep=function(e,t){return bo(e||[],t||[],to)},Bn.zipWith=pi,Bn.entries=$s,Bn.entriesIn=Vs,Bn.extend=_s,Bn.extendWith=Es,lu(Bn,Bn),Bn.add=bu,Bn.attempt=eu,Bn.camelCase=Fs,Bn.capitalize=Us,Bn.ceil=wu,Bn.clamp=function(e,t,r){return r===n&&(r=t,t=n),r!==n&&(r=(r=ys(r))==r?r:0),t!==n&&(t=(t=ys(t))==t?t:0),lr(ys(e),t,r)},Bn.clone=function(e){return cr(e,4)},Bn.cloneDeep=function(e){return cr(e,5)},Bn.cloneDeepWith=function(e,t){return cr(e,5,t="function"==typeof t?t:n)},Bn.cloneWith=function(e,t){return cr(e,4,t="function"==typeof t?t:n)},Bn.conformsTo=function(e,t){return null==t||dr(e,t,Ns(t))},Bn.deburr=Gs,Bn.defaultTo=function(e,t){return null==e||e!=e?t:e},Bn.divide=xu,Bn.endsWith=function(e,t,r){e=ws(e),t=fo(t);var o=e.length,a=r=r===n?o:lr(hs(r),0,o);return(r-=t.length)>=0&&e.slice(r,a)==t},Bn.eq=Bi,Bn.escape=function(e){return(e=ws(e))&&J.test(e)?e.replace(K,an):e},Bn.escapeRegExp=function(e){return(e=ws(e))&&ae.test(e)?e.replace(oe,"\\$&"):e},Bn.every=function(e,t,r){var o=Wi(e)?Ot:hr;return r&&_a(e,t,r)&&(t=n),o(e,da(t,3))},Bn.find=yi,Bn.findIndex=Ga,Bn.findKey=function(e,t){return Vt(e,da(t,3),_r)},Bn.findLast=bi,Bn.findLastIndex=Wa,Bn.findLastKey=function(e,t){return Vt(e,da(t,3),Er)},Bn.floor=_u,Bn.forEach=wi,Bn.forEachRight=xi,Bn.forIn=function(e,t){return null==e?e:wr(e,da(t,3),Ms)},Bn.forInRight=function(e,t){return null==e?e:xr(e,da(t,3),Ms)},Bn.forOwn=function(e,t){return e&&_r(e,da(t,3))},Bn.forOwnRight=function(e,t){return e&&Er(e,da(t,3))},Bn.get=Cs,Bn.gt=Fi,Bn.gte=Ui,Bn.has=function(e,t){return null!=e&&ya(e,t,Pr)},Bn.hasIn=Ps,Bn.head=Qa,Bn.identity=au,Bn.includes=function(e,t,n,r){e=Qi(e)?e:Bs(e),n=n&&!r?hs(n):0;var o=e.length;return n<0&&(n=wn(o+n,0)),ls(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&Ft(e,t,n)>-1},Bn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:hs(n);return o<0&&(o=wn(r+o,0)),Ft(e,t,o)},Bn.inRange=function(e,t,r){return t=vs(t),r===n?(r=t,t=0):r=vs(r),function(e,t,n){return e>=xn(t,n)&&e<wn(t,n)}(e=ys(e),t,r)},Bn.invoke=Ts,Bn.isArguments=Gi,Bn.isArray=Wi,Bn.isArrayBuffer=Hi,Bn.isArrayLike=Qi,Bn.isArrayLikeObject=Ki,Bn.isBoolean=function(e){return!0===e||!1===e||rs(e)&&kr(e)==w},Bn.isBuffer=Yi,Bn.isDate=Ji,Bn.isElement=function(e){return rs(e)&&1===e.nodeType&&!is(e)},Bn.isEmpty=function(e){if(null==e)return!0;if(Qi(e)&&(Wi(e)||"string"==typeof e||"function"==typeof e.splice||Yi(e)||ds(e)||Gi(e)))return!e.length;var t=ga(e);if(t==I||t==R)return!e.size;if(Aa(e))return!zr(e).length;for(var n in e)if(ze.call(e,n))return!1;return!0},Bn.isEqual=function(e,t){return Mr(e,t)},Bn.isEqualWith=function(e,t,r){var o=(r="function"==typeof r?r:n)?r(e,t):n;return o===n?Mr(e,t,n,r):!!o},Bn.isError=Xi,Bn.isFinite=function(e){return"number"==typeof e&&Qt(e)},Bn.isFunction=Zi,Bn.isInteger=es,Bn.isLength=ts,Bn.isMap=os,Bn.isMatch=function(e,t){return e===t||jr(e,t,pa(t))},Bn.isMatchWith=function(e,t,r){return r="function"==typeof r?r:n,jr(e,t,pa(t),r)},Bn.isNaN=function(e){return as(e)&&e!=+e},Bn.isNative=function(e){if(Ia(e))throw new Ae("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Dr(e)},Bn.isNil=function(e){return null==e},Bn.isNull=function(e){return null===e},Bn.isNumber=as,Bn.isObject=ns,Bn.isObjectLike=rs,Bn.isPlainObject=is,Bn.isRegExp=ss,Bn.isSafeInteger=function(e){return es(e)&&e>=-f&&e<=f},Bn.isSet=us,Bn.isString=ls,Bn.isSymbol=cs,Bn.isTypedArray=ds,Bn.isUndefined=function(e){return e===n},Bn.isWeakMap=function(e){return rs(e)&&ga(e)==N},Bn.isWeakSet=function(e){return rs(e)&&"[object WeakSet]"==kr(e)},Bn.join=function(e,t){return null==e?"":yn.call(e,t)},Bn.kebabCase=Ws,Bn.last=Xa,Bn.lastIndexOf=function(e,t,r){var o=null==e?0:e.length;if(!o)return-1;var a=o;return r!==n&&(a=(a=hs(r))<0?wn(o+a,0):xn(a,o-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,a):Bt(e,Gt,a,!0)},Bn.lowerCase=Hs,Bn.lowerFirst=Qs,Bn.lt=fs,Bn.lte=ps,Bn.max=function(e){return e&&e.length?gr(e,au,Cr):n},Bn.maxBy=function(e,t){return e&&e.length?gr(e,da(t,2),Cr):n},Bn.mean=function(e){return Wt(e,au)},Bn.meanBy=function(e,t){return Wt(e,da(t,2))},Bn.min=function(e){return e&&e.length?gr(e,au,$r):n},Bn.minBy=function(e,t){return e&&e.length?gr(e,da(t,2),$r):n},Bn.stubArray=gu,Bn.stubFalse=yu,Bn.stubObject=function(){return{}},Bn.stubString=function(){return""},Bn.stubTrue=function(){return!0},Bn.multiply=Eu,Bn.nth=function(e,t){return e&&e.length?Gr(e,hs(t)):n},Bn.noConflict=function(){return vt._===this&&(vt._=Fe),this},Bn.noop=cu,Bn.now=Ci,Bn.pad=function(e,t,n){e=ws(e);var r=(t=hs(t))?pn(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return Ho(bt(o),n)+e+Ho(gt(o),n)},Bn.padEnd=function(e,t,n){e=ws(e);var r=(t=hs(t))?pn(e):0;return t&&r<t?e+Ho(t-r,n):e},Bn.padStart=function(e,t,n){e=ws(e);var r=(t=hs(t))?pn(e):0;return t&&r<t?Ho(t-r,n)+e:e},Bn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),En(ws(e).replace(ie,""),t||0)},Bn.random=function(e,t,r){if(r&&"boolean"!=typeof r&&_a(e,t,r)&&(t=r=n),r===n&&("boolean"==typeof t?(r=t,t=n):"boolean"==typeof e&&(r=e,e=n)),e===n&&t===n?(e=0,t=1):(e=vs(e),t===n?(t=e,e=0):t=vs(t)),e>t){var o=e;e=t,t=o}if(r||e%1||t%1){var a=Sn();return xn(e+a*(t-e+dt("1e-"+((a+"").length-1))),t)}return Yr(e,t)},Bn.reduce=function(e,t,n){var r=Wi(e)?qt:Kt,o=arguments.length<3;return r(e,da(t,4),n,o,mr)},Bn.reduceRight=function(e,t,n){var r=Wi(e)?zt:Kt,o=arguments.length<3;return r(e,da(t,4),n,o,vr)},Bn.repeat=function(e,t,r){return t=(r?_a(e,t,r):t===n)?1:hs(t),Jr(ws(e),t)},Bn.replace=function(){var e=arguments,t=ws(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Bn.result=function(e,t,r){var o=-1,a=(t=_o(t,e)).length;for(a||(a=1,e=n);++o<a;){var i=null==e?n:e[La(t[o])];i===n&&(o=a,i=r),e=Zi(i)?i.call(e):i}return e},Bn.round=Su,Bn.runInContext=e,Bn.sample=function(e){return(Wi(e)?Zn:Zr)(e)},Bn.size=function(e){if(null==e)return 0;if(Qi(e))return ls(e)?pn(e):e.length;var t=ga(e);return t==I||t==R?e.size:zr(e).length},Bn.snakeCase=Ks,Bn.some=function(e,t,r){var o=Wi(e)?Lt:io;return r&&_a(e,t,r)&&(t=n),o(e,da(t,3))},Bn.sortedIndex=function(e,t){return so(e,t)},Bn.sortedIndexBy=function(e,t,n){return uo(e,t,da(n,2))},Bn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=so(e,t);if(r<n&&Bi(e[r],t))return r}return-1},Bn.sortedLastIndex=function(e,t){return so(e,t,!0)},Bn.sortedLastIndexBy=function(e,t,n){return uo(e,t,da(n,2),!0)},Bn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=so(e,t,!0)-1;if(Bi(e[n],t))return n}return-1},Bn.startCase=Ys,Bn.startsWith=function(e,t,n){return e=ws(e),n=null==n?0:lr(hs(n),0,e.length),t=fo(t),e.slice(n,n+t.length)==t},Bn.subtract=Iu,Bn.sum=function(e){return e&&e.length?Yt(e,au):0},Bn.sumBy=function(e,t){return e&&e.length?Yt(e,da(t,2)):0},Bn.template=function(e,t,r){var o=Bn.templateSettings;r&&_a(e,t,r)&&(t=n),e=ws(e),t=Es({},t,o,ta);var a,i,s=Es({},t.imports,o.imports,ta),u=Ns(s),l=en(s,u),c=0,d=t.interpolate||_e,f="__p += '",p=Re((t.escape||_e).source+"|"+d.source+"|"+(d===ee?me:_e).source+"|"+(t.evaluate||_e).source+"|$","g"),m="//# sourceURL="+(ze.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++st+"]")+"\n";e.replace(p,(function(t,n,r,o,s,u){return r||(r=o),f+=e.slice(c,u).replace(Ee,sn),n&&(a=!0,f+="' +\n__e("+n+") +\n'"),s&&(i=!0,f+="';\n"+s+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),c=u+t.length,t})),f+="';\n";var v=ze.call(t,"variable")&&t.variable;if(v){if(fe.test(v))throw new Ae("Invalid `variable` option passed into `_.template`")}else f="with (obj) {\n"+f+"\n}\n";f=(i?f.replace(G,""):f).replace(W,"$1").replace(H,"$1;"),f="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(a?", __e = _.escape":"")+(i?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var h=eu((function(){return ke(u,m+"return "+f).apply(n,l)}));if(h.source=f,Xi(h))throw h;return h},Bn.times=function(e,t){if((e=hs(e))<1||e>f)return[];var n=m,r=xn(e,m);t=da(t),e-=m;for(var o=Jt(r,t);++n<e;)t(n);return o},Bn.toFinite=vs,Bn.toInteger=hs,Bn.toLength=gs,Bn.toLower=function(e){return ws(e).toLowerCase()},Bn.toNumber=ys,Bn.toSafeInteger=function(e){return e?lr(hs(e),-f,f):0===e?e:0},Bn.toString=ws,Bn.toUpper=function(e){return ws(e).toUpperCase()},Bn.trim=function(e,t,r){if((e=ws(e))&&(r||t===n))return Xt(e);if(!e||!(t=fo(t)))return e;var o=mn(e),a=mn(t);return So(o,nn(o,a),rn(o,a)+1).join("")},Bn.trimEnd=function(e,t,r){if((e=ws(e))&&(r||t===n))return e.slice(0,vn(e)+1);if(!e||!(t=fo(t)))return e;var o=mn(e);return So(o,0,rn(o,mn(t))+1).join("")},Bn.trimStart=function(e,t,r){if((e=ws(e))&&(r||t===n))return e.replace(ie,"");if(!e||!(t=fo(t)))return e;var o=mn(e);return So(o,nn(o,mn(t))).join("")},Bn.truncate=function(e,t){var r=30,o="...";if(ns(t)){var a="separator"in t?t.separator:a;r="length"in t?hs(t.length):r,o="omission"in t?fo(t.omission):o}var i=(e=ws(e)).length;if(un(e)){var s=mn(e);i=s.length}if(r>=i)return e;var u=r-pn(o);if(u<1)return o;var l=s?So(s,0,u).join(""):e.slice(0,u);if(a===n)return l+o;if(s&&(u+=l.length-u),ss(a)){if(e.slice(u).search(a)){var c,d=l;for(a.global||(a=Re(a.source,ws(ve.exec(a))+"g")),a.lastIndex=0;c=a.exec(d);)var f=c.index;l=l.slice(0,f===n?u:f)}}else if(e.indexOf(fo(a),u)!=u){var p=l.lastIndexOf(a);p>-1&&(l=l.slice(0,p))}return l+o},Bn.unescape=function(e){return(e=ws(e))&&Y.test(e)?e.replace(Q,hn):e},Bn.uniqueId=function(e){var t=++Le;return ws(e)+t},Bn.upperCase=Js,Bn.upperFirst=Xs,Bn.each=wi,Bn.eachRight=xi,Bn.first=Qa,lu(Bn,function(){var e={};return _r(Bn,(function(t,n){ze.call(Bn.prototype,n)||(e[n]=t)})),e}(),{chain:!1}),Bn.VERSION="4.17.21",Pt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Bn[e].placeholder=Bn})),Pt(["drop","take"],(function(e,t){Wn.prototype[e]=function(r){r=r===n?1:wn(hs(r),0);var o=this.__filtered__&&!t?new Wn(this):this.clone();return o.__filtered__?o.__takeCount__=xn(r,o.__takeCount__):o.__views__.push({size:xn(r,m),type:e+(o.__dir__<0?"Right":"")}),o},Wn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Pt(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Wn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:da(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),Pt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Wn.prototype[e]=function(){return this[n](1).value()[0]}})),Pt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Wn.prototype[e]=function(){return this.__filtered__?new Wn(this):this[n](1)}})),Wn.prototype.compact=function(){return this.filter(au)},Wn.prototype.find=function(e){return this.filter(e).head()},Wn.prototype.findLast=function(e){return this.reverse().find(e)},Wn.prototype.invokeMap=Xr((function(e,t){return"function"==typeof e?new Wn(this):this.map((function(n){return Tr(n,e,t)}))})),Wn.prototype.reject=function(e){return this.filter(qi(da(e)))},Wn.prototype.slice=function(e,t){e=hs(e);var r=this;return r.__filtered__&&(e>0||t<0)?new Wn(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==n&&(r=(t=hs(t))<0?r.dropRight(-t):r.take(t-e)),r)},Wn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Wn.prototype.toArray=function(){return this.take(m)},_r(Wn.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),o=/^(?:head|last)$/.test(t),a=Bn[o?"take"+("last"==t?"Right":""):t],i=o||/^find/.test(t);a&&(Bn.prototype[t]=function(){var t=this.__wrapped__,s=o?[1]:arguments,u=t instanceof Wn,l=s[0],c=u||Wi(t),d=function(e){var t=a.apply(Bn,Dt([e],s));return o&&f?t[0]:t};c&&r&&"function"==typeof l&&1!=l.length&&(u=c=!1);var f=this.__chain__,p=!!this.__actions__.length,m=i&&!f,v=u&&!p;if(!i&&c){t=v?t:new Wn(this);var h=e.apply(t,s);return h.__actions__.push({func:vi,args:[d],thisArg:n}),new Gn(h,f)}return m&&v?e.apply(this,s):(h=this.thru(d),m?o?h.value()[0]:h.value():h)})})),Pt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Ne[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Bn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(Wi(o)?o:[],e)}return this[n]((function(n){return t.apply(Wi(n)?n:[],e)}))}})),_r(Wn.prototype,(function(e,t){var n=Bn[t];if(n){var r=n.name+"";ze.call(Nn,r)||(Nn[r]=[]),Nn[r].push({name:t,func:n})}})),Nn[Fo(n,2).name]=[{name:"wrapper",func:n}],Wn.prototype.clone=function(){var e=new Wn(this.__wrapped__);return e.__actions__=To(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=To(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=To(this.__views__),e},Wn.prototype.reverse=function(){if(this.__filtered__){var e=new Wn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Wn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Wi(e),r=t<0,o=n?e.length:0,a=function(e,t,n){for(var r=-1,o=n.length;++r<o;){var a=n[r],i=a.size;switch(a.type){case"drop":e+=i;break;case"dropRight":t-=i;break;case"take":t=xn(t,e+i);break;case"takeRight":e=wn(e,t-i)}}return{start:e,end:t}}(0,o,this.__views__),i=a.start,s=a.end,u=s-i,l=r?s:i-1,c=this.__iteratees__,d=c.length,f=0,p=xn(u,this.__takeCount__);if(!n||!r&&o==u&&p==u)return go(e,this.__actions__);var m=[];e:for(;u--&&f<p;){for(var v=-1,h=e[l+=t];++v<d;){var g=c[v],y=g.iteratee,b=g.type,w=y(h);if(2==b)h=w;else if(!w){if(1==b)continue e;break e}}m[f++]=h}return m},Bn.prototype.at=hi,Bn.prototype.chain=function(){return mi(this)},Bn.prototype.commit=function(){return new Gn(this.value(),this.__chain__)},Bn.prototype.next=function(){this.__values__===n&&(this.__values__=ms(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?n:this.__values__[this.__index__++]}},Bn.prototype.plant=function(e){for(var t,r=this;r instanceof Un;){var o=Va(r);o.__index__=0,o.__values__=n,t?a.__wrapped__=o:t=o;var a=o;r=r.__wrapped__}return a.__wrapped__=e,t},Bn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Wn){var t=e;return this.__actions__.length&&(t=new Wn(this)),(t=t.reverse()).__actions__.push({func:vi,args:[ni],thisArg:n}),new Gn(t,this.__chain__)}return this.thru(ni)},Bn.prototype.toJSON=Bn.prototype.valueOf=Bn.prototype.value=function(){return go(this.__wrapped__,this.__actions__)},Bn.prototype.first=Bn.prototype.head,nt&&(Bn.prototype[nt]=function(){return this}),Bn}();gt?((gt.exports=gn)._=gn,ht._=gn):vt._=gn}.call(rJ)),ev.exports;var e,t}oJ();const iJ={$user:"/:username","$user-post":"/:username/posts/:postId","$user-event":"/:username/events/:eventId","$user-channel":"/:username/channels/:channelId","$user-media":"/:username/media/:mediaId"},aJ={$group:"/g/:groupname","$group-post":"/g/:groupname/posts/:postId","$group-event":"/g/:groupname/events/:eventId","$group-forum-post":"/g/:groupname/forum/:postId","$group-forum-category":"/g/:groupname/forum/:categorySlug","$group-forum-category-post":"/g/:groupname/forum/:categorySlug/:postId","$group-forum-tag":"/g/:groupname/forum/tag/:tag","$group-channel":"/g/:groupname/:channelname","$group-channel-post":"/g/:groupname/:channelname/posts/:postId","$group-media":"/g/:groupname/media/:mediaId"},sJ={$root:"/",$tag:"/tags/:tag"},uJ=()=>{const e=Z$();if(!e)return;const{platformData:t}=e;return t.apps.flatMap((e=>e.paths.map((n=>({path:n.path,name:e.name,url:`${t.baseUrl}${e.baseUrl}index.html`,build:e.build,buildDate:e.buildDate})))))},lJ={...iJ,...aJ,...sJ},cJ=()=>{var e;const t=(null==(e=uJ())?void 0:e.filter((({path:e})=>e.startsWith("$")&&!e.includes("/")&&!lJ[e])))||[];t.length>0&&ap.warn("Unrecognized routes found:",t)};cJ();const dJ={path:"",history:[],transitionPath:"",confirmLeavePage:null};oo({name:"router",initialState:dJ,reducers:{},extraReducers:e=>{e.addCase(PH,((e,{payload:t})=>{e.confirmLeavePage=t})).addCase(TH,((e,{payload:t})=>{t!==e.transitionPath&&(e.transitionPath=t)})).addCase(AH,((e,{payload:t})=>{t!==e.path&&(e.path=t,e.history.unshift(t))}))},selectors:{selectPath:e=>e.path,selectPreviousRoute:e=>{const t=e.history.indexOf(e.path);return e.history[t+1]},selectTransitionPath:e=>e.transitionPath,selectConfirmLeavePage:e=>e.confirmLeavePage}}).injectInto(L3);const F3="Tabs",[fJ,wZ]=ni(F3,[qm]),B3=qm(),[bZ,oC]=fJ(F3),pJ="TabsList",mJ=v.forwardRef(((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=oC(pJ,n),i=B3(n);return v.createElement(y$,Pe({asChild:!0},i,{orientation:a.orientation,dir:a.dir,loop:r}),v.createElement(lt.div,Pe({role:"tablist","aria-orientation":a.orientation},o,{ref:t})))})),hJ="TabsTrigger",vJ=v.forwardRef(((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,i=oC(hJ,n),s=B3(n),u=j3(i.baseId,r),l=z3(i.baseId,r),c=r===i.value;return v.createElement(w$,Pe({asChild:!0},s,{focusable:!o,active:c}),v.createElement(lt.button,Pe({type:"button",role:"tab","aria-selected":c,"aria-controls":l,"data-state":c?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:u},a,{ref:t,onMouseDown:et(e.onMouseDown,(e=>{o||0!==e.button||!1!==e.ctrlKey?e.preventDefault():i.onValueChange(r)})),onKeyDown:et(e.onKeyDown,(e=>{[" ","Enter"].includes(e.key)&&i.onValueChange(r)})),onFocus:et(e.onFocus,(()=>{const e="manual"!==i.activationMode;!c&&!o&&e&&i.onValueChange(r)}))})))})),gJ="TabsContent",yJ=v.forwardRef(((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...i}=e,s=oC(gJ,n),u=j3(s.baseId,r),l=z3(s.baseId,r),c=r===s.value,d=v.useRef(c);return v.useEffect((()=>{const e=requestAnimationFrame((()=>d.current=!1));return()=>cancelAnimationFrame(e)}),[]),v.createElement(ea,{present:o||c},(({present:n})=>v.createElement(lt.div,Pe({"data-state":c?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":u,hidden:!n,id:l,tabIndex:0},i,{ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0}}),n&&a)))}));function j3(e,t){return`${e}-trigger-${t}`}function z3(e,t){return`${e}-content-${t}`}const V3=mJ,U3=vJ,W3=yJ,wJ=v.forwardRef((({className:e,useDefaults:t=!0,...n},r)=>G.jsx(V3,{ref:r,"data-testid":"tabsList",className:t?_e("inline-flex w-full items-center justify-start gap-s p-none text-muted-foreground","relative after:absolute after:bottom-0 after:left-0 after:h-[1px] after:w-full after:bg-gray-200",e):e,...n})));wJ.displayName=V3.displayName;const bJ=v.forwardRef((({className:e,children:t,isFullWidthTab:n,...r},o)=>G.jsx(U3,{ref:o,asChild:!0,className:e??_e("inline-flex items-center justify-center whitespace-nowrap text-base","z-2 transition-background h-m cursor-pointer focus-visible:outline-none","font-semibold focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50","group relative text-gray-500 hover:[&_svg]:fill-gray-900","after:absolute after:bottom-0 after:left-0 after:z-[1] after:h-0.5 after:w-full data-[state=active]:after:bg-gray-900",{"flex-1":n}),...r,children:t})));bJ.displayName=U3.displayName;const _J=v.forwardRef((({className:e,...t},n)=>G.jsx(W3,{ref:n,className:_e("ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t})));_J.displayName=W3.displayName;const xJ=v.forwardRef((({className:e,...t},n)=>G.jsx("table",{ref:n,className:_e("w-full caption-bottom text-sm",e),...t})));xJ.displayName="Table";const SJ=v.forwardRef((({className:e,...t},n)=>G.jsx("thead",{ref:n,className:_e("[&_tr]:border-b",e),...t})));SJ.displayName="TableHeader";const EJ=v.forwardRef((({className:e,...t},n)=>G.jsx("tbody",{ref:n,className:_e("[&_tr:last-child]:border-0",e),...t})));EJ.displayName="TableBody";const $J=v.forwardRef((({className:e,...t},n)=>G.jsx("tfoot",{ref:n,className:_e("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t})));$J.displayName="TableFooter";const CJ=v.forwardRef((({className:e,...t},n)=>G.jsx("tr",{ref:n,className:_e("border-b bg-background transition-colors hover:bg-gray-100 data-[state=selected]:bg-gray-200 dark:hover:bg-muted dark:data-[state=selected]:bg-muted","[&:hover_button[data-disabled]]:!bg-gray-200 [&:hover_button[disabled]]:!bg-gray-200",e),...t})));CJ.displayName="TableRow";const IJ=v.forwardRef((({className:e,...t},n)=>G.jsx("th",{ref:n,className:_e("h-14 bg-inherit px-xs py-xxs text-left align-middle font-normal text-muted-foreground","whitespace-nowrap text-sm text-gray-500",e),...t})));IJ.displayName="TableHead";const RJ=v.forwardRef((({className:e,...t},n)=>G.jsx("td",{ref:n,className:_e("h-14 bg-inherit p-xs py-xxs align-middle","overflow-hidden truncate text-ellipsis text-base text-gray-700",e),...t})));RJ.displayName="TableCell";const PJ=v.forwardRef((({className:e,...t},n)=>G.jsx("caption",{ref:n,className:_e("mt-s text-sm text-muted-foreground",e),...t})));PJ.displayName="TableCaption";const TJ=(e,t)=>_e("flex w-full rounded-m px-s py-xs text-base text-gray-900 outline outline-1 outline-input ring-offset-background transition-all duration-200 ease-in-out placeholder:inherit placeholder:text-gray-400 placeholder:text-muted-foreground hover:outline-2 hover:outline-gray-400 focus-visible:bg-gray-50 focus-visible:text-gray-900 focus-visible:outline-2 focus-visible:outline-blue_120 disabled:cursor-not-allowed disabled:select-none disabled:text-gray-300 disabled:outline-gray-200",{"bg-red_30_17 outline-red-dark":!!e},t),OJ=v.forwardRef((({className:e,...t},n)=>{const{error:r}=bd();return G.jsx("textarea",{className:TJ(!!r,e),ref:n,...t})}));OJ.displayName="Textarea";const AJ=v.createContext(void 0),MJ=()=>{const e=v.useContext(AJ);if(!e)throw new Error("useColorPicker must be used within a ColorPickerProvider");return e},DJ=v.memo((({className:e,...t})=>{const n=v.useRef(null),[r,o]=v.useState(!1),[a,i]=v.useState(0),[s,u]=v.useState(0),{hue:l,saturation:c,lightness:d,setSaturation:f,setLightness:p}=MJ(),m=v.useMemo((()=>`linear-gradient(0deg, rgba(0,0,0,1), rgba(0,0,0,0)),\n linear-gradient(90deg, rgba(255,255,255,1), rgba(255,255,255,0)),\n hsl(${l}, 100%, 50%)`),[l]);v.useEffect((()=>{if(!r){const e=c/100,t=e<.01?100:50+50*(1-e),n=t>0?1-d/t:0;i(Math.max(0,Math.min(1,e))),u(Math.max(0,Math.min(1,n)))}}),[c,d,r]);const h=v.useCallback(((e,t)=>{if(!n.current)return;const r=n.current.getBoundingClientRect(),o=Math.max(0,Math.min(1,(e-r.left)/r.width)),a=Math.max(0,Math.min(1,(t-r.top)/r.height));i(o),u(a),f(100*o);p((o<.01?100:50+50*(1-o))*(1-a))}),[f,p]),g=v.useCallback((e=>{r&&h(e.clientX,e.clientY)}),[r,h]);return v.useEffect((()=>{const e=()=>o(!1);return r&&(window.addEventListener("pointermove",g),window.addEventListener("pointerup",e)),()=>{window.removeEventListener("pointermove",g),window.removeEventListener("pointerup",e)}}),[r,g]),G.jsx("div",{className:_e("relative size-full cursor-crosshair rounded",e),onPointerDown:e=>{e.preventDefault(),o(!0),h(e.clientX,e.clientY)},ref:n,style:{background:m},...t,children:G.jsx("div",{className:"pointer-events-none absolute h-4 w-4 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white",style:{left:100*a+"%",top:100*s+"%",boxShadow:"0 0 0 1px rgba(0,0,0,0.5)"}})})}));DJ.displayName="ColorPickerSelection";const NJ=gu("z-tooltip animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 relative data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",{variants:{size:{default:"rounded-md text-sm px-3 py-1.5",small:"rounded-sm p-xxs text-sm"},theme:{default:"bg-popover text-popover-foreground",dark:"bg-gray-800 text-gray-50 [&_svg]:fill-gray-700"},defaultVariants:{size:"small",theme:"dark"}}}),kJ=v.forwardRef((({className:e,sideOffset:t=1,size:n,theme:r,children:o,isPortal:a=!0,withArrow:i=!0,...s},u)=>{const l=G.jsx(G.Fragment,{children:G.jsxs(qk,{ref:u,sideOffset:t,className:_e(NJ({size:n,theme:r,className:e})),...s,children:[o,i&&G.jsxs(G.Fragment,{children:[G.jsx($H,{height:4,width:8}),G.jsx("div",{className:"absolute bottom-0 left-0 h-full w-full rounded-sm border border-gray-700"})]})]})});return a?G.jsx(EH,{children:l}):l}));kJ.displayName=qk.displayName;var k2,qg={exports:{}},LJ=qg.exports;function FJ(){return k2||(k2=1,qg.exports=function(){var e=1e3,t=6e4,n=36e5,r="millisecond",o="second",a="minute",i="hour",s="day",u="week",l="month",c="quarter",d="year",f="date",p="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|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,h={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(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}},g=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},y={s:g,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),o=n%60;return(t<=0?"+":"-")+g(r,2,"0")+":"+g(o,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),o=t.clone().add(r,l),a=n-o<0,i=t.clone().add(r+(a?-1:1),l);return+(-(r+(n-o)/(a?o-i:i-o))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:d,w:u,d:s,D:f,h:i,m:a,s:o,ms:r,Q:c}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},b="en",w={};w[b]=h;var x="$isDayjsObject",_=function(e){return e instanceof A||!(!e||!e[x])},E=function e(t,n,r){var o;if(!t)return b;if("string"==typeof t){var a=t.toLowerCase();w[a]&&(o=a),n&&(w[a]=n,o=a);var i=t.split("-");if(!o&&i.length>1)return e(i[0])}else{var s=t.name;w[s]=t,o=s}return!r&&o&&(b=o),o||!r&&b},S=function(e,t){if(_(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new A(n)},I=y;I.l=E,I.i=_,I.w=function(e,t){return S(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var A=function(){function h(e){this.$L=E(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var g=h.prototype;return g.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(I.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(m);if(r){var o=r[2]-1||0,a=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},g.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},g.$utils=function(){return I},g.isValid=function(){return this.$d.toString()!==p},g.isSame=function(e,t){var n=S(e);return this.startOf(t)<=n&&n<=this.endOf(t)},g.isAfter=function(e,t){return S(e)<this.startOf(t)},g.isBefore=function(e,t){return this.endOf(t)<S(e)},g.$g=function(e,t,n){return I.u(e)?this[t]:this.set(n,e)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(e,t){var n=this,r=!!I.u(t)||t,c=I.p(e),p=function(e,t){var o=I.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?o:o.endOf(s)},m=function(e,t){return I.w(n.toDate()[e].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},v=this.$W,h=this.$M,g=this.$D,y="set"+(this.$u?"UTC":"");switch(c){case d:return r?p(1,0):p(31,11);case l:return r?p(1,h):p(0,h+1);case u:var b=this.$locale().weekStart||0,w=(v<b?v+7:v)-b;return p(r?g-w:g+(6-w),h);case s:case f:return m(y+"Hours",0);case i:return m(y+"Minutes",1);case a:return m(y+"Seconds",2);case o:return m(y+"Milliseconds",3);default:return this.clone()}},g.endOf=function(e){return this.startOf(e,!1)},g.$set=function(e,t){var n,u=I.p(e),c="set"+(this.$u?"UTC":""),p=(n={},n[s]=c+"Date",n[f]=c+"Date",n[l]=c+"Month",n[d]=c+"FullYear",n[i]=c+"Hours",n[a]=c+"Minutes",n[o]=c+"Seconds",n[r]=c+"Milliseconds",n)[u],m=u===s?this.$D+(t-this.$W):t;if(u===l||u===d){var v=this.clone().set(f,1);v.$d[p](m),v.init(),this.$d=v.set(f,Math.min(this.$D,v.daysInMonth())).$d}else p&&this.$d[p](m);return this.init(),this},g.set=function(e,t){return this.clone().$set(e,t)},g.get=function(e){return this[I.p(e)]()},g.add=function(r,c){var f,p=this;r=Number(r);var m=I.p(c),v=function(e){var t=S(p);return I.w(t.date(t.date()+Math.round(e*r)),p)};if(m===l)return this.set(l,this.$M+r);if(m===d)return this.set(d,this.$y+r);if(m===s)return v(1);if(m===u)return v(7);var h=(f={},f[a]=t,f[i]=n,f[o]=e,f)[m]||1,g=this.$d.getTime()+r*h;return I.w(g,this)},g.subtract=function(e,t){return this.add(-1*e,t)},g.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=e||"YYYY-MM-DDTHH:mm:ssZ",o=I.z(this),a=this.$H,i=this.$m,s=this.$M,u=n.weekdays,l=n.months,c=n.meridiem,d=function(e,n,o,a){return e&&(e[n]||e(t,r))||o[n].slice(0,a)},f=function(e){return I.s(a%12||12,e,"0")},m=c||function(e,t,n){var r=e<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(v,(function(e,r){return r||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return I.s(t.$y,4,"0");case"M":return s+1;case"MM":return I.s(s+1,2,"0");case"MMM":return d(n.monthsShort,s,l,3);case"MMMM":return d(l,s);case"D":return t.$D;case"DD":return I.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return d(n.weekdaysMin,t.$W,u,2);case"ddd":return d(n.weekdaysShort,t.$W,u,3);case"dddd":return u[t.$W];case"H":return String(a);case"HH":return I.s(a,2,"0");case"h":return f(1);case"hh":return f(2);case"a":return m(a,i,!0);case"A":return m(a,i,!1);case"m":return String(i);case"mm":return I.s(i,2,"0");case"s":return String(t.$s);case"ss":return I.s(t.$s,2,"0");case"SSS":return I.s(t.$ms,3,"0");case"Z":return o}return null}(e)||o.replace(":","")}))},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(r,f,p){var m,v=this,h=I.p(f),g=S(r),y=(g.utcOffset()-this.utcOffset())*t,b=this-g,w=function(){return I.m(v,g)};switch(h){case d:m=w()/12;break;case l:m=w();break;case c:m=w()/3;break;case u:m=(b-y)/6048e5;break;case s:m=(b-y)/864e5;break;case i:m=b/n;break;case a:m=b/t;break;case o:m=b/e;break;default:m=b}return p?m:I.a(m)},g.daysInMonth=function(){return this.endOf(l).$D},g.$locale=function(){return w[this.$L]},g.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=E(e,t,!0);return r&&(n.$L=r),n},g.clone=function(){return I.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},h}(),k=A.prototype;return S.prototype=k,[["$ms",r],["$s",o],["$m",a],["$H",i],["$W",s],["$M",l],["$y",d],["$D",f]].forEach((function(e){k[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),S.extend=function(e,t){return e.$i||(e(t,A,S),e.$i=!0),S},S.locale=E,S.isDayjs=_,S.unix=function(e){return S(1e3*e)},S.en=w[b],S.Ls=w,S.p={},S}()),qg.exports}FJ();const uE="horizontal",BJ=["horizontal","vertical"],iC=v.forwardRef(((e,t)=>{const{decorative:n,orientation:r=uE,...o}=e,a=q3(r)?r:uE,i=n?{role:"none"}:{"aria-orientation":"vertical"===a?a:void 0,role:"separator"};return v.createElement(lt.div,Pe({"data-orientation":a},i,o,{ref:t}))}));function jJ(e,t){return`Invalid prop \`orientation\` of value \`${e}\` supplied to \`${t}\`, expected one of:\n - horizontal\n - vertical\n\nDefaulting to \`${uE}\`.`}function q3(e){return BJ.includes(e)}iC.propTypes={orientation(e,t,n){const r=e[t],o=String(r);return r&&!q3(r)?new Error(jJ(o,n)):null}};const zJ=gu("\n shrink-0 bg-gray-200\n data-[orientation=horizontal]:h-px data-[orientation=horizontal]:my-xxs\n data-[orientation=vertical]:w-px data-[orientation=vertical]:mx-xxs\n ",{variants:{size:{xs:"data-[orientation=horizontal]:w-4 data-[orientation=vertical]:h-4",s:"data-[orientation=horizontal]:w-6 data-[orientation=vertical]:h-6",m:"data-[orientation=horizontal]:w-8 data-[orientation=vertical]:h-8",l:"data-[orientation=horizontal]:w-10 data-[orientation=vertical]:h-10"}},defaultVariants:{size:"s"}}),VJ=v.forwardRef((({className:e,size:t,...n},r)=>G.jsx(iC,{ref:r,className:_e(zJ({size:t,className:e})),...n})));VJ.displayName=iC.displayName;const UJ="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI3BhaW50MF9hbmd1bGFyXzExMTY1XzE4NjcxX2NsaXBfcGF0aCkiIGRhdGEtZmlnbWEtc2tpcC1wYXJzZT0idHJ1ZSI+PGcgdHJhbnNmb3JtPSJtYXRyaXgoMCAwLjAxMiAtMC4wMTIgMCAxMiAxMikiPjxmb3JlaWduT2JqZWN0IHg9Ii0xMDY2LjI0IiB5PSItMTA2Ni4yNCIgd2lkdGg9IjIxMzIuNDkiIGhlaWdodD0iMjEzMi40OSI+PGRpdiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94aHRtbCIgc3R5bGU9ImJhY2tncm91bmQ6Y29uaWMtZ3JhZGllbnQoZnJvbSA5MGRlZyxyZ2JhKDI1NSwgMjU1LCAyNTUsIDEpIDBkZWcscmdiYSgyNTUsIDI1NSwgMjU1LCAxKSA2My4yNDNkZWcscmdiYSgyNTUsIDI1NSwgMjU1LCAwKSAzNjBkZWcpO2hlaWdodDoxMDAlO3dpZHRoOjEwMCU7b3BhY2l0eToxIj48L2Rpdj48L2ZvcmVpZ25PYmplY3Q+PC9nPjwvZz48cGF0aCBkPSJNMjQgMTJDMjQgMTguNjI3NCAxOC42Mjc0IDI0IDEyIDI0QzUuMzcyNTggMjQgMCAxOC42Mjc0IDAgMTJDMCA1LjM3MjU4IDUuMzcyNTggMCAxMiAwQzE4LjYyNzQgMCAyNCA1LjM3MjU4IDI0IDEyWk0zLjU4ODMyIDEyQzMuNTg4MzIgMTYuNjQ1NiA3LjM1NDM2IDIwLjQxMTcgMTIgMjAuNDExN0MxNi42NDU2IDIwLjQxMTcgMjAuNDExNyAxNi42NDU2IDIwLjQxMTcgMTJDMjAuNDExNyA3LjM1NDM2IDE2LjY0NTYgMy41ODgzMiAxMiAzLjU4ODMyQzcuMzU0MzYgMy41ODgzMiAzLjU4ODMyIDcuMzU0MzYgMy41ODgzMiAxMloiIGRhdGEtZmlnbWEtZ3JhZGllbnQtZmlsbD0ieyYjMzQ7dHlwZSYjMzQ7OiYjMzQ7R1JBRElFTlRfQU5HVUxBUiYjMzQ7LCYjMzQ7c3RvcHMmIzM0OzpbeyYjMzQ7Y29sb3ImIzM0Ozp7JiMzNDtyJiMzNDs6MS4wLCYjMzQ7ZyYjMzQ7OjEuMCwmIzM0O2ImIzM0OzoxLjAsJiMzNDthJiMzNDs6MS4wfSwmIzM0O3Bvc2l0aW9uJiMzNDs6MC4wfSx7JiMzNDtjb2xvciYjMzQ7OnsmIzM0O3ImIzM0OzoxLjAsJiMzNDtnJiMzNDs6MS4wLCYjMzQ7YiYjMzQ7OjEuMCwmIzM0O2EmIzM0OzoxLjB9LCYjMzQ7cG9zaXRpb24mIzM0OzowLjE3NTY3NTAwNDcyMDY4Nzg3fSx7JiMzNDtjb2xvciYjMzQ7OnsmIzM0O3ImIzM0OzoxLjAsJiMzNDtnJiMzNDs6MS4wLCYjMzQ7YiYjMzQ7OjEuMCwmIzM0O2EmIzM0OzowLjB9LCYjMzQ7cG9zaXRpb24mIzM0OzoxLjB9XSwmIzM0O3N0b3BzVmFyJiMzNDs6W3smIzM0O2NvbG9yJiMzNDs6eyYjMzQ7ciYjMzQ7OjEuMCwmIzM0O2cmIzM0OzoxLjAsJiMzNDtiJiMzNDs6MS4wLCYjMzQ7YSYjMzQ7OjEuMH0sJiMzNDtwb3NpdGlvbiYjMzQ7OjAuMH0seyYjMzQ7Y29sb3ImIzM0Ozp7JiMzNDtyJiMzNDs6MS4wLCYjMzQ7ZyYjMzQ7OjEuMCwmIzM0O2ImIzM0OzoxLjAsJiMzNDthJiMzNDs6MS4wfSwmIzM0O3Bvc2l0aW9uJiMzNDs6MC4xNzU2NzUwMDQ3MjA2ODc4N30seyYjMzQ7Y29sb3ImIzM0Ozp7JiMzNDtyJiMzNDs6MS4wLCYjMzQ7ZyYjMzQ7OjEuMCwmIzM0O2ImIzM0OzoxLjAsJiMzNDthJiMzNDs6MC4wfSwmIzM0O3Bvc2l0aW9uJiMzNDs6MS4wfV0sJiMzNDt0cmFuc2Zvcm0mIzM0Ozp7JiMzNDttMDAmIzM0OzoxLjQ2OTU3NjIyMzEwMjIwMTRlLTE1LCYjMzQ7bTAxJiMzNDs6LTI0LjAsJiMzNDttMDImIzM0OzoyNC4wLCYjMzQ7bTEwJiMzNDs6MjQuMCwmIzM0O20xMSYjMzQ7OjEuNDY5NTc2MjIzMTAyMjAxNGUtMTUsJiMzNDttMTImIzM0OzotMS40Njk1NzYyMjMxMDIyMDE0ZS0xNX0sJiMzNDtvcGFjaXR5JiMzNDs6MS4wLCYjMzQ7YmxlbmRNb2RlJiMzNDs6JiMzNDtOT1JNQUwmIzM0OywmIzM0O3Zpc2libGUmIzM0Ozp0cnVlfSIvPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJwYWludDBfYW5ndWxhcl8xMTE2NV8xODY3MV9jbGlwX3BhdGgiPjxwYXRoIGQ9Ik0yNCAxMkMyNCAxOC42Mjc0IDE4LjYyNzQgMjQgMTIgMjRDNS4zNzI1OCAyNCAwIDE4LjYyNzQgMCAxMkMwIDUuMzcyNTggNS4zNzI1OCAwIDEyIDBDMTguNjI3NCAwIDI0IDUuMzcyNTggMjQgMTJaTTMuNTg4MzIgMTJDMy41ODgzMiAxNi42NDU2IDcuMzU0MzYgMjAuNDExNyAxMiAyMC40MTE3QzE2LjY0NTYgMjAuNDExNyAyMC40MTE3IDE2LjY0NTYgMjAuNDExNyAxMkMyMC40MTE3IDcuMzU0MzYgMTYuNjQ1NiAzLjU4ODMyIDEyIDMuNTg4MzJDNy4zNTQzNiAzLjU4ODMyIDMuNTg4MzIgNy4zNTQzNiAzLjU4ODMyIDEyWiIvPjwvY2xpcFBhdGg+PC9kZWZzPgo8L3N2Zz4K",WJ=e=>{switch(!0){case"success"===e:return G.jsx(F5,{color:"white"});case"error"===e:return G.jsx(yE,{color:"white"});case"loading"===e:return G.jsx("img",{src:UJ,className:"animate-forward animate-spin [animation-direction:reverse]"});default:return null}},qJ={toastsSizes:{}},G3=oo({name:"systemToast",initialState:qJ,reducers:{addToastSize(e,t){const{id:n,size:r}=t.payload;e.toastsSizes[n]=r},removeToastSize(e,t){delete e.toastsSizes[t.payload]}},selectors:{selectToastSize:e=>Math.max(0,...Object.values(e.toastsSizes))}}).injectInto(L3),{addToastSize:GJ,removeToastSize:HJ}=G3.actions,{selectToastSize:KJ}=G3.selectors,YJ=e=>{const{title:t,actionButton:n,id:r,type:o,promise:a,dismiss:i}=e,s=vE(),u=vy(KJ),[l,c]=v.useState(o),[d,f]=v.useState("loading"===o),p=v.useRef(null),m=WJ(d?"loading":l);v.useEffect((()=>{var e;s(GJ({id:`${r}`,size:(null==(e=p.current)?void 0:e.offsetWidth)??0}))}),[d]),v.useEffect((()=>()=>{s(HJ(`${r}`))}),[]),v.useEffect((()=>{if(!a)return;let e=!1;return f(!0),a.then((()=>c("success"))).catch((()=>c("error"))).finally((()=>{e||f(!1)})),()=>{e=!0}}),[a]);return G.jsxs("div",{ref:p,onClick:()=>{n||i(r)},style:{minWidth:u},"data-testid":"toast-container",className:_e("gap-xs px-xs flex min-h-[56px] w-full items-center rounded-lg bg-gray-800",{"bg-red-dark":"error"===l,"border border-gray-700":"success"===l,"cursor-pointer":!n}),children:[m,G.jsx("p",{dangerouslySetInnerHTML:{__html:t},className:"text-base font-medium text-white"}),n&&G.jsx("button",{className:"h-s px-xs rounded-sm bg-gray-500 text-sm",onClick:()=>{n.onClick(),i(r)},children:n.label})]})},vS=(e,t)=>RS.custom((n=>G.jsx(YJ,{id:n,dismiss:RS.dismiss,...e,actionButton:null==t?void 0:t.actionButton})),{dismissible:!0,duration:S5(e),toasterId:"system-bottom-toaster",...t}),gS={success:(e,t)=>vS({type:"success",title:e},t),error:(e,t)=>vS({type:"error",title:e},t),loading:(e,t)=>vS({type:"loading",title:e},t),dismiss:e=>RS.dismiss(e)};function _Z(){const e=vE(),t=v.useRef(null);function n(){t.current&&(gS.dismiss(t.current),t.current=null)}u2("online",(()=>{e(Kg.actions.setOnline(!0)),n(),t.current=gS.success("Connection restored")})),u2("offline",(()=>{e(Kg.actions.setOnline(!1)),n(),t.current=gS.error("Your network is unavailable")}))}const xZ=()=>vy(Kg.selectors.selectOnline);export{Kg as networkSlice,xZ as useIsOnline,_Z as useNetworkStatusListener};
96
+ */function oJ(){return NO||(NO=1,e=ev,t=ev.exports,function(){var n,r="Expected a function",o="__lodash_hash_undefined__",a="__lodash_placeholder__",i=16,s=32,u=64,l=128,c=256,d=1/0,f=9007199254740991,p=NaN,m=4294967295,v=m-1,h=m>>>1,g=[["ary",l],["bind",1],["bindKey",2],["curry",8],["curryRight",i],["flip",512],["partial",s],["partialRight",u],["rearg",c]],y="[object Arguments]",b="[object Array]",w="[object Boolean]",x="[object Date]",_="[object Error]",E="[object Function]",S="[object GeneratorFunction]",I="[object Map]",A="[object Number]",k="[object Object]",C="[object Promise]",P="[object RegExp]",R="[object Set]",O="[object String]",T="[object Symbol]",N="[object WeakMap]",M="[object ArrayBuffer]",j="[object DataView]",D="[object Float32Array]",q="[object Float64Array]",z="[object Int8Array]",L="[object Int16Array]",$="[object Int32Array]",V="[object Uint8Array]",B="[object Uint8ClampedArray]",F="[object Uint16Array]",U="[object Uint32Array]",G=/\b__p \+= '';/g,W=/\b(__p \+=) '' \+/g,H=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Q=/&(?:amp|lt|gt|quot|#39);/g,K=/[&<>"']/g,Y=RegExp(Q.source),J=RegExp(K.source),X=/<%-([\s\S]+?)%>/g,Z=/<%([\s\S]+?)%>/g,ee=/<%=([\s\S]+?)%>/g,te=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ne=/^\w*$/,re=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,oe=/[\\^$.*+?()[\]{}|]/g,ae=RegExp(oe.source),ie=/^\s+/,se=/\s/,ue=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,le=/\{\n\/\* \[wrapped with (.+)\] \*/,ce=/,? & /,de=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,fe=/[()=,{}\[\]\/\s]/,pe=/\\(\\)?/g,me=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ve=/\w*$/,he=/^[-+]0x[0-9a-f]+$/i,ge=/^0b[01]+$/i,ye=/^\[object .+?Constructor\]$/,be=/^0o[0-7]+$/i,we=/^(?:0|[1-9]\d*)$/,xe=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,_e=/($^)/,Ee=/['\n\r\u2028\u2029\\]/g,Se="\\ud800-\\udfff",Ie="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ae="\\u2700-\\u27bf",ke="a-z\\xdf-\\xf6\\xf8-\\xff",Ce="A-Z\\xc0-\\xd6\\xd8-\\xde",Pe="\\ufe0e\\ufe0f",Re="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\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",Oe="['’]",Te="["+Se+"]",Ne="["+Re+"]",Me="["+Ie+"]",je="\\d+",De="["+Ae+"]",qe="["+ke+"]",ze="[^"+Se+Re+je+Ae+ke+Ce+"]",Le="\\ud83c[\\udffb-\\udfff]",$e="[^"+Se+"]",Ve="(?:\\ud83c[\\udde6-\\uddff]){2}",Be="[\\ud800-\\udbff][\\udc00-\\udfff]",Fe="["+Ce+"]",Ue="\\u200d",Ge="(?:"+qe+"|"+ze+")",We="(?:"+Fe+"|"+ze+")",He="(?:['’](?:d|ll|m|re|s|t|ve))?",Qe="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ke="(?:"+Me+"|"+Le+")?",Ye="["+Pe+"]?",Je=Ye+Ke+"(?:"+Ue+"(?:"+[$e,Ve,Be].join("|")+")"+Ye+Ke+")*",Xe="(?:"+[De,Ve,Be].join("|")+")"+Je,Ze="(?:"+[$e+Me+"?",Me,Ve,Be,Te].join("|")+")",et=RegExp(Oe,"g"),tt=RegExp(Me,"g"),nt=RegExp(Le+"(?="+Le+")|"+Ze+Je,"g"),rt=RegExp([Fe+"?"+qe+"+"+He+"(?="+[Ne,Fe,"$"].join("|")+")",We+"+"+Qe+"(?="+[Ne,Fe+Ge,"$"].join("|")+")",Fe+"?"+Ge+"+"+He,Fe+"+"+Qe,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",je,Xe].join("|"),"g"),ot=RegExp("["+Ue+Se+Ie+Pe+"]"),at=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,it=["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"],st=-1,ut={};ut[D]=ut[q]=ut[z]=ut[L]=ut[$]=ut[V]=ut[B]=ut[F]=ut[U]=!0,ut[y]=ut[b]=ut[M]=ut[w]=ut[j]=ut[x]=ut[_]=ut[E]=ut[I]=ut[A]=ut[k]=ut[P]=ut[R]=ut[O]=ut[N]=!1;var lt={};lt[y]=lt[b]=lt[M]=lt[j]=lt[w]=lt[x]=lt[D]=lt[q]=lt[z]=lt[L]=lt[$]=lt[I]=lt[A]=lt[k]=lt[P]=lt[R]=lt[O]=lt[T]=lt[V]=lt[B]=lt[F]=lt[U]=!0,lt[_]=lt[E]=lt[N]=!1;var ct={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},dt=parseFloat,ft=parseInt,pt="object"==typeof Da&&Da&&Da.Object===Object&&Da,mt="object"==typeof self&&self&&self.Object===Object&&self,vt=pt||mt||Function("return this")(),ht=t&&!t.nodeType&&t,gt=ht&&e&&!e.nodeType&&e,yt=gt&&gt.exports===ht,bt=yt&&pt.process,wt=function(){try{return gt&&gt.require&&gt.require("util").types||bt&&bt.binding&&bt.binding("util")}catch{}}(),xt=wt&&wt.isArrayBuffer,_t=wt&&wt.isDate,Et=wt&&wt.isMap,St=wt&&wt.isRegExp,It=wt&&wt.isSet,At=wt&&wt.isTypedArray;function kt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Ct(e,t,n,r){for(var o=-1,a=null==e?0:e.length;++o<a;){var i=e[o];t(r,i,n(i),e)}return r}function Pt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function Rt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Ot(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function Tt(e,t){for(var n=-1,r=null==e?0:e.length,o=0,a=[];++n<r;){var i=e[n];t(i,n,e)&&(a[o++]=i)}return a}function Nt(e,t){return!(null==e||!e.length)&&Ft(e,t,0)>-1}function Mt(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}function jt(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}function Dt(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function qt(e,t,n,r){var o=-1,a=null==e?0:e.length;for(r&&a&&(n=e[++o]);++o<a;)n=t(n,e[o],o,e);return n}function zt(e,t,n,r){var o=null==e?0:e.length;for(r&&o&&(n=e[--o]);o--;)n=t(n,e[o],o,e);return n}function Lt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var $t=Ht("length");function Vt(e,t,n){var r;return n(e,(function(e,n,o){if(t(e,n,o))return r=n,!1})),r}function Bt(e,t,n,r){for(var o=e.length,a=n+(r?1:-1);r?a--:++a<o;)if(t(e[a],a,e))return a;return-1}function Ft(e,t,n){return t==t?function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}(e,t,n):Bt(e,Gt,n)}function Ut(e,t,n,r){for(var o=n-1,a=e.length;++o<a;)if(r(e[o],t))return o;return-1}function Gt(e){return e!=e}function Wt(e,t){var n=null==e?0:e.length;return n?Yt(e,t)/n:p}function Ht(e){return function(t){return null==t?n:t[e]}}function Qt(e){return function(t){return null==e?n:e[t]}}function Kt(e,t,n,r,o){return o(e,(function(e,o,a){n=r?(r=!1,e):t(n,e,o,a)})),n}function Yt(e,t){for(var r,o=-1,a=e.length;++o<a;){var i=t(e[o]);i!==n&&(r=r===n?i:r+i)}return r}function Jt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Xt(e){return e&&e.slice(0,vn(e)+1).replace(ie,"")}function Zt(e){return function(t){return e(t)}}function en(e,t){return jt(t,(function(t){return e[t]}))}function tn(e,t){return e.has(t)}function nn(e,t){for(var n=-1,r=e.length;++n<r&&Ft(t,e[n],0)>-1;);return n}function rn(e,t){for(var n=e.length;n--&&Ft(t,e[n],0)>-1;);return n}var on=Qt({"À":"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"}),an=Qt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function sn(e){return"\\"+ct[e]}function un(e){return ot.test(e)}function ln(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function cn(e,t){return function(n){return e(t(n))}}function dn(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var s=e[n];(s===t||s===a)&&(e[n]=a,i[o++]=n)}return i}function fn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function pn(e){return un(e)?function(e){for(var t=nt.lastIndex=0;nt.test(e);)++t;return t}(e):$t(e)}function mn(e){return un(e)?function(e){return e.match(nt)||[]}(e):function(e){return e.split("")}(e)}function vn(e){for(var t=e.length;t--&&se.test(e.charAt(t)););return t}var hn=Qt({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),gn=function e(t){var se,Se=(t=null==t?vt:gn.defaults(vt.Object(),t,gn.pick(vt,it))).Array,Ie=t.Date,Ae=t.Error,ke=t.Function,Ce=t.Math,Pe=t.Object,Re=t.RegExp,Oe=t.String,Te=t.TypeError,Ne=Se.prototype,Me=ke.prototype,je=Pe.prototype,De=t["__core-js_shared__"],qe=Me.toString,ze=je.hasOwnProperty,Le=0,$e=(se=/[^.]+$/.exec(De&&De.keys&&De.keys.IE_PROTO||""))?"Symbol(src)_1."+se:"",Ve=je.toString,Be=qe.call(Pe),Fe=vt._,Ue=Re("^"+qe.call(ze).replace(oe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ge=yt?t.Buffer:n,We=t.Symbol,He=t.Uint8Array,Qe=Ge?Ge.allocUnsafe:n,Ke=cn(Pe.getPrototypeOf,Pe),Ye=Pe.create,Je=je.propertyIsEnumerable,Xe=Ne.splice,Ze=We?We.isConcatSpreadable:n,nt=We?We.iterator:n,ot=We?We.toStringTag:n,ct=function(){try{var e=ma(Pe,"defineProperty");return e({},"",{}),e}catch{}}(),pt=t.clearTimeout!==vt.clearTimeout&&t.clearTimeout,mt=Ie&&Ie.now!==vt.Date.now&&Ie.now,ht=t.setTimeout!==vt.setTimeout&&t.setTimeout,gt=Ce.ceil,bt=Ce.floor,wt=Pe.getOwnPropertySymbols,$t=Ge?Ge.isBuffer:n,Qt=t.isFinite,yn=Ne.join,bn=cn(Pe.keys,Pe),wn=Ce.max,xn=Ce.min,_n=Ie.now,En=t.parseInt,Sn=Ce.random,In=Ne.reverse,An=ma(t,"DataView"),kn=ma(t,"Map"),Cn=ma(t,"Promise"),Pn=ma(t,"Set"),Rn=ma(t,"WeakMap"),On=ma(Pe,"create"),Tn=Rn&&new Rn,Nn={},Mn=$a(An),jn=$a(kn),Dn=$a(Cn),qn=$a(Pn),zn=$a(Rn),Ln=We?We.prototype:n,$n=Ln?Ln.valueOf:n,Vn=Ln?Ln.toString:n;function Bn(e){if(rs(e)&&!Wi(e)&&!(e instanceof Wn)){if(e instanceof Gn)return e;if(ze.call(e,"__wrapped__"))return Va(e)}return new Gn(e)}var Fn=function(){function e(){}return function(t){if(!ns(t))return{};if(Ye)return Ye(t);e.prototype=t;var r=new e;return e.prototype=n,r}}();function Un(){}function Gn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=n}function Wn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=m,this.__views__=[]}function Hn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Qn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Kn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Yn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Kn;++t<n;)this.add(e[t])}function Jn(e){var t=this.__data__=new Qn(e);this.size=t.size}function Xn(e,t){var n=Wi(e),r=!n&&Gi(e),o=!n&&!r&&Yi(e),a=!n&&!r&&!o&&ds(e),i=n||r||o||a,s=i?Jt(e.length,Oe):[],u=s.length;for(var l in e)(t||ze.call(e,l))&&(!i||!("length"==l||o&&("offset"==l||"parent"==l)||a&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||xa(l,u)))&&s.push(l);return s}function Zn(e){var t=e.length;return t?e[Yr(0,t-1)]:n}function er(e,t){return qa(To(e),lr(t,0,e.length))}function tr(e){return qa(To(e))}function nr(e,t,r){(r!==n&&!Bi(e[t],r)||r===n&&!(t in e))&&sr(e,t,r)}function rr(e,t,r){var o=e[t];(!ze.call(e,t)||!Bi(o,r)||r===n&&!(t in e))&&sr(e,t,r)}function or(e,t){for(var n=e.length;n--;)if(Bi(e[n][0],t))return n;return-1}function ar(e,t,n,r){return mr(e,(function(e,o,a){t(r,e,n(e),a)})),r}function ir(e,t){return e&&No(t,Ns(t),e)}function sr(e,t,n){"__proto__"==t&&ct?ct(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ur(e,t){for(var r=-1,o=t.length,a=Se(o),i=null==e;++r<o;)a[r]=i?n:Cs(e,t[r]);return a}function lr(e,t,r){return e==e&&(r!==n&&(e=e<=r?e:r),t!==n&&(e=e>=t?e:t)),e}function cr(e,t,r,o,a,i){var s,u=1&t,l=2&t,c=4&t;if(r&&(s=a?r(e,o,a,i):r(e)),s!==n)return s;if(!ns(e))return e;var d=Wi(e);if(d){if(s=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&ze.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!u)return To(e,s)}else{var f=ga(e),p=f==E||f==S;if(Yi(e))return Ao(e,u);if(f==k||f==y||p&&!a){if(s=l||p?{}:ba(e),!u)return l?function(e,t){return No(e,ha(e),t)}(e,function(e,t){return e&&No(t,Ms(t),e)}(s,e)):function(e,t){return No(e,va(e),t)}(e,ir(s,e))}else{if(!lt[f])return a?e:{};s=function(e,t,n){var r=e.constructor;switch(t){case M:return ko(e);case w:case x:return new r(+e);case j:return function(e,t){var n=t?ko(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case D:case q:case z:case L:case $:case V:case B:case F:case U:return Co(e,n);case I:return new r;case A:case O:return new r(e);case P:return function(e){var t=new e.constructor(e.source,ve.exec(e));return t.lastIndex=e.lastIndex,t}(e);case R:return new r;case T:return function(e){return $n?Pe($n.call(e)):{}}(e)}}(e,f,u)}}i||(i=new Jn);var m=i.get(e);if(m)return m;i.set(e,s),us(e)?e.forEach((function(n){s.add(cr(n,t,r,n,e,i))})):os(e)&&e.forEach((function(n,o){s.set(o,cr(n,t,r,o,e,i))}));var v=d?n:(c?l?sa:ia:l?Ms:Ns)(e);return Pt(v||e,(function(n,o){v&&(n=e[o=n]),rr(s,o,cr(n,t,r,o,e,i))})),s}function dr(e,t,r){var o=r.length;if(null==e)return!o;for(e=Pe(e);o--;){var a=r[o],i=t[a],s=e[a];if(s===n&&!(a in e)||!i(s))return!1}return!0}function fr(e,t,o){if("function"!=typeof e)throw new Te(r);return Na((function(){e.apply(n,o)}),t)}function pr(e,t,n,r){var o=-1,a=Nt,i=!0,s=e.length,u=[],l=t.length;if(!s)return u;n&&(t=jt(t,Zt(n))),r?(a=Mt,i=!1):t.length>=200&&(a=tn,i=!1,t=new Yn(t));e:for(;++o<s;){var c=e[o],d=null==n?c:n(c);if(c=r||0!==c?c:0,i&&d==d){for(var f=l;f--;)if(t[f]===d)continue e;u.push(c)}else a(t,d,r)||u.push(c)}return u}Bn.templateSettings={escape:X,evaluate:Z,interpolate:ee,variable:"",imports:{_:Bn}},Bn.prototype=Un.prototype,Bn.prototype.constructor=Bn,Gn.prototype=Fn(Un.prototype),Gn.prototype.constructor=Gn,Wn.prototype=Fn(Un.prototype),Wn.prototype.constructor=Wn,Hn.prototype.clear=function(){this.__data__=On?On(null):{},this.size=0},Hn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Hn.prototype.get=function(e){var t=this.__data__;if(On){var r=t[e];return r===o?n:r}return ze.call(t,e)?t[e]:n},Hn.prototype.has=function(e){var t=this.__data__;return On?t[e]!==n:ze.call(t,e)},Hn.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=On&&t===n?o:t,this},Qn.prototype.clear=function(){this.__data__=[],this.size=0},Qn.prototype.delete=function(e){var t=this.__data__,n=or(t,e);return!(n<0||(n==t.length-1?t.pop():Xe.call(t,n,1),--this.size,0))},Qn.prototype.get=function(e){var t=this.__data__,r=or(t,e);return r<0?n:t[r][1]},Qn.prototype.has=function(e){return or(this.__data__,e)>-1},Qn.prototype.set=function(e,t){var n=this.__data__,r=or(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Kn.prototype.clear=function(){this.size=0,this.__data__={hash:new Hn,map:new(kn||Qn),string:new Hn}},Kn.prototype.delete=function(e){var t=fa(this,e).delete(e);return this.size-=t?1:0,t},Kn.prototype.get=function(e){return fa(this,e).get(e)},Kn.prototype.has=function(e){return fa(this,e).has(e)},Kn.prototype.set=function(e,t){var n=fa(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Yn.prototype.add=Yn.prototype.push=function(e){return this.__data__.set(e,o),this},Yn.prototype.has=function(e){return this.__data__.has(e)},Jn.prototype.clear=function(){this.__data__=new Qn,this.size=0},Jn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Jn.prototype.get=function(e){return this.__data__.get(e)},Jn.prototype.has=function(e){return this.__data__.has(e)},Jn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Qn){var r=n.__data__;if(!kn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Kn(r)}return n.set(e,t),this.size=n.size,this};var mr=Do(_r),vr=Do(Er,!0);function hr(e,t){var n=!0;return mr(e,(function(e,r,o){return n=!!t(e,r,o)})),n}function gr(e,t,r){for(var o=-1,a=e.length;++o<a;){var i=e[o],s=t(i);if(null!=s&&(u===n?s==s&&!cs(s):r(s,u)))var u=s,l=i}return l}function yr(e,t){var n=[];return mr(e,(function(e,r,o){t(e,r,o)&&n.push(e)})),n}function br(e,t,n,r,o){var a=-1,i=e.length;for(n||(n=wa),o||(o=[]);++a<i;){var s=e[a];t>0&&n(s)?t>1?br(s,t-1,n,r,o):Dt(o,s):r||(o[o.length]=s)}return o}var wr=qo(),xr=qo(!0);function _r(e,t){return e&&wr(e,t,Ns)}function Er(e,t){return e&&xr(e,t,Ns)}function Sr(e,t){return Tt(t,(function(t){return Zi(e[t])}))}function Ir(e,t){for(var r=0,o=(t=_o(t,e)).length;null!=e&&r<o;)e=e[La(t[r++])];return r&&r==o?e:n}function Ar(e,t,n){var r=t(e);return Wi(e)?r:Dt(r,n(e))}function kr(e){return null==e?e===n?"[object Undefined]":"[object Null]":ot&&ot in Pe(e)?function(e){var t=ze.call(e,ot),r=e[ot];try{e[ot]=n;var o=!0}catch{}var a=Ve.call(e);return o&&(t?e[ot]=r:delete e[ot]),a}(e):function(e){return Ve.call(e)}(e)}function Cr(e,t){return e>t}function Pr(e,t){return null!=e&&ze.call(e,t)}function Rr(e,t){return null!=e&&t in Pe(e)}function Or(e,t,r){for(var o=r?Mt:Nt,a=e[0].length,i=e.length,s=i,u=Se(i),l=1/0,c=[];s--;){var d=e[s];s&&t&&(d=jt(d,Zt(t))),l=xn(d.length,l),u[s]=!r&&(t||a>=120&&d.length>=120)?new Yn(s&&d):n}d=e[0];var f=-1,p=u[0];e:for(;++f<a&&c.length<l;){var m=d[f],v=t?t(m):m;if(m=r||0!==m?m:0,!(p?tn(p,v):o(c,v,r))){for(s=i;--s;){var h=u[s];if(!(h?tn(h,v):o(e[s],v,r)))continue e}p&&p.push(v),c.push(m)}}return c}function Tr(e,t,r){var o=null==(e=Ra(e,t=_o(t,e)))?e:e[La(Xa(t))];return null==o?n:kt(o,e,r)}function Nr(e){return rs(e)&&kr(e)==y}function Mr(e,t,r,o,a){return e===t||(null==e||null==t||!rs(e)&&!rs(t)?e!=e&&t!=t:function(e,t,r,o,a,i){var s=Wi(e),u=Wi(t),l=s?b:ga(e),c=u?b:ga(t),d=(l=l==y?k:l)==k,f=(c=c==y?k:c)==k,p=l==c;if(p&&Yi(e)){if(!Yi(t))return!1;s=!0,d=!1}if(p&&!d)return i||(i=new Jn),s||ds(e)?oa(e,t,r,o,a,i):function(e,t,n,r,o,a,i){switch(n){case j:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case M:return!(e.byteLength!=t.byteLength||!a(new He(e),new He(t)));case w:case x:case A:return Bi(+e,+t);case _:return e.name==t.name&&e.message==t.message;case P:case O:return e==t+"";case I:var s=ln;case R:var u=1&r;if(s||(s=fn),e.size!=t.size&&!u)return!1;var l=i.get(e);if(l)return l==t;r|=2,i.set(e,t);var c=oa(s(e),s(t),r,o,a,i);return i.delete(e),c;case T:if($n)return $n.call(e)==$n.call(t)}return!1}(e,t,l,r,o,a,i);if(!(1&r)){var m=d&&ze.call(e,"__wrapped__"),v=f&&ze.call(t,"__wrapped__");if(m||v){var h=m?e.value():e,g=v?t.value():t;return i||(i=new Jn),a(h,g,r,o,i)}}return!!p&&(i||(i=new Jn),function(e,t,r,o,a,i){var s=1&r,u=ia(e),l=u.length,c=ia(t),d=c.length;if(l!=d&&!s)return!1;for(var f=l;f--;){var p=u[f];if(!(s?p in t:ze.call(t,p)))return!1}var m=i.get(e),v=i.get(t);if(m&&v)return m==t&&v==e;var h=!0;i.set(e,t),i.set(t,e);for(var g=s;++f<l;){var y=e[p=u[f]],b=t[p];if(o)var w=s?o(b,y,p,t,e,i):o(y,b,p,e,t,i);if(!(w===n?y===b||a(y,b,r,o,i):w)){h=!1;break}g||(g="constructor"==p)}if(h&&!g){var x=e.constructor,_=t.constructor;x!=_&&"constructor"in e&&"constructor"in t&&!("function"==typeof x&&x instanceof x&&"function"==typeof _&&_ instanceof _)&&(h=!1)}return i.delete(e),i.delete(t),h}(e,t,r,o,a,i))}(e,t,r,o,Mr,a))}function jr(e,t,r,o){var a=r.length,i=a,s=!o;if(null==e)return!i;for(e=Pe(e);a--;){var u=r[a];if(s&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++a<i;){var l=(u=r[a])[0],c=e[l],d=u[1];if(s&&u[2]){if(c===n&&!(l in e))return!1}else{var f=new Jn;if(o)var p=o(c,d,l,e,t,f);if(!(p===n?Mr(d,c,3,o,f):p))return!1}}return!0}function Dr(e){return!(!ns(e)||function(e){return!!$e&&$e in e}(e))&&(Zi(e)?Ue:ye).test($a(e))}function qr(e){return"function"==typeof e?e:null==e?au:"object"==typeof e?Wi(e)?Fr(e[0],e[1]):Br(e):mu(e)}function zr(e){if(!Aa(e))return bn(e);var t=[];for(var n in Pe(e))ze.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Lr(e){if(!ns(e))return function(e){var t=[];if(null!=e)for(var n in Pe(e))t.push(n);return t}(e);var t=Aa(e),n=[];for(var r in e)"constructor"==r&&(t||!ze.call(e,r))||n.push(r);return n}function $r(e,t){return e<t}function Vr(e,t){var n=-1,r=Qi(e)?Se(e.length):[];return mr(e,(function(e,o,a){r[++n]=t(e,o,a)})),r}function Br(e){var t=pa(e);return 1==t.length&&t[0][2]?Ca(t[0][0],t[0][1]):function(n){return n===e||jr(n,e,t)}}function Fr(e,t){return Ea(e)&&ka(t)?Ca(La(e),t):function(r){var o=Cs(r,e);return o===n&&o===t?Ps(r,e):Mr(t,o,3)}}function Ur(e,t,r,o,a){e!==t&&wr(t,(function(i,s){if(a||(a=new Jn),ns(i))!function(e,t,r,o,a,i,s){var u=Oa(e,r),l=Oa(t,r),c=s.get(l);if(c)nr(e,r,c);else{var d=i?i(u,l,r+"",e,t,s):n,f=d===n;if(f){var p=Wi(l),m=!p&&Yi(l),v=!p&&!m&&ds(l);d=l,p||m||v?Wi(u)?d=u:Ki(u)?d=To(u):m?(f=!1,d=Ao(l,!0)):v?(f=!1,d=Co(l,!0)):d=[]:is(l)||Gi(l)?(d=u,Gi(u)?d=bs(u):(!ns(u)||Zi(u))&&(d=ba(l))):f=!1}f&&(s.set(l,d),a(d,l,o,i,s),s.delete(l)),nr(e,r,d)}}(e,t,s,r,Ur,o,a);else{var u=o?o(Oa(e,s),i,s+"",e,t,a):n;u===n&&(u=i),nr(e,s,u)}}),Ms)}function Gr(e,t){var r=e.length;if(r)return xa(t+=t<0?r:0,r)?e[t]:n}function Wr(e,t,n){t=t.length?jt(t,(function(e){return Wi(e)?function(t){return Ir(t,1===e.length?e[0]:e)}:e})):[au];var r=-1;return t=jt(t,Zt(da())),function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(Vr(e,(function(e,n,o){return{criteria:jt(t,(function(t){return t(e)})),index:++r,value:e}})),(function(e,t){return function(e,t,n){for(var r=-1,o=e.criteria,a=t.criteria,i=o.length,s=n.length;++r<i;){var u=Po(o[r],a[r]);if(u)return r>=s?u:u*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}))}function Hr(e,t,n){for(var r=-1,o=t.length,a={};++r<o;){var i=t[r],s=Ir(e,i);n(s,i)&&to(a,_o(i,e),s)}return a}function Qr(e,t,n,r){var o=r?Ut:Ft,a=-1,i=t.length,s=e;for(e===t&&(t=To(t)),n&&(s=jt(e,Zt(n)));++a<i;)for(var u=0,l=t[a],c=n?n(l):l;(u=o(s,c,u,r))>-1;)s!==e&&Xe.call(s,u,1),Xe.call(e,u,1);return e}function Kr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==a){var a=o;xa(o)?Xe.call(e,o,1):mo(e,o)}}return e}function Yr(e,t){return e+bt(Sn()*(t-e+1))}function Jr(e,t){var n="";if(!e||t<1||t>f)return n;do{t%2&&(n+=e),(t=bt(t/2))&&(e+=e)}while(t);return n}function Xr(e,t){return Ma(Pa(e,t,au),e+"")}function Zr(e){return Zn(Bs(e))}function eo(e,t){var n=Bs(e);return qa(n,lr(t,0,n.length))}function to(e,t,r,o){if(!ns(e))return e;for(var a=-1,i=(t=_o(t,e)).length,s=i-1,u=e;null!=u&&++a<i;){var l=La(t[a]),c=r;if("__proto__"===l||"constructor"===l||"prototype"===l)return e;if(a!=s){var d=u[l];(c=o?o(d,l,u):n)===n&&(c=ns(d)?d:xa(t[a+1])?[]:{})}rr(u,l,c),u=u[l]}return e}var no=Tn?function(e,t){return Tn.set(e,t),e}:au,ro=ct?function(e,t){return ct(e,"toString",{configurable:!0,enumerable:!1,value:nu(t),writable:!0})}:au;function oo(e){return qa(Bs(e))}function ao(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=Se(o);++r<o;)a[r]=e[r+t];return a}function io(e,t){var n;return mr(e,(function(e,r,o){return!(n=t(e,r,o))})),!!n}function so(e,t,n){var r=0,o=null==e?r:e.length;if("number"==typeof t&&t==t&&o<=h){for(;r<o;){var a=r+o>>>1,i=e[a];null!==i&&!cs(i)&&(n?i<=t:i<t)?r=a+1:o=a}return o}return uo(e,t,au,n)}function uo(e,t,r,o){var a=0,i=null==e?0:e.length;if(0===i)return 0;for(var s=(t=r(t))!=t,u=null===t,l=cs(t),c=t===n;a<i;){var d=bt((a+i)/2),f=r(e[d]),p=f!==n,m=null===f,h=f==f,g=cs(f);if(s)var y=o||h;else y=c?h&&(o||p):u?h&&p&&(o||!m):l?h&&p&&!m&&(o||!g):!m&&!g&&(o?f<=t:f<t);y?a=d+1:i=d}return xn(i,v)}function lo(e,t){for(var n=-1,r=e.length,o=0,a=[];++n<r;){var i=e[n],s=t?t(i):i;if(!n||!Bi(s,u)){var u=s;a[o++]=0===i?0:i}}return a}function co(e){return"number"==typeof e?e:cs(e)?p:+e}function fo(e){if("string"==typeof e)return e;if(Wi(e))return jt(e,fo)+"";if(cs(e))return Vn?Vn.call(e):"";var t=e+"";return"0"==t&&1/e==-d?"-0":t}function po(e,t,n){var r=-1,o=Nt,a=e.length,i=!0,s=[],u=s;if(n)i=!1,o=Mt;else if(a>=200){var l=t?null:Xo(e);if(l)return fn(l);i=!1,o=tn,u=new Yn}else u=t?[]:s;e:for(;++r<a;){var c=e[r],d=t?t(c):c;if(c=n||0!==c?c:0,i&&d==d){for(var f=u.length;f--;)if(u[f]===d)continue e;t&&u.push(d),s.push(c)}else o(u,d,n)||(u!==s&&u.push(d),s.push(c))}return s}function mo(e,t){return null==(e=Ra(e,t=_o(t,e)))||delete e[La(Xa(t))]}function vo(e,t,n,r){return to(e,t,n(Ir(e,t)),r)}function ho(e,t,n,r){for(var o=e.length,a=r?o:-1;(r?a--:++a<o)&&t(e[a],a,e););return n?ao(e,r?0:a,r?a+1:o):ao(e,r?a+1:0,r?o:a)}function go(e,t){var n=e;return n instanceof Wn&&(n=n.value()),qt(t,(function(e,t){return t.func.apply(t.thisArg,Dt([e],t.args))}),n)}function yo(e,t,n){var r=e.length;if(r<2)return r?po(e[0]):[];for(var o=-1,a=Se(r);++o<r;)for(var i=e[o],s=-1;++s<r;)s!=o&&(a[o]=pr(a[o]||i,e[s],t,n));return po(br(a,1),t,n)}function bo(e,t,r){for(var o=-1,a=e.length,i=t.length,s={};++o<a;){var u=o<i?t[o]:n;r(s,e[o],u)}return s}function wo(e){return Ki(e)?e:[]}function xo(e){return"function"==typeof e?e:au}function _o(e,t){return Wi(e)?e:Ea(e,t)?[e]:za(ws(e))}var Eo=Xr;function So(e,t,r){var o=e.length;return r=r===n?o:r,!t&&r>=o?e:ao(e,t,r)}var Io=pt||function(e){return vt.clearTimeout(e)};function Ao(e,t){if(t)return e.slice();var n=e.length,r=Qe?Qe(n):new e.constructor(n);return e.copy(r),r}function ko(e){var t=new e.constructor(e.byteLength);return new He(t).set(new He(e)),t}function Co(e,t){var n=t?ko(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Po(e,t){if(e!==t){var r=e!==n,o=null===e,a=e==e,i=cs(e),s=t!==n,u=null===t,l=t==t,c=cs(t);if(!u&&!c&&!i&&e>t||i&&s&&l&&!u&&!c||o&&s&&l||!r&&l||!a)return 1;if(!o&&!i&&!c&&e<t||c&&r&&a&&!o&&!i||u&&r&&a||!s&&a||!l)return-1}return 0}function Ro(e,t,n,r){for(var o=-1,a=e.length,i=n.length,s=-1,u=t.length,l=wn(a-i,0),c=Se(u+l),d=!r;++s<u;)c[s]=t[s];for(;++o<i;)(d||o<a)&&(c[n[o]]=e[o]);for(;l--;)c[s++]=e[o++];return c}function Oo(e,t,n,r){for(var o=-1,a=e.length,i=-1,s=n.length,u=-1,l=t.length,c=wn(a-s,0),d=Se(c+l),f=!r;++o<c;)d[o]=e[o];for(var p=o;++u<l;)d[p+u]=t[u];for(;++i<s;)(f||o<a)&&(d[p+n[i]]=e[o++]);return d}function To(e,t){var n=-1,r=e.length;for(t||(t=Se(r));++n<r;)t[n]=e[n];return t}function No(e,t,r,o){var a=!r;r||(r={});for(var i=-1,s=t.length;++i<s;){var u=t[i],l=o?o(r[u],e[u],u,r,e):n;l===n&&(l=e[u]),a?sr(r,u,l):rr(r,u,l)}return r}function Mo(e,t){return function(n,r){var o=Wi(n)?Ct:ar,a=t?t():{};return o(n,e,da(r,2),a)}}function jo(e){return Xr((function(t,r){var o=-1,a=r.length,i=a>1?r[a-1]:n,s=a>2?r[2]:n;for(i=e.length>3&&"function"==typeof i?(a--,i):n,s&&_a(r[0],r[1],s)&&(i=a<3?n:i,a=1),t=Pe(t);++o<a;){var u=r[o];u&&e(t,u,o,i)}return t}))}function Do(e,t){return function(n,r){if(null==n)return n;if(!Qi(n))return e(n,r);for(var o=n.length,a=t?o:-1,i=Pe(n);(t?a--:++a<o)&&!1!==r(i[a],a,i););return n}}function qo(e){return function(t,n,r){for(var o=-1,a=Pe(t),i=r(t),s=i.length;s--;){var u=i[e?s:++o];if(!1===n(a[u],u,a))break}return t}}function zo(e){return function(t){var r=un(t=ws(t))?mn(t):n,o=r?r[0]:t.charAt(0),a=r?So(r,1).join(""):t.slice(1);return o[e]()+a}}function Lo(e){return function(t){return qt(Zs(Gs(t).replace(et,"")),e,"")}}function $o(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 n=Fn(e.prototype),r=e.apply(n,t);return ns(r)?r:n}}function Vo(e){return function(t,r,o){var a=Pe(t);if(!Qi(t)){var i=da(r,3);t=Ns(t),r=function(e){return i(a[e],e,a)}}var s=e(t,r,o);return s>-1?a[i?t[s]:s]:n}}function Bo(e){return aa((function(t){var o=t.length,a=o,i=Gn.prototype.thru;for(e&&t.reverse();a--;){var s=t[a];if("function"!=typeof s)throw new Te(r);if(i&&!u&&"wrapper"==la(s))var u=new Gn([],!0)}for(a=u?a:o;++a<o;){var l=la(s=t[a]),c="wrapper"==l?ua(s):n;u=c&&Sa(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?u[la(c[0])].apply(u,c[3]):1==s.length&&Sa(s)?u[l]():u.thru(s)}return function(){var e=arguments,n=e[0];if(u&&1==e.length&&Wi(n))return u.plant(n).value();for(var r=0,a=o?t[r].apply(this,e):n;++r<o;)a=t[r].call(this,a);return a}}))}function Fo(e,t,r,o,a,i,s,u,c,d){var f=t&l,p=1&t,m=2&t,v=24&t,h=512&t,g=m?n:$o(e);return function l(){for(var y=arguments.length,b=Se(y),w=y;w--;)b[w]=arguments[w];if(v)var x=ca(l),_=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(b,x);if(o&&(b=Ro(b,o,a,v)),i&&(b=Oo(b,i,s,v)),y-=_,v&&y<d){var E=dn(b,x);return Yo(e,t,Fo,l.placeholder,r,b,E,u,c,d-y)}var S=p?r:this,I=m?S[e]:e;return y=b.length,u?b=function(e,t){for(var r=e.length,o=xn(t.length,r),a=To(e);o--;){var i=t[o];e[o]=xa(i,r)?a[i]:n}return e}(b,u):h&&y>1&&b.reverse(),f&&c<y&&(b.length=c),this&&this!==vt&&this instanceof l&&(I=g||$o(I)),I.apply(S,b)}}function Uo(e,t){return function(n,r){return function(e,t,n,r){return _r(e,(function(e,o,a){t(r,n(e),o,a)})),r}(n,e,t(r),{})}}function Go(e,t){return function(r,o){var a;if(r===n&&o===n)return t;if(r!==n&&(a=r),o!==n){if(a===n)return o;"string"==typeof r||"string"==typeof o?(r=fo(r),o=fo(o)):(r=co(r),o=co(o)),a=e(r,o)}return a}}function Wo(e){return aa((function(t){return t=jt(t,Zt(da())),Xr((function(n){var r=this;return e(t,(function(e){return kt(e,r,n)}))}))}))}function Ho(e,t){var r=(t=t===n?" ":fo(t)).length;if(r<2)return r?Jr(t,e):t;var o=Jr(t,gt(e/pn(t)));return un(t)?So(mn(o),0,e).join(""):o.slice(0,e)}function Qo(e){return function(t,r,o){return o&&"number"!=typeof o&&_a(t,r,o)&&(r=o=n),t=vs(t),r===n?(r=t,t=0):r=vs(r),function(e,t,n,r){for(var o=-1,a=wn(gt((t-e)/(n||1)),0),i=Se(a);a--;)i[r?a:++o]=e,e+=n;return i}(t,r,o=o===n?t<r?1:-1:vs(o),e)}}function Ko(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=ys(t),n=ys(n)),e(t,n)}}function Yo(e,t,r,o,a,i,l,c,d,f){var p=8&t;t|=p?s:u,4&(t&=~(p?u:s))||(t&=-4);var m=[e,t,a,p?i:n,p?l:n,p?n:i,p?n:l,c,d,f],v=r.apply(n,m);return Sa(e)&&Ta(v,m),v.placeholder=o,ja(v,e,t)}function Jo(e){var t=Ce[e];return function(e,n){if(e=ys(e),(n=null==n?0:xn(hs(n),292))&&Qt(e)){var r=(ws(e)+"e").split("e");return+((r=(ws(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Xo=Pn&&1/fn(new Pn([,-0]))[1]==d?function(e){return new Pn(e)}:cu;function Zo(e){return function(t){var n=ga(t);return n==I?ln(t):n==R?function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}(t):function(e,t){return jt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function ea(e,t,o,d,f,p,m,v){var h=2&t;if(!h&&"function"!=typeof e)throw new Te(r);var g=d?d.length:0;if(g||(t&=-97,d=f=n),m=m===n?m:wn(hs(m),0),v=v===n?v:hs(v),g-=f?f.length:0,t&u){var y=d,b=f;d=f=n}var w=h?n:ua(e),x=[e,t,o,d,f,y,b,p,m,v];if(w&&function(e,t){var n=e[1],r=t[1],o=n|r,i=o<131,s=r==l&&8==n||r==l&&n==c&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!i&&!s)return e;1&r&&(e[2]=t[2],o|=1&n?0:4);var u=t[3];if(u){var d=e[3];e[3]=d?Ro(d,u,t[4]):u,e[4]=d?dn(e[3],a):t[4]}(u=t[5])&&(d=e[5],e[5]=d?Oo(d,u,t[6]):u,e[6]=d?dn(e[5],a):t[6]),(u=t[7])&&(e[7]=u),r&l&&(e[8]=null==e[8]?t[8]:xn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=o}(x,w),e=x[0],t=x[1],o=x[2],d=x[3],f=x[4],!(v=x[9]=x[9]===n?h?0:e.length:wn(x[9]-g,0))&&24&t&&(t&=-25),t&&1!=t)_=8==t||t==i?function(e,t,r){var o=$o(e);return function a(){for(var i=arguments.length,s=Se(i),u=i,l=ca(a);u--;)s[u]=arguments[u];var c=i<3&&s[0]!==l&&s[i-1]!==l?[]:dn(s,l);return(i-=c.length)<r?Yo(e,t,Fo,a.placeholder,n,s,c,n,n,r-i):kt(this&&this!==vt&&this instanceof a?o:e,this,s)}}(e,t,v):t!=s&&33!=t||f.length?Fo.apply(n,x):function(e,t,n,r){var o=1&t,a=$o(e);return function t(){for(var i=-1,s=arguments.length,u=-1,l=r.length,c=Se(l+s),d=this&&this!==vt&&this instanceof t?a:e;++u<l;)c[u]=r[u];for(;s--;)c[u++]=arguments[++i];return kt(d,o?n:this,c)}}(e,t,o,d);else var _=function(e,t,n){var r=1&t,o=$o(e);return function t(){return(this&&this!==vt&&this instanceof t?o:e).apply(r?n:this,arguments)}}(e,t,o);return ja((w?no:Ta)(_,x),e,t)}function ta(e,t,r,o){return e===n||Bi(e,je[r])&&!ze.call(o,r)?t:e}function na(e,t,r,o,a,i){return ns(e)&&ns(t)&&(i.set(t,e),Ur(e,t,n,na,i),i.delete(t)),e}function ra(e){return is(e)?n:e}function oa(e,t,r,o,a,i){var s=1&r,u=e.length,l=t.length;if(u!=l&&!(s&&l>u))return!1;var c=i.get(e),d=i.get(t);if(c&&d)return c==t&&d==e;var f=-1,p=!0,m=2&r?new Yn:n;for(i.set(e,t),i.set(t,e);++f<u;){var v=e[f],h=t[f];if(o)var g=s?o(h,v,f,t,e,i):o(v,h,f,e,t,i);if(g!==n){if(g)continue;p=!1;break}if(m){if(!Lt(t,(function(e,t){if(!tn(m,t)&&(v===e||a(v,e,r,o,i)))return m.push(t)}))){p=!1;break}}else if(v!==h&&!a(v,h,r,o,i)){p=!1;break}}return i.delete(e),i.delete(t),p}function aa(e){return Ma(Pa(e,n,Ha),e+"")}function ia(e){return Ar(e,Ns,va)}function sa(e){return Ar(e,Ms,ha)}var ua=Tn?function(e){return Tn.get(e)}:cu;function la(e){for(var t=e.name+"",n=Nn[t],r=ze.call(Nn,t)?n.length:0;r--;){var o=n[r],a=o.func;if(null==a||a==e)return o.name}return t}function ca(e){return(ze.call(Bn,"placeholder")?Bn:e).placeholder}function da(){var e=Bn.iteratee||iu;return e=e===iu?qr:e,arguments.length?e(arguments[0],arguments[1]):e}function fa(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function pa(e){for(var t=Ns(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,ka(o)]}return t}function ma(e,t){var r=function(e,t){return null==e?n:e[t]}(e,t);return Dr(r)?r:n}var va=wt?function(e){return null==e?[]:(e=Pe(e),Tt(wt(e),(function(t){return Je.call(e,t)})))}:gu,ha=wt?function(e){for(var t=[];e;)Dt(t,va(e)),e=Ke(e);return t}:gu,ga=kr;function ya(e,t,n){for(var r=-1,o=(t=_o(t,e)).length,a=!1;++r<o;){var i=La(t[r]);if(!(a=null!=e&&n(e,i)))break;e=e[i]}return a||++r!=o?a:!!(o=null==e?0:e.length)&&ts(o)&&xa(i,o)&&(Wi(e)||Gi(e))}function ba(e){return"function"!=typeof e.constructor||Aa(e)?{}:Fn(Ke(e))}function wa(e){return Wi(e)||Gi(e)||!!(Ze&&e&&e[Ze])}function xa(e,t){var n=typeof e;return!!(t=t??f)&&("number"==n||"symbol"!=n&&we.test(e))&&e>-1&&e%1==0&&e<t}function _a(e,t,n){if(!ns(n))return!1;var r=typeof t;return!!("number"==r?Qi(n)&&xa(t,n.length):"string"==r&&t in n)&&Bi(n[t],e)}function Ea(e,t){if(Wi(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!cs(e))||ne.test(e)||!te.test(e)||null!=t&&e in Pe(t)}function Sa(e){var t=la(e),n=Bn[t];if("function"!=typeof n||!(t in Wn.prototype))return!1;if(e===n)return!0;var r=ua(n);return!!r&&e===r[0]}(An&&ga(new An(new ArrayBuffer(1)))!=j||kn&&ga(new kn)!=I||Cn&&ga(Cn.resolve())!=C||Pn&&ga(new Pn)!=R||Rn&&ga(new Rn)!=N)&&(ga=function(e){var t=kr(e),r=t==k?e.constructor:n,o=r?$a(r):"";if(o)switch(o){case Mn:return j;case jn:return I;case Dn:return C;case qn:return R;case zn:return N}return t});var Ia=De?Zi:yu;function Aa(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||je)}function ka(e){return e==e&&!ns(e)}function Ca(e,t){return function(r){return null!=r&&r[e]===t&&(t!==n||e in Pe(r))}}function Pa(e,t,r){return t=wn(t===n?e.length-1:t,0),function(){for(var n=arguments,o=-1,a=wn(n.length-t,0),i=Se(a);++o<a;)i[o]=n[t+o];o=-1;for(var s=Se(t+1);++o<t;)s[o]=n[o];return s[t]=r(i),kt(e,this,s)}}function Ra(e,t){return t.length<2?e:Ir(e,ao(t,0,-1))}function Oa(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Ta=Da(no),Na=ht||function(e,t){return vt.setTimeout(e,t)},Ma=Da(ro);function ja(e,t,n){var r=t+"";return Ma(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(ue,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Pt(g,(function(n){var r="_."+n[0];t&n[1]&&!Nt(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(le);return t?t[1].split(ce):[]}(r),n)))}function Da(e){var t=0,r=0;return function(){var o=_n(),a=16-(o-r);if(r=o,a>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(n,arguments)}}function qa(e,t){var r=-1,o=e.length,a=o-1;for(t=t===n?o:t;++r<t;){var i=Yr(r,a),s=e[i];e[i]=e[r],e[r]=s}return e.length=t,e}var za=function(e){var t=Di(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(re,(function(e,n,r,o){t.push(r?o.replace(pe,"$1"):n||e)})),t}));function La(e){if("string"==typeof e||cs(e))return e;var t=e+"";return"0"==t&&1/e==-d?"-0":t}function $a(e){if(null!=e){try{return qe.call(e)}catch{}try{return e+""}catch{}}return""}function Va(e){if(e instanceof Wn)return e.clone();var t=new Gn(e.__wrapped__,e.__chain__);return t.__actions__=To(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Ba=Xr((function(e,t){return Ki(e)?pr(e,br(t,1,Ki,!0)):[]})),Fa=Xr((function(e,t){var r=Xa(t);return Ki(r)&&(r=n),Ki(e)?pr(e,br(t,1,Ki,!0),da(r,2)):[]})),Ua=Xr((function(e,t){var r=Xa(t);return Ki(r)&&(r=n),Ki(e)?pr(e,br(t,1,Ki,!0),n,r):[]}));function Ga(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:hs(n);return o<0&&(o=wn(r+o,0)),Bt(e,da(t,3),o)}function Wa(e,t,r){var o=null==e?0:e.length;if(!o)return-1;var a=o-1;return r!==n&&(a=hs(r),a=r<0?wn(o+a,0):xn(a,o-1)),Bt(e,da(t,3),a,!0)}function Ha(e){return null!=e&&e.length?br(e,1):[]}function Qa(e){return e&&e.length?e[0]:n}var Ka=Xr((function(e){var t=jt(e,wo);return t.length&&t[0]===e[0]?Or(t):[]})),Ya=Xr((function(e){var t=Xa(e),r=jt(e,wo);return t===Xa(r)?t=n:r.pop(),r.length&&r[0]===e[0]?Or(r,da(t,2)):[]})),Ja=Xr((function(e){var t=Xa(e),r=jt(e,wo);return(t="function"==typeof t?t:n)&&r.pop(),r.length&&r[0]===e[0]?Or(r,n,t):[]}));function Xa(e){var t=null==e?0:e.length;return t?e[t-1]:n}var Za=Xr(ei);function ei(e,t){return e&&e.length&&t&&t.length?Qr(e,t):e}var ti=aa((function(e,t){var n=null==e?0:e.length,r=ur(e,t);return Kr(e,jt(t,(function(e){return xa(e,n)?+e:e})).sort(Po)),r}));function ni(e){return null==e?e:In.call(e)}var ri=Xr((function(e){return po(br(e,1,Ki,!0))})),oi=Xr((function(e){var t=Xa(e);return Ki(t)&&(t=n),po(br(e,1,Ki,!0),da(t,2))})),ai=Xr((function(e){var t=Xa(e);return t="function"==typeof t?t:n,po(br(e,1,Ki,!0),n,t)}));function ii(e){if(!e||!e.length)return[];var t=0;return e=Tt(e,(function(e){if(Ki(e))return t=wn(e.length,t),!0})),Jt(t,(function(t){return jt(e,Ht(t))}))}function si(e,t){if(!e||!e.length)return[];var r=ii(e);return null==t?r:jt(r,(function(e){return kt(t,n,e)}))}var ui=Xr((function(e,t){return Ki(e)?pr(e,t):[]})),li=Xr((function(e){return yo(Tt(e,Ki))})),ci=Xr((function(e){var t=Xa(e);return Ki(t)&&(t=n),yo(Tt(e,Ki),da(t,2))})),di=Xr((function(e){var t=Xa(e);return t="function"==typeof t?t:n,yo(Tt(e,Ki),n,t)})),fi=Xr(ii),pi=Xr((function(e){var t=e.length,r=t>1?e[t-1]:n;return r="function"==typeof r?(e.pop(),r):n,si(e,r)}));function mi(e){var t=Bn(e);return t.__chain__=!0,t}function vi(e,t){return t(e)}var hi=aa((function(e){var t=e.length,r=t?e[0]:0,o=this.__wrapped__,a=function(t){return ur(t,e)};return!(t>1||this.__actions__.length)&&o instanceof Wn&&xa(r)?((o=o.slice(r,+r+(t?1:0))).__actions__.push({func:vi,args:[a],thisArg:n}),new Gn(o,this.__chain__).thru((function(e){return t&&!e.length&&e.push(n),e}))):this.thru(a)})),gi=Mo((function(e,t,n){ze.call(e,n)?++e[n]:sr(e,n,1)})),yi=Vo(Ga),bi=Vo(Wa);function wi(e,t){return(Wi(e)?Pt:mr)(e,da(t,3))}function xi(e,t){return(Wi(e)?Rt:vr)(e,da(t,3))}var _i=Mo((function(e,t,n){ze.call(e,n)?e[n].push(t):sr(e,n,[t])})),Ei=Xr((function(e,t,n){var r=-1,o="function"==typeof t,a=Qi(e)?Se(e.length):[];return mr(e,(function(e){a[++r]=o?kt(t,e,n):Tr(e,t,n)})),a})),Si=Mo((function(e,t,n){sr(e,n,t)}));function Ii(e,t){return(Wi(e)?jt:Vr)(e,da(t,3))}var Ai=Mo((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),ki=Xr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&_a(e,t[0],t[1])?t=[]:n>2&&_a(t[0],t[1],t[2])&&(t=[t[0]]),Wr(e,br(t,1),[])})),Ci=mt||function(){return vt.Date.now()};function Pi(e,t,r){return t=r?n:t,t=e&&null==t?e.length:t,ea(e,l,n,n,n,n,t)}function Ri(e,t){var o;if("function"!=typeof t)throw new Te(r);return e=hs(e),function(){return--e>0&&(o=t.apply(this,arguments)),e<=1&&(t=n),o}}var Oi=Xr((function(e,t,n){var r=1;if(n.length){var o=dn(n,ca(Oi));r|=s}return ea(e,r,t,n,o)})),Ti=Xr((function(e,t,n){var r=3;if(n.length){var o=dn(n,ca(Ti));r|=s}return ea(t,r,e,n,o)}));function Ni(e,t,o){var a,i,s,u,l,c,d=0,f=!1,p=!1,m=!0;if("function"!=typeof e)throw new Te(r);function v(t){var r=a,o=i;return a=i=n,d=t,u=e.apply(o,r)}function h(e){var r=e-c;return c===n||r>=t||r<0||p&&e-d>=s}function g(){var e=Ci();if(h(e))return y(e);l=Na(g,function(e){var n=t-(e-c);return p?xn(n,s-(e-d)):n}(e))}function y(e){return l=n,m&&a?v(e):(a=i=n,u)}function b(){var e=Ci(),r=h(e);if(a=arguments,i=this,c=e,r){if(l===n)return function(e){return d=e,l=Na(g,t),f?v(e):u}(c);if(p)return Io(l),l=Na(g,t),v(c)}return l===n&&(l=Na(g,t)),u}return t=ys(t)||0,ns(o)&&(f=!!o.leading,s=(p="maxWait"in o)?wn(ys(o.maxWait)||0,t):s,m="trailing"in o?!!o.trailing:m),b.cancel=function(){l!==n&&Io(l),d=0,a=c=i=l=n},b.flush=function(){return l===n?u:y(Ci())},b}var Mi=Xr((function(e,t){return fr(e,1,t)})),ji=Xr((function(e,t,n){return fr(e,ys(t)||0,n)}));function Di(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Te(r);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var i=e.apply(this,r);return n.cache=a.set(o,i)||a,i};return n.cache=new(Di.Cache||Kn),n}function qi(e){if("function"!=typeof e)throw new Te(r);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)}}Di.Cache=Kn;var zi=Eo((function(e,t){var n=(t=1==t.length&&Wi(t[0])?jt(t[0],Zt(da())):jt(br(t,1),Zt(da()))).length;return Xr((function(r){for(var o=-1,a=xn(r.length,n);++o<a;)r[o]=t[o].call(this,r[o]);return kt(e,this,r)}))})),Li=Xr((function(e,t){var r=dn(t,ca(Li));return ea(e,s,n,t,r)})),$i=Xr((function(e,t){var r=dn(t,ca($i));return ea(e,u,n,t,r)})),Vi=aa((function(e,t){return ea(e,c,n,n,n,t)}));function Bi(e,t){return e===t||e!=e&&t!=t}var Fi=Ko(Cr),Ui=Ko((function(e,t){return e>=t})),Gi=Nr(function(){return arguments}())?Nr:function(e){return rs(e)&&ze.call(e,"callee")&&!Je.call(e,"callee")},Wi=Se.isArray,Hi=xt?Zt(xt):function(e){return rs(e)&&kr(e)==M};function Qi(e){return null!=e&&ts(e.length)&&!Zi(e)}function Ki(e){return rs(e)&&Qi(e)}var Yi=$t||yu,Ji=_t?Zt(_t):function(e){return rs(e)&&kr(e)==x};function Xi(e){if(!rs(e))return!1;var t=kr(e);return t==_||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!is(e)}function Zi(e){if(!ns(e))return!1;var t=kr(e);return t==E||t==S||"[object AsyncFunction]"==t||"[object Proxy]"==t}function es(e){return"number"==typeof e&&e==hs(e)}function ts(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=f}function ns(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function rs(e){return null!=e&&"object"==typeof e}var os=Et?Zt(Et):function(e){return rs(e)&&ga(e)==I};function as(e){return"number"==typeof e||rs(e)&&kr(e)==A}function is(e){if(!rs(e)||kr(e)!=k)return!1;var t=Ke(e);if(null===t)return!0;var n=ze.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&qe.call(n)==Be}var ss=St?Zt(St):function(e){return rs(e)&&kr(e)==P},us=It?Zt(It):function(e){return rs(e)&&ga(e)==R};function ls(e){return"string"==typeof e||!Wi(e)&&rs(e)&&kr(e)==O}function cs(e){return"symbol"==typeof e||rs(e)&&kr(e)==T}var ds=At?Zt(At):function(e){return rs(e)&&ts(e.length)&&!!ut[kr(e)]},fs=Ko($r),ps=Ko((function(e,t){return e<=t}));function ms(e){if(!e)return[];if(Qi(e))return ls(e)?mn(e):To(e);if(nt&&e[nt])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[nt]());var t=ga(e);return(t==I?ln:t==R?fn:Bs)(e)}function vs(e){return e?(e=ys(e))===d||e===-d?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function hs(e){var t=vs(e),n=t%1;return t==t?n?t-n:t:0}function gs(e){return e?lr(hs(e),0,m):0}function ys(e){if("number"==typeof e)return e;if(cs(e))return p;if(ns(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ns(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Xt(e);var n=ge.test(e);return n||be.test(e)?ft(e.slice(2),n?2:8):he.test(e)?p:+e}function bs(e){return No(e,Ms(e))}function ws(e){return null==e?"":fo(e)}var xs=jo((function(e,t){if(Aa(t)||Qi(t))No(t,Ns(t),e);else for(var n in t)ze.call(t,n)&&rr(e,n,t[n])})),_s=jo((function(e,t){No(t,Ms(t),e)})),Es=jo((function(e,t,n,r){No(t,Ms(t),e,r)})),Ss=jo((function(e,t,n,r){No(t,Ns(t),e,r)})),Is=aa(ur),As=Xr((function(e,t){e=Pe(e);var r=-1,o=t.length,a=o>2?t[2]:n;for(a&&_a(t[0],t[1],a)&&(o=1);++r<o;)for(var i=t[r],s=Ms(i),u=-1,l=s.length;++u<l;){var c=s[u],d=e[c];(d===n||Bi(d,je[c])&&!ze.call(e,c))&&(e[c]=i[c])}return e})),ks=Xr((function(e){return e.push(n,na),kt(Ds,n,e)}));function Cs(e,t,r){var o=null==e?n:Ir(e,t);return o===n?r:o}function Ps(e,t){return null!=e&&ya(e,t,Rr)}var Rs=Uo((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ve.call(t)),e[t]=n}),nu(au)),Os=Uo((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ve.call(t)),ze.call(e,t)?e[t].push(n):e[t]=[n]}),da),Ts=Xr(Tr);function Ns(e){return Qi(e)?Xn(e):zr(e)}function Ms(e){return Qi(e)?Xn(e,!0):Lr(e)}var js=jo((function(e,t,n){Ur(e,t,n)})),Ds=jo((function(e,t,n,r){Ur(e,t,n,r)})),qs=aa((function(e,t){var n={};if(null==e)return n;var r=!1;t=jt(t,(function(t){return t=_o(t,e),r||(r=t.length>1),t})),No(e,sa(e),n),r&&(n=cr(n,7,ra));for(var o=t.length;o--;)mo(n,t[o]);return n})),zs=aa((function(e,t){return null==e?{}:function(e,t){return Hr(e,t,(function(t,n){return Ps(e,n)}))}(e,t)}));function Ls(e,t){if(null==e)return{};var n=jt(sa(e),(function(e){return[e]}));return t=da(t),Hr(e,n,(function(e,n){return t(e,n[0])}))}var $s=Zo(Ns),Vs=Zo(Ms);function Bs(e){return null==e?[]:en(e,Ns(e))}var Fs=Lo((function(e,t,n){return t=t.toLowerCase(),e+(n?Us(t):t)}));function Us(e){return Xs(ws(e).toLowerCase())}function Gs(e){return(e=ws(e))&&e.replace(xe,on).replace(tt,"")}var Ws=Lo((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Hs=Lo((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Qs=zo("toLowerCase"),Ks=Lo((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),Ys=Lo((function(e,t,n){return e+(n?" ":"")+Xs(t)})),Js=Lo((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Xs=zo("toUpperCase");function Zs(e,t,r){return e=ws(e),(t=r?n:t)===n?function(e){return at.test(e)}(e)?function(e){return e.match(rt)||[]}(e):function(e){return e.match(de)||[]}(e):e.match(t)||[]}var eu=Xr((function(e,t){try{return kt(e,n,t)}catch(e){return Xi(e)?e:new Ae(e)}})),tu=aa((function(e,t){return Pt(t,(function(t){t=La(t),sr(e,t,Oi(e[t],e))})),e}));function nu(e){return function(){return e}}var ru=Bo(),ou=Bo(!0);function au(e){return e}function iu(e){return qr("function"==typeof e?e:cr(e,1))}var su=Xr((function(e,t){return function(n){return Tr(n,e,t)}})),uu=Xr((function(e,t){return function(n){return Tr(e,n,t)}}));function lu(e,t,n){var r=Ns(t),o=Sr(t,r);null==n&&(!ns(t)||!o.length&&r.length)&&(n=t,t=e,e=this,o=Sr(t,Ns(t)));var a=!(ns(n)&&"chain"in n&&!n.chain),i=Zi(e);return Pt(o,(function(n){var r=t[n];e[n]=r,i&&(e.prototype[n]=function(){var t=this.__chain__;if(a||t){var n=e(this.__wrapped__);return(n.__actions__=To(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Dt([this.value()],arguments))})})),e}function cu(){}var du=Wo(jt),fu=Wo(Ot),pu=Wo(Lt);function mu(e){return Ea(e)?Ht(La(e)):function(e){return function(t){return Ir(t,e)}}(e)}var vu=Qo(),hu=Qo(!0);function gu(){return[]}function yu(){return!1}var bu=Go((function(e,t){return e+t}),0),wu=Jo("ceil"),xu=Go((function(e,t){return e/t}),1),_u=Jo("floor"),Eu=Go((function(e,t){return e*t}),1),Su=Jo("round"),Iu=Go((function(e,t){return e-t}),0);return Bn.after=function(e,t){if("function"!=typeof t)throw new Te(r);return e=hs(e),function(){if(--e<1)return t.apply(this,arguments)}},Bn.ary=Pi,Bn.assign=xs,Bn.assignIn=_s,Bn.assignInWith=Es,Bn.assignWith=Ss,Bn.at=Is,Bn.before=Ri,Bn.bind=Oi,Bn.bindAll=tu,Bn.bindKey=Ti,Bn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Wi(e)?e:[e]},Bn.chain=mi,Bn.chunk=function(e,t,r){t=(r?_a(e,t,r):t===n)?1:wn(hs(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var a=0,i=0,s=Se(gt(o/t));a<o;)s[i++]=ao(e,a,a+=t);return s},Bn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,o=[];++t<n;){var a=e[t];a&&(o[r++]=a)}return o},Bn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=Se(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return Dt(Wi(n)?To(n):[n],br(t,1))},Bn.cond=function(e){var t=null==e?0:e.length,n=da();return e=t?jt(e,(function(e){if("function"!=typeof e[1])throw new Te(r);return[n(e[0]),e[1]]})):[],Xr((function(n){for(var r=-1;++r<t;){var o=e[r];if(kt(o[0],this,n))return kt(o[1],this,n)}}))},Bn.conforms=function(e){return function(e){var t=Ns(e);return function(n){return dr(n,e,t)}}(cr(e,1))},Bn.constant=nu,Bn.countBy=gi,Bn.create=function(e,t){var n=Fn(e);return null==t?n:ir(n,t)},Bn.curry=function e(t,r,o){var a=ea(t,8,n,n,n,n,n,r=o?n:r);return a.placeholder=e.placeholder,a},Bn.curryRight=function e(t,r,o){var a=ea(t,i,n,n,n,n,n,r=o?n:r);return a.placeholder=e.placeholder,a},Bn.debounce=Ni,Bn.defaults=As,Bn.defaultsDeep=ks,Bn.defer=Mi,Bn.delay=ji,Bn.difference=Ba,Bn.differenceBy=Fa,Bn.differenceWith=Ua,Bn.drop=function(e,t,r){var o=null==e?0:e.length;return o?ao(e,(t=r||t===n?1:hs(t))<0?0:t,o):[]},Bn.dropRight=function(e,t,r){var o=null==e?0:e.length;return o?ao(e,0,(t=o-(t=r||t===n?1:hs(t)))<0?0:t):[]},Bn.dropRightWhile=function(e,t){return e&&e.length?ho(e,da(t,3),!0,!0):[]},Bn.dropWhile=function(e,t){return e&&e.length?ho(e,da(t,3),!0):[]},Bn.fill=function(e,t,r,o){var a=null==e?0:e.length;return a?(r&&"number"!=typeof r&&_a(e,t,r)&&(r=0,o=a),function(e,t,r,o){var a=e.length;for((r=hs(r))<0&&(r=-r>a?0:a+r),(o=o===n||o>a?a:hs(o))<0&&(o+=a),o=r>o?0:gs(o);r<o;)e[r++]=t;return e}(e,t,r,o)):[]},Bn.filter=function(e,t){return(Wi(e)?Tt:yr)(e,da(t,3))},Bn.flatMap=function(e,t){return br(Ii(e,t),1)},Bn.flatMapDeep=function(e,t){return br(Ii(e,t),d)},Bn.flatMapDepth=function(e,t,r){return r=r===n?1:hs(r),br(Ii(e,t),r)},Bn.flatten=Ha,Bn.flattenDeep=function(e){return null!=e&&e.length?br(e,d):[]},Bn.flattenDepth=function(e,t){return null!=e&&e.length?br(e,t=t===n?1:hs(t)):[]},Bn.flip=function(e){return ea(e,512)},Bn.flow=ru,Bn.flowRight=ou,Bn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var o=e[t];r[o[0]]=o[1]}return r},Bn.functions=function(e){return null==e?[]:Sr(e,Ns(e))},Bn.functionsIn=function(e){return null==e?[]:Sr(e,Ms(e))},Bn.groupBy=_i,Bn.initial=function(e){return null!=e&&e.length?ao(e,0,-1):[]},Bn.intersection=Ka,Bn.intersectionBy=Ya,Bn.intersectionWith=Ja,Bn.invert=Rs,Bn.invertBy=Os,Bn.invokeMap=Ei,Bn.iteratee=iu,Bn.keyBy=Si,Bn.keys=Ns,Bn.keysIn=Ms,Bn.map=Ii,Bn.mapKeys=function(e,t){var n={};return t=da(t,3),_r(e,(function(e,r,o){sr(n,t(e,r,o),e)})),n},Bn.mapValues=function(e,t){var n={};return t=da(t,3),_r(e,(function(e,r,o){sr(n,r,t(e,r,o))})),n},Bn.matches=function(e){return Br(cr(e,1))},Bn.matchesProperty=function(e,t){return Fr(e,cr(t,1))},Bn.memoize=Di,Bn.merge=js,Bn.mergeWith=Ds,Bn.method=su,Bn.methodOf=uu,Bn.mixin=lu,Bn.negate=qi,Bn.nthArg=function(e){return e=hs(e),Xr((function(t){return Gr(t,e)}))},Bn.omit=qs,Bn.omitBy=function(e,t){return Ls(e,qi(da(t)))},Bn.once=function(e){return Ri(2,e)},Bn.orderBy=function(e,t,r,o){return null==e?[]:(Wi(t)||(t=null==t?[]:[t]),Wi(r=o?n:r)||(r=null==r?[]:[r]),Wr(e,t,r))},Bn.over=du,Bn.overArgs=zi,Bn.overEvery=fu,Bn.overSome=pu,Bn.partial=Li,Bn.partialRight=$i,Bn.partition=Ai,Bn.pick=zs,Bn.pickBy=Ls,Bn.property=mu,Bn.propertyOf=function(e){return function(t){return null==e?n:Ir(e,t)}},Bn.pull=Za,Bn.pullAll=ei,Bn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Qr(e,t,da(n,2)):e},Bn.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?Qr(e,t,n,r):e},Bn.pullAt=ti,Bn.range=vu,Bn.rangeRight=hu,Bn.rearg=Vi,Bn.reject=function(e,t){return(Wi(e)?Tt:yr)(e,qi(da(t,3)))},Bn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,o=[],a=e.length;for(t=da(t,3);++r<a;){var i=e[r];t(i,r,e)&&(n.push(i),o.push(r))}return Kr(e,o),n},Bn.rest=function(e,t){if("function"!=typeof e)throw new Te(r);return Xr(e,t=t===n?t:hs(t))},Bn.reverse=ni,Bn.sampleSize=function(e,t,r){return t=(r?_a(e,t,r):t===n)?1:hs(t),(Wi(e)?er:eo)(e,t)},Bn.set=function(e,t,n){return null==e?e:to(e,t,n)},Bn.setWith=function(e,t,r,o){return o="function"==typeof o?o:n,null==e?e:to(e,t,r,o)},Bn.shuffle=function(e){return(Wi(e)?tr:oo)(e)},Bn.slice=function(e,t,r){var o=null==e?0:e.length;return o?(r&&"number"!=typeof r&&_a(e,t,r)?(t=0,r=o):(t=null==t?0:hs(t),r=r===n?o:hs(r)),ao(e,t,r)):[]},Bn.sortBy=ki,Bn.sortedUniq=function(e){return e&&e.length?lo(e):[]},Bn.sortedUniqBy=function(e,t){return e&&e.length?lo(e,da(t,2)):[]},Bn.split=function(e,t,r){return r&&"number"!=typeof r&&_a(e,t,r)&&(t=r=n),(r=r===n?m:r>>>0)?(e=ws(e))&&("string"==typeof t||null!=t&&!ss(t))&&!(t=fo(t))&&un(e)?So(mn(e),0,r):e.split(t,r):[]},Bn.spread=function(e,t){if("function"!=typeof e)throw new Te(r);return t=null==t?0:wn(hs(t),0),Xr((function(n){var r=n[t],o=So(n,0,t);return r&&Dt(o,r),kt(e,this,o)}))},Bn.tail=function(e){var t=null==e?0:e.length;return t?ao(e,1,t):[]},Bn.take=function(e,t,r){return e&&e.length?ao(e,0,(t=r||t===n?1:hs(t))<0?0:t):[]},Bn.takeRight=function(e,t,r){var o=null==e?0:e.length;return o?ao(e,(t=o-(t=r||t===n?1:hs(t)))<0?0:t,o):[]},Bn.takeRightWhile=function(e,t){return e&&e.length?ho(e,da(t,3),!1,!0):[]},Bn.takeWhile=function(e,t){return e&&e.length?ho(e,da(t,3)):[]},Bn.tap=function(e,t){return t(e),e},Bn.throttle=function(e,t,n){var o=!0,a=!0;if("function"!=typeof e)throw new Te(r);return ns(n)&&(o="leading"in n?!!n.leading:o,a="trailing"in n?!!n.trailing:a),Ni(e,t,{leading:o,maxWait:t,trailing:a})},Bn.thru=vi,Bn.toArray=ms,Bn.toPairs=$s,Bn.toPairsIn=Vs,Bn.toPath=function(e){return Wi(e)?jt(e,La):cs(e)?[e]:To(za(ws(e)))},Bn.toPlainObject=bs,Bn.transform=function(e,t,n){var r=Wi(e),o=r||Yi(e)||ds(e);if(t=da(t,4),null==n){var a=e&&e.constructor;n=o?r?new a:[]:ns(e)&&Zi(a)?Fn(Ke(e)):{}}return(o?Pt:_r)(e,(function(e,r,o){return t(n,e,r,o)})),n},Bn.unary=function(e){return Pi(e,1)},Bn.union=ri,Bn.unionBy=oi,Bn.unionWith=ai,Bn.uniq=function(e){return e&&e.length?po(e):[]},Bn.uniqBy=function(e,t){return e&&e.length?po(e,da(t,2)):[]},Bn.uniqWith=function(e,t){return t="function"==typeof t?t:n,e&&e.length?po(e,n,t):[]},Bn.unset=function(e,t){return null==e||mo(e,t)},Bn.unzip=ii,Bn.unzipWith=si,Bn.update=function(e,t,n){return null==e?e:vo(e,t,xo(n))},Bn.updateWith=function(e,t,r,o){return o="function"==typeof o?o:n,null==e?e:vo(e,t,xo(r),o)},Bn.values=Bs,Bn.valuesIn=function(e){return null==e?[]:en(e,Ms(e))},Bn.without=ui,Bn.words=Zs,Bn.wrap=function(e,t){return Li(xo(t),e)},Bn.xor=li,Bn.xorBy=ci,Bn.xorWith=di,Bn.zip=fi,Bn.zipObject=function(e,t){return bo(e||[],t||[],rr)},Bn.zipObjectDeep=function(e,t){return bo(e||[],t||[],to)},Bn.zipWith=pi,Bn.entries=$s,Bn.entriesIn=Vs,Bn.extend=_s,Bn.extendWith=Es,lu(Bn,Bn),Bn.add=bu,Bn.attempt=eu,Bn.camelCase=Fs,Bn.capitalize=Us,Bn.ceil=wu,Bn.clamp=function(e,t,r){return r===n&&(r=t,t=n),r!==n&&(r=(r=ys(r))==r?r:0),t!==n&&(t=(t=ys(t))==t?t:0),lr(ys(e),t,r)},Bn.clone=function(e){return cr(e,4)},Bn.cloneDeep=function(e){return cr(e,5)},Bn.cloneDeepWith=function(e,t){return cr(e,5,t="function"==typeof t?t:n)},Bn.cloneWith=function(e,t){return cr(e,4,t="function"==typeof t?t:n)},Bn.conformsTo=function(e,t){return null==t||dr(e,t,Ns(t))},Bn.deburr=Gs,Bn.defaultTo=function(e,t){return null==e||e!=e?t:e},Bn.divide=xu,Bn.endsWith=function(e,t,r){e=ws(e),t=fo(t);var o=e.length,a=r=r===n?o:lr(hs(r),0,o);return(r-=t.length)>=0&&e.slice(r,a)==t},Bn.eq=Bi,Bn.escape=function(e){return(e=ws(e))&&J.test(e)?e.replace(K,an):e},Bn.escapeRegExp=function(e){return(e=ws(e))&&ae.test(e)?e.replace(oe,"\\$&"):e},Bn.every=function(e,t,r){var o=Wi(e)?Ot:hr;return r&&_a(e,t,r)&&(t=n),o(e,da(t,3))},Bn.find=yi,Bn.findIndex=Ga,Bn.findKey=function(e,t){return Vt(e,da(t,3),_r)},Bn.findLast=bi,Bn.findLastIndex=Wa,Bn.findLastKey=function(e,t){return Vt(e,da(t,3),Er)},Bn.floor=_u,Bn.forEach=wi,Bn.forEachRight=xi,Bn.forIn=function(e,t){return null==e?e:wr(e,da(t,3),Ms)},Bn.forInRight=function(e,t){return null==e?e:xr(e,da(t,3),Ms)},Bn.forOwn=function(e,t){return e&&_r(e,da(t,3))},Bn.forOwnRight=function(e,t){return e&&Er(e,da(t,3))},Bn.get=Cs,Bn.gt=Fi,Bn.gte=Ui,Bn.has=function(e,t){return null!=e&&ya(e,t,Pr)},Bn.hasIn=Ps,Bn.head=Qa,Bn.identity=au,Bn.includes=function(e,t,n,r){e=Qi(e)?e:Bs(e),n=n&&!r?hs(n):0;var o=e.length;return n<0&&(n=wn(o+n,0)),ls(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&Ft(e,t,n)>-1},Bn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:hs(n);return o<0&&(o=wn(r+o,0)),Ft(e,t,o)},Bn.inRange=function(e,t,r){return t=vs(t),r===n?(r=t,t=0):r=vs(r),function(e,t,n){return e>=xn(t,n)&&e<wn(t,n)}(e=ys(e),t,r)},Bn.invoke=Ts,Bn.isArguments=Gi,Bn.isArray=Wi,Bn.isArrayBuffer=Hi,Bn.isArrayLike=Qi,Bn.isArrayLikeObject=Ki,Bn.isBoolean=function(e){return!0===e||!1===e||rs(e)&&kr(e)==w},Bn.isBuffer=Yi,Bn.isDate=Ji,Bn.isElement=function(e){return rs(e)&&1===e.nodeType&&!is(e)},Bn.isEmpty=function(e){if(null==e)return!0;if(Qi(e)&&(Wi(e)||"string"==typeof e||"function"==typeof e.splice||Yi(e)||ds(e)||Gi(e)))return!e.length;var t=ga(e);if(t==I||t==R)return!e.size;if(Aa(e))return!zr(e).length;for(var n in e)if(ze.call(e,n))return!1;return!0},Bn.isEqual=function(e,t){return Mr(e,t)},Bn.isEqualWith=function(e,t,r){var o=(r="function"==typeof r?r:n)?r(e,t):n;return o===n?Mr(e,t,n,r):!!o},Bn.isError=Xi,Bn.isFinite=function(e){return"number"==typeof e&&Qt(e)},Bn.isFunction=Zi,Bn.isInteger=es,Bn.isLength=ts,Bn.isMap=os,Bn.isMatch=function(e,t){return e===t||jr(e,t,pa(t))},Bn.isMatchWith=function(e,t,r){return r="function"==typeof r?r:n,jr(e,t,pa(t),r)},Bn.isNaN=function(e){return as(e)&&e!=+e},Bn.isNative=function(e){if(Ia(e))throw new Ae("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Dr(e)},Bn.isNil=function(e){return null==e},Bn.isNull=function(e){return null===e},Bn.isNumber=as,Bn.isObject=ns,Bn.isObjectLike=rs,Bn.isPlainObject=is,Bn.isRegExp=ss,Bn.isSafeInteger=function(e){return es(e)&&e>=-f&&e<=f},Bn.isSet=us,Bn.isString=ls,Bn.isSymbol=cs,Bn.isTypedArray=ds,Bn.isUndefined=function(e){return e===n},Bn.isWeakMap=function(e){return rs(e)&&ga(e)==N},Bn.isWeakSet=function(e){return rs(e)&&"[object WeakSet]"==kr(e)},Bn.join=function(e,t){return null==e?"":yn.call(e,t)},Bn.kebabCase=Ws,Bn.last=Xa,Bn.lastIndexOf=function(e,t,r){var o=null==e?0:e.length;if(!o)return-1;var a=o;return r!==n&&(a=(a=hs(r))<0?wn(o+a,0):xn(a,o-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,a):Bt(e,Gt,a,!0)},Bn.lowerCase=Hs,Bn.lowerFirst=Qs,Bn.lt=fs,Bn.lte=ps,Bn.max=function(e){return e&&e.length?gr(e,au,Cr):n},Bn.maxBy=function(e,t){return e&&e.length?gr(e,da(t,2),Cr):n},Bn.mean=function(e){return Wt(e,au)},Bn.meanBy=function(e,t){return Wt(e,da(t,2))},Bn.min=function(e){return e&&e.length?gr(e,au,$r):n},Bn.minBy=function(e,t){return e&&e.length?gr(e,da(t,2),$r):n},Bn.stubArray=gu,Bn.stubFalse=yu,Bn.stubObject=function(){return{}},Bn.stubString=function(){return""},Bn.stubTrue=function(){return!0},Bn.multiply=Eu,Bn.nth=function(e,t){return e&&e.length?Gr(e,hs(t)):n},Bn.noConflict=function(){return vt._===this&&(vt._=Fe),this},Bn.noop=cu,Bn.now=Ci,Bn.pad=function(e,t,n){e=ws(e);var r=(t=hs(t))?pn(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return Ho(bt(o),n)+e+Ho(gt(o),n)},Bn.padEnd=function(e,t,n){e=ws(e);var r=(t=hs(t))?pn(e):0;return t&&r<t?e+Ho(t-r,n):e},Bn.padStart=function(e,t,n){e=ws(e);var r=(t=hs(t))?pn(e):0;return t&&r<t?Ho(t-r,n)+e:e},Bn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),En(ws(e).replace(ie,""),t||0)},Bn.random=function(e,t,r){if(r&&"boolean"!=typeof r&&_a(e,t,r)&&(t=r=n),r===n&&("boolean"==typeof t?(r=t,t=n):"boolean"==typeof e&&(r=e,e=n)),e===n&&t===n?(e=0,t=1):(e=vs(e),t===n?(t=e,e=0):t=vs(t)),e>t){var o=e;e=t,t=o}if(r||e%1||t%1){var a=Sn();return xn(e+a*(t-e+dt("1e-"+((a+"").length-1))),t)}return Yr(e,t)},Bn.reduce=function(e,t,n){var r=Wi(e)?qt:Kt,o=arguments.length<3;return r(e,da(t,4),n,o,mr)},Bn.reduceRight=function(e,t,n){var r=Wi(e)?zt:Kt,o=arguments.length<3;return r(e,da(t,4),n,o,vr)},Bn.repeat=function(e,t,r){return t=(r?_a(e,t,r):t===n)?1:hs(t),Jr(ws(e),t)},Bn.replace=function(){var e=arguments,t=ws(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Bn.result=function(e,t,r){var o=-1,a=(t=_o(t,e)).length;for(a||(a=1,e=n);++o<a;){var i=null==e?n:e[La(t[o])];i===n&&(o=a,i=r),e=Zi(i)?i.call(e):i}return e},Bn.round=Su,Bn.runInContext=e,Bn.sample=function(e){return(Wi(e)?Zn:Zr)(e)},Bn.size=function(e){if(null==e)return 0;if(Qi(e))return ls(e)?pn(e):e.length;var t=ga(e);return t==I||t==R?e.size:zr(e).length},Bn.snakeCase=Ks,Bn.some=function(e,t,r){var o=Wi(e)?Lt:io;return r&&_a(e,t,r)&&(t=n),o(e,da(t,3))},Bn.sortedIndex=function(e,t){return so(e,t)},Bn.sortedIndexBy=function(e,t,n){return uo(e,t,da(n,2))},Bn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=so(e,t);if(r<n&&Bi(e[r],t))return r}return-1},Bn.sortedLastIndex=function(e,t){return so(e,t,!0)},Bn.sortedLastIndexBy=function(e,t,n){return uo(e,t,da(n,2),!0)},Bn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=so(e,t,!0)-1;if(Bi(e[n],t))return n}return-1},Bn.startCase=Ys,Bn.startsWith=function(e,t,n){return e=ws(e),n=null==n?0:lr(hs(n),0,e.length),t=fo(t),e.slice(n,n+t.length)==t},Bn.subtract=Iu,Bn.sum=function(e){return e&&e.length?Yt(e,au):0},Bn.sumBy=function(e,t){return e&&e.length?Yt(e,da(t,2)):0},Bn.template=function(e,t,r){var o=Bn.templateSettings;r&&_a(e,t,r)&&(t=n),e=ws(e),t=Es({},t,o,ta);var a,i,s=Es({},t.imports,o.imports,ta),u=Ns(s),l=en(s,u),c=0,d=t.interpolate||_e,f="__p += '",p=Re((t.escape||_e).source+"|"+d.source+"|"+(d===ee?me:_e).source+"|"+(t.evaluate||_e).source+"|$","g"),m="//# sourceURL="+(ze.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++st+"]")+"\n";e.replace(p,(function(t,n,r,o,s,u){return r||(r=o),f+=e.slice(c,u).replace(Ee,sn),n&&(a=!0,f+="' +\n__e("+n+") +\n'"),s&&(i=!0,f+="';\n"+s+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),c=u+t.length,t})),f+="';\n";var v=ze.call(t,"variable")&&t.variable;if(v){if(fe.test(v))throw new Ae("Invalid `variable` option passed into `_.template`")}else f="with (obj) {\n"+f+"\n}\n";f=(i?f.replace(G,""):f).replace(W,"$1").replace(H,"$1;"),f="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(a?", __e = _.escape":"")+(i?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var h=eu((function(){return ke(u,m+"return "+f).apply(n,l)}));if(h.source=f,Xi(h))throw h;return h},Bn.times=function(e,t){if((e=hs(e))<1||e>f)return[];var n=m,r=xn(e,m);t=da(t),e-=m;for(var o=Jt(r,t);++n<e;)t(n);return o},Bn.toFinite=vs,Bn.toInteger=hs,Bn.toLength=gs,Bn.toLower=function(e){return ws(e).toLowerCase()},Bn.toNumber=ys,Bn.toSafeInteger=function(e){return e?lr(hs(e),-f,f):0===e?e:0},Bn.toString=ws,Bn.toUpper=function(e){return ws(e).toUpperCase()},Bn.trim=function(e,t,r){if((e=ws(e))&&(r||t===n))return Xt(e);if(!e||!(t=fo(t)))return e;var o=mn(e),a=mn(t);return So(o,nn(o,a),rn(o,a)+1).join("")},Bn.trimEnd=function(e,t,r){if((e=ws(e))&&(r||t===n))return e.slice(0,vn(e)+1);if(!e||!(t=fo(t)))return e;var o=mn(e);return So(o,0,rn(o,mn(t))+1).join("")},Bn.trimStart=function(e,t,r){if((e=ws(e))&&(r||t===n))return e.replace(ie,"");if(!e||!(t=fo(t)))return e;var o=mn(e);return So(o,nn(o,mn(t))).join("")},Bn.truncate=function(e,t){var r=30,o="...";if(ns(t)){var a="separator"in t?t.separator:a;r="length"in t?hs(t.length):r,o="omission"in t?fo(t.omission):o}var i=(e=ws(e)).length;if(un(e)){var s=mn(e);i=s.length}if(r>=i)return e;var u=r-pn(o);if(u<1)return o;var l=s?So(s,0,u).join(""):e.slice(0,u);if(a===n)return l+o;if(s&&(u+=l.length-u),ss(a)){if(e.slice(u).search(a)){var c,d=l;for(a.global||(a=Re(a.source,ws(ve.exec(a))+"g")),a.lastIndex=0;c=a.exec(d);)var f=c.index;l=l.slice(0,f===n?u:f)}}else if(e.indexOf(fo(a),u)!=u){var p=l.lastIndexOf(a);p>-1&&(l=l.slice(0,p))}return l+o},Bn.unescape=function(e){return(e=ws(e))&&Y.test(e)?e.replace(Q,hn):e},Bn.uniqueId=function(e){var t=++Le;return ws(e)+t},Bn.upperCase=Js,Bn.upperFirst=Xs,Bn.each=wi,Bn.eachRight=xi,Bn.first=Qa,lu(Bn,function(){var e={};return _r(Bn,(function(t,n){ze.call(Bn.prototype,n)||(e[n]=t)})),e}(),{chain:!1}),Bn.VERSION="4.17.21",Pt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Bn[e].placeholder=Bn})),Pt(["drop","take"],(function(e,t){Wn.prototype[e]=function(r){r=r===n?1:wn(hs(r),0);var o=this.__filtered__&&!t?new Wn(this):this.clone();return o.__filtered__?o.__takeCount__=xn(r,o.__takeCount__):o.__views__.push({size:xn(r,m),type:e+(o.__dir__<0?"Right":"")}),o},Wn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Pt(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Wn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:da(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),Pt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Wn.prototype[e]=function(){return this[n](1).value()[0]}})),Pt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Wn.prototype[e]=function(){return this.__filtered__?new Wn(this):this[n](1)}})),Wn.prototype.compact=function(){return this.filter(au)},Wn.prototype.find=function(e){return this.filter(e).head()},Wn.prototype.findLast=function(e){return this.reverse().find(e)},Wn.prototype.invokeMap=Xr((function(e,t){return"function"==typeof e?new Wn(this):this.map((function(n){return Tr(n,e,t)}))})),Wn.prototype.reject=function(e){return this.filter(qi(da(e)))},Wn.prototype.slice=function(e,t){e=hs(e);var r=this;return r.__filtered__&&(e>0||t<0)?new Wn(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==n&&(r=(t=hs(t))<0?r.dropRight(-t):r.take(t-e)),r)},Wn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Wn.prototype.toArray=function(){return this.take(m)},_r(Wn.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),o=/^(?:head|last)$/.test(t),a=Bn[o?"take"+("last"==t?"Right":""):t],i=o||/^find/.test(t);a&&(Bn.prototype[t]=function(){var t=this.__wrapped__,s=o?[1]:arguments,u=t instanceof Wn,l=s[0],c=u||Wi(t),d=function(e){var t=a.apply(Bn,Dt([e],s));return o&&f?t[0]:t};c&&r&&"function"==typeof l&&1!=l.length&&(u=c=!1);var f=this.__chain__,p=!!this.__actions__.length,m=i&&!f,v=u&&!p;if(!i&&c){t=v?t:new Wn(this);var h=e.apply(t,s);return h.__actions__.push({func:vi,args:[d],thisArg:n}),new Gn(h,f)}return m&&v?e.apply(this,s):(h=this.thru(d),m?o?h.value()[0]:h.value():h)})})),Pt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Ne[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Bn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(Wi(o)?o:[],e)}return this[n]((function(n){return t.apply(Wi(n)?n:[],e)}))}})),_r(Wn.prototype,(function(e,t){var n=Bn[t];if(n){var r=n.name+"";ze.call(Nn,r)||(Nn[r]=[]),Nn[r].push({name:t,func:n})}})),Nn[Fo(n,2).name]=[{name:"wrapper",func:n}],Wn.prototype.clone=function(){var e=new Wn(this.__wrapped__);return e.__actions__=To(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=To(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=To(this.__views__),e},Wn.prototype.reverse=function(){if(this.__filtered__){var e=new Wn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Wn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Wi(e),r=t<0,o=n?e.length:0,a=function(e,t,n){for(var r=-1,o=n.length;++r<o;){var a=n[r],i=a.size;switch(a.type){case"drop":e+=i;break;case"dropRight":t-=i;break;case"take":t=xn(t,e+i);break;case"takeRight":e=wn(e,t-i)}}return{start:e,end:t}}(0,o,this.__views__),i=a.start,s=a.end,u=s-i,l=r?s:i-1,c=this.__iteratees__,d=c.length,f=0,p=xn(u,this.__takeCount__);if(!n||!r&&o==u&&p==u)return go(e,this.__actions__);var m=[];e:for(;u--&&f<p;){for(var v=-1,h=e[l+=t];++v<d;){var g=c[v],y=g.iteratee,b=g.type,w=y(h);if(2==b)h=w;else if(!w){if(1==b)continue e;break e}}m[f++]=h}return m},Bn.prototype.at=hi,Bn.prototype.chain=function(){return mi(this)},Bn.prototype.commit=function(){return new Gn(this.value(),this.__chain__)},Bn.prototype.next=function(){this.__values__===n&&(this.__values__=ms(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?n:this.__values__[this.__index__++]}},Bn.prototype.plant=function(e){for(var t,r=this;r instanceof Un;){var o=Va(r);o.__index__=0,o.__values__=n,t?a.__wrapped__=o:t=o;var a=o;r=r.__wrapped__}return a.__wrapped__=e,t},Bn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Wn){var t=e;return this.__actions__.length&&(t=new Wn(this)),(t=t.reverse()).__actions__.push({func:vi,args:[ni],thisArg:n}),new Gn(t,this.__chain__)}return this.thru(ni)},Bn.prototype.toJSON=Bn.prototype.valueOf=Bn.prototype.value=function(){return go(this.__wrapped__,this.__actions__)},Bn.prototype.first=Bn.prototype.head,nt&&(Bn.prototype[nt]=function(){return this}),Bn}();gt?((gt.exports=gn)._=gn,ht._=gn):vt._=gn}.call(rJ)),ev.exports;var e,t}oJ();const iJ={$user:"/:username","$user-post":"/:username/posts/:postId","$user-event":"/:username/events/:eventId","$user-channel":"/:username/channels/:channelId","$user-media":"/:username/media/:mediaId"},aJ={$group:"/g/:groupname","$group-post":"/g/:groupname/posts/:postId","$group-event":"/g/:groupname/events/:eventId","$group-forum-post":"/g/:groupname/forum/:postId","$group-forum-category":"/g/:groupname/forum/:categorySlug","$group-forum-category-post":"/g/:groupname/forum/:categorySlug/:postId","$group-forum-tag":"/g/:groupname/forum/tag/:tag","$group-channel":"/g/:groupname/:channelname","$group-channel-post":"/g/:groupname/:channelname/posts/:postId","$group-media":"/g/:groupname/media/:mediaId"},sJ={$root:"/",$tag:"/tags/:tag"},uJ=()=>{const e=Z$();if(!e)return;const{platformData:t}=e;return t.apps.flatMap((e=>e.paths.map((n=>({path:n.path,name:e.name,url:`${t.baseUrl}${e.baseUrl}index.html`,build:e.build,buildDate:e.buildDate})))))},lJ={...iJ,...aJ,...sJ},cJ=()=>{var e;const t=(null==(e=uJ())?void 0:e.filter((({path:e})=>e.startsWith("$")&&!e.includes("/")&&!lJ[e])))||[];t.length>0&&ap.warn("Unrecognized routes found:",t)};cJ();const dJ={path:"",history:[],transitionPath:"",confirmLeavePage:null};oo({name:"router",initialState:dJ,reducers:{},extraReducers:e=>{e.addCase(PH,((e,{payload:t})=>{e.confirmLeavePage=t})).addCase(TH,((e,{payload:t})=>{t!==e.transitionPath&&(e.transitionPath=t)})).addCase(AH,((e,{payload:t})=>{t!==e.path&&(e.path=t,e.history.unshift(t))}))},selectors:{selectPath:e=>e.path,selectPreviousRoute:e=>{const t=e.history.indexOf(e.path);return e.history[t+1]},selectTransitionPath:e=>e.transitionPath,selectConfirmLeavePage:e=>e.confirmLeavePage}}).injectInto(L3);const F3="Tabs",[fJ,wZ]=ni(F3,[qm]),B3=qm(),[bZ,oC]=fJ(F3),pJ="TabsList",mJ=v.forwardRef(((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=oC(pJ,n),i=B3(n);return v.createElement(y$,Pe({asChild:!0},i,{orientation:a.orientation,dir:a.dir,loop:r}),v.createElement(lt.div,Pe({role:"tablist","aria-orientation":a.orientation},o,{ref:t})))})),hJ="TabsTrigger",vJ=v.forwardRef(((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,i=oC(hJ,n),s=B3(n),u=j3(i.baseId,r),l=z3(i.baseId,r),c=r===i.value;return v.createElement(w$,Pe({asChild:!0},s,{focusable:!o,active:c}),v.createElement(lt.button,Pe({type:"button",role:"tab","aria-selected":c,"aria-controls":l,"data-state":c?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:u},a,{ref:t,onMouseDown:et(e.onMouseDown,(e=>{o||0!==e.button||!1!==e.ctrlKey?e.preventDefault():i.onValueChange(r)})),onKeyDown:et(e.onKeyDown,(e=>{[" ","Enter"].includes(e.key)&&i.onValueChange(r)})),onFocus:et(e.onFocus,(()=>{const e="manual"!==i.activationMode;!c&&!o&&e&&i.onValueChange(r)}))})))})),gJ="TabsContent",yJ=v.forwardRef(((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...i}=e,s=oC(gJ,n),u=j3(s.baseId,r),l=z3(s.baseId,r),c=r===s.value,d=v.useRef(c);return v.useEffect((()=>{const e=requestAnimationFrame((()=>d.current=!1));return()=>cancelAnimationFrame(e)}),[]),v.createElement(ea,{present:o||c},(({present:n})=>v.createElement(lt.div,Pe({"data-state":c?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":u,hidden:!n,id:l,tabIndex:0},i,{ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0}}),n&&a)))}));function j3(e,t){return`${e}-trigger-${t}`}function z3(e,t){return`${e}-content-${t}`}const V3=mJ,U3=vJ,W3=yJ,wJ=v.forwardRef((({className:e,useDefaults:t=!0,...n},r)=>G.jsx(V3,{ref:r,"data-testid":"tabsList",className:t?_e("inline-flex w-full items-center justify-start gap-s p-none text-muted-foreground","relative after:absolute after:bottom-0 after:left-0 after:h-[1px] after:w-full after:bg-gray-200",e):e,...n})));wJ.displayName=V3.displayName;const bJ=v.forwardRef((({className:e,children:t,isFullWidthTab:n,...r},o)=>G.jsx(U3,{ref:o,asChild:!0,className:e??_e("inline-flex items-center justify-center whitespace-nowrap text-base","z-2 transition-background h-m cursor-pointer focus-visible:outline-none","font-semibold focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50","group relative text-gray-500 hover:[&_svg]:fill-gray-900","after:absolute after:bottom-0 after:left-0 after:z-[1] after:h-0.5 after:w-full data-[state=active]:after:bg-gray-900",{"flex-1":n}),...r,children:t})));bJ.displayName=U3.displayName;const _J=v.forwardRef((({className:e,...t},n)=>G.jsx(W3,{ref:n,className:_e("ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t})));_J.displayName=W3.displayName;const xJ=v.forwardRef((({className:e,...t},n)=>G.jsx("table",{ref:n,className:_e("w-full caption-bottom text-sm",e),...t})));xJ.displayName="Table";const SJ=v.forwardRef((({className:e,...t},n)=>G.jsx("thead",{ref:n,className:_e("[&_tr]:border-b",e),...t})));SJ.displayName="TableHeader";const EJ=v.forwardRef((({className:e,...t},n)=>G.jsx("tbody",{ref:n,className:_e("[&_tr:last-child]:border-0",e),...t})));EJ.displayName="TableBody";const $J=v.forwardRef((({className:e,...t},n)=>G.jsx("tfoot",{ref:n,className:_e("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t})));$J.displayName="TableFooter";const CJ=v.forwardRef((({className:e,...t},n)=>G.jsx("tr",{ref:n,className:_e("border-b bg-background transition-colors hover:bg-gray-100 data-[state=selected]:bg-gray-200 dark:hover:bg-muted dark:data-[state=selected]:bg-muted","[&:hover_button[data-disabled]]:!bg-gray-200 [&:hover_button[disabled]]:!bg-gray-200",e),...t})));CJ.displayName="TableRow";const IJ=v.forwardRef((({className:e,...t},n)=>G.jsx("th",{ref:n,className:_e("h-14 bg-inherit px-xs py-xxs text-left align-middle font-normal text-muted-foreground","whitespace-nowrap text-sm text-gray-500",e),...t})));IJ.displayName="TableHead";const RJ=v.forwardRef((({className:e,...t},n)=>G.jsx("td",{ref:n,className:_e("h-14 bg-inherit p-xs py-xxs align-middle","overflow-hidden truncate text-ellipsis text-base text-gray-700",e),...t})));RJ.displayName="TableCell";const PJ=v.forwardRef((({className:e,...t},n)=>G.jsx("caption",{ref:n,className:_e("mt-s text-sm text-muted-foreground",e),...t})));PJ.displayName="TableCaption";const TJ=(e,t)=>_e("flex w-full rounded-m px-s py-xs text-base text-gray-900 outline outline-1 outline-input ring-offset-background transition-all duration-200 ease-in-out placeholder:inherit placeholder:text-gray-400 placeholder:text-muted-foreground hover:outline-2 hover:outline-gray-400 focus-visible:bg-gray-50 focus-visible:text-gray-900 focus-visible:outline-2 focus-visible:outline-blue_120 disabled:cursor-not-allowed disabled:select-none disabled:text-gray-300 disabled:outline-gray-200",{"bg-red_30_17 outline-red-dark":!!e},t),OJ=v.forwardRef((({className:e,...t},n)=>{const{error:r}=bd();return G.jsx("textarea",{className:TJ(!!r,e),ref:n,...t})}));OJ.displayName="Textarea";const AJ=v.createContext(void 0),MJ=()=>{const e=v.useContext(AJ);if(!e)throw new Error("useColorPicker must be used within a ColorPickerProvider");return e},DJ=v.memo((({className:e,...t})=>{const n=v.useRef(null),[r,o]=v.useState(!1),[a,i]=v.useState(0),[s,u]=v.useState(0),{hue:l,saturation:c,lightness:d,setSaturation:f,setLightness:p}=MJ(),m=v.useMemo((()=>`linear-gradient(0deg, rgba(0,0,0,1), rgba(0,0,0,0)),\n linear-gradient(90deg, rgba(255,255,255,1), rgba(255,255,255,0)),\n hsl(${l}, 100%, 50%)`),[l]);v.useEffect((()=>{if(!r){const e=c/100,t=e<.01?100:50+50*(1-e),n=t>0?1-d/t:0;i(Math.max(0,Math.min(1,e))),u(Math.max(0,Math.min(1,n)))}}),[c,d,r]);const h=v.useCallback(((e,t)=>{if(!n.current)return;const r=n.current.getBoundingClientRect(),o=Math.max(0,Math.min(1,(e-r.left)/r.width)),a=Math.max(0,Math.min(1,(t-r.top)/r.height));i(o),u(a),f(100*o);p((o<.01?100:50+50*(1-o))*(1-a))}),[f,p]),g=v.useCallback((e=>{r&&h(e.clientX,e.clientY)}),[r,h]);return v.useEffect((()=>{const e=()=>o(!1);return r&&(window.addEventListener("pointermove",g),window.addEventListener("pointerup",e)),()=>{window.removeEventListener("pointermove",g),window.removeEventListener("pointerup",e)}}),[r,g]),G.jsx("div",{className:_e("relative size-full cursor-crosshair rounded",e),onPointerDown:e=>{e.preventDefault(),o(!0),h(e.clientX,e.clientY)},ref:n,style:{background:m},...t,children:G.jsx("div",{className:"pointer-events-none absolute h-4 w-4 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white",style:{left:100*a+"%",top:100*s+"%",boxShadow:"0 0 0 1px rgba(0,0,0,0.5)"}})})}));DJ.displayName="ColorPickerSelection";const NJ=gu("z-tooltip animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 relative data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",{variants:{size:{default:"rounded-md text-sm px-3 py-1.5",small:"rounded-sm p-xxs text-sm"},theme:{default:"bg-popover text-popover-foreground",dark:"bg-gray-800 text-gray-50 [&_svg]:fill-gray-700"},defaultVariants:{size:"small",theme:"dark"}}}),kJ=v.forwardRef((({className:e,sideOffset:t=1,size:n,theme:r,children:o,isPortal:a=!0,withArrow:i=!0,...s},u)=>{const l=G.jsx(G.Fragment,{children:G.jsxs(qk,{ref:u,sideOffset:t,className:_e(NJ({size:n,theme:r,className:e})),...s,children:[o,i&&G.jsxs(G.Fragment,{children:[G.jsx($H,{height:4,width:8}),G.jsx("div",{className:"absolute bottom-0 left-0 h-full w-full rounded-sm border border-gray-700"})]})]})});return a?G.jsx(EH,{children:l}):l}));kJ.displayName=qk.displayName;var kO,qg={exports:{}},LJ=qg.exports;function FJ(){return kO||(kO=1,qg.exports=function(){var e=1e3,t=6e4,n=36e5,r="millisecond",o="second",a="minute",i="hour",s="day",u="week",l="month",c="quarter",d="year",f="date",p="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|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,h={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(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}},g=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},y={s:g,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),o=n%60;return(t<=0?"+":"-")+g(r,2,"0")+":"+g(o,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),o=t.clone().add(r,l),a=n-o<0,i=t.clone().add(r+(a?-1:1),l);return+(-(r+(n-o)/(a?o-i:i-o))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:d,w:u,d:s,D:f,h:i,m:a,s:o,ms:r,Q:c}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},b="en",w={};w[b]=h;var x="$isDayjsObject",_=function(e){return e instanceof A||!(!e||!e[x])},E=function e(t,n,r){var o;if(!t)return b;if("string"==typeof t){var a=t.toLowerCase();w[a]&&(o=a),n&&(w[a]=n,o=a);var i=t.split("-");if(!o&&i.length>1)return e(i[0])}else{var s=t.name;w[s]=t,o=s}return!r&&o&&(b=o),o||!r&&b},S=function(e,t){if(_(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new A(n)},I=y;I.l=E,I.i=_,I.w=function(e,t){return S(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var A=function(){function h(e){this.$L=E(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var g=h.prototype;return g.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(I.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(m);if(r){var o=r[2]-1||0,a=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},g.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},g.$utils=function(){return I},g.isValid=function(){return this.$d.toString()!==p},g.isSame=function(e,t){var n=S(e);return this.startOf(t)<=n&&n<=this.endOf(t)},g.isAfter=function(e,t){return S(e)<this.startOf(t)},g.isBefore=function(e,t){return this.endOf(t)<S(e)},g.$g=function(e,t,n){return I.u(e)?this[t]:this.set(n,e)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(e,t){var n=this,r=!!I.u(t)||t,c=I.p(e),p=function(e,t){var o=I.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?o:o.endOf(s)},m=function(e,t){return I.w(n.toDate()[e].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},v=this.$W,h=this.$M,g=this.$D,y="set"+(this.$u?"UTC":"");switch(c){case d:return r?p(1,0):p(31,11);case l:return r?p(1,h):p(0,h+1);case u:var b=this.$locale().weekStart||0,w=(v<b?v+7:v)-b;return p(r?g-w:g+(6-w),h);case s:case f:return m(y+"Hours",0);case i:return m(y+"Minutes",1);case a:return m(y+"Seconds",2);case o:return m(y+"Milliseconds",3);default:return this.clone()}},g.endOf=function(e){return this.startOf(e,!1)},g.$set=function(e,t){var n,u=I.p(e),c="set"+(this.$u?"UTC":""),p=(n={},n[s]=c+"Date",n[f]=c+"Date",n[l]=c+"Month",n[d]=c+"FullYear",n[i]=c+"Hours",n[a]=c+"Minutes",n[o]=c+"Seconds",n[r]=c+"Milliseconds",n)[u],m=u===s?this.$D+(t-this.$W):t;if(u===l||u===d){var v=this.clone().set(f,1);v.$d[p](m),v.init(),this.$d=v.set(f,Math.min(this.$D,v.daysInMonth())).$d}else p&&this.$d[p](m);return this.init(),this},g.set=function(e,t){return this.clone().$set(e,t)},g.get=function(e){return this[I.p(e)]()},g.add=function(r,c){var f,p=this;r=Number(r);var m=I.p(c),v=function(e){var t=S(p);return I.w(t.date(t.date()+Math.round(e*r)),p)};if(m===l)return this.set(l,this.$M+r);if(m===d)return this.set(d,this.$y+r);if(m===s)return v(1);if(m===u)return v(7);var h=(f={},f[a]=t,f[i]=n,f[o]=e,f)[m]||1,g=this.$d.getTime()+r*h;return I.w(g,this)},g.subtract=function(e,t){return this.add(-1*e,t)},g.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=e||"YYYY-MM-DDTHH:mm:ssZ",o=I.z(this),a=this.$H,i=this.$m,s=this.$M,u=n.weekdays,l=n.months,c=n.meridiem,d=function(e,n,o,a){return e&&(e[n]||e(t,r))||o[n].slice(0,a)},f=function(e){return I.s(a%12||12,e,"0")},m=c||function(e,t,n){var r=e<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(v,(function(e,r){return r||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return I.s(t.$y,4,"0");case"M":return s+1;case"MM":return I.s(s+1,2,"0");case"MMM":return d(n.monthsShort,s,l,3);case"MMMM":return d(l,s);case"D":return t.$D;case"DD":return I.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return d(n.weekdaysMin,t.$W,u,2);case"ddd":return d(n.weekdaysShort,t.$W,u,3);case"dddd":return u[t.$W];case"H":return String(a);case"HH":return I.s(a,2,"0");case"h":return f(1);case"hh":return f(2);case"a":return m(a,i,!0);case"A":return m(a,i,!1);case"m":return String(i);case"mm":return I.s(i,2,"0");case"s":return String(t.$s);case"ss":return I.s(t.$s,2,"0");case"SSS":return I.s(t.$ms,3,"0");case"Z":return o}return null}(e)||o.replace(":","")}))},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(r,f,p){var m,v=this,h=I.p(f),g=S(r),y=(g.utcOffset()-this.utcOffset())*t,b=this-g,w=function(){return I.m(v,g)};switch(h){case d:m=w()/12;break;case l:m=w();break;case c:m=w()/3;break;case u:m=(b-y)/6048e5;break;case s:m=(b-y)/864e5;break;case i:m=b/n;break;case a:m=b/t;break;case o:m=b/e;break;default:m=b}return p?m:I.a(m)},g.daysInMonth=function(){return this.endOf(l).$D},g.$locale=function(){return w[this.$L]},g.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=E(e,t,!0);return r&&(n.$L=r),n},g.clone=function(){return I.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},h}(),k=A.prototype;return S.prototype=k,[["$ms",r],["$s",o],["$m",a],["$H",i],["$W",s],["$M",l],["$y",d],["$D",f]].forEach((function(e){k[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),S.extend=function(e,t){return e.$i||(e(t,A,S),e.$i=!0),S},S.locale=E,S.isDayjs=_,S.unix=function(e){return S(1e3*e)},S.en=w[b],S.Ls=w,S.p={},S}()),qg.exports}FJ();const uE="horizontal",BJ=["horizontal","vertical"],iC=v.forwardRef(((e,t)=>{const{decorative:n,orientation:r=uE,...o}=e,a=q3(r)?r:uE,i=n?{role:"none"}:{"aria-orientation":"vertical"===a?a:void 0,role:"separator"};return v.createElement(lt.div,Pe({"data-orientation":a},i,o,{ref:t}))}));function jJ(e,t){return`Invalid prop \`orientation\` of value \`${e}\` supplied to \`${t}\`, expected one of:\n - horizontal\n - vertical\n\nDefaulting to \`${uE}\`.`}function q3(e){return BJ.includes(e)}iC.propTypes={orientation(e,t,n){const r=e[t],o=String(r);return r&&!q3(r)?new Error(jJ(o,n)):null}};const zJ=gu("\n shrink-0 bg-gray-200\n data-[orientation=horizontal]:h-px data-[orientation=horizontal]:my-xxs\n data-[orientation=vertical]:w-px data-[orientation=vertical]:mx-xxs\n ",{variants:{size:{xs:"data-[orientation=horizontal]:w-4 data-[orientation=vertical]:h-4",s:"data-[orientation=horizontal]:w-6 data-[orientation=vertical]:h-6",m:"data-[orientation=horizontal]:w-8 data-[orientation=vertical]:h-8",l:"data-[orientation=horizontal]:w-10 data-[orientation=vertical]:h-10"}},defaultVariants:{size:"s"}}),VJ=v.forwardRef((({className:e,size:t,...n},r)=>G.jsx(iC,{ref:r,className:_e(zJ({size:t,className:e})),...n})));VJ.displayName=iC.displayName;const UJ="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI3BhaW50MF9hbmd1bGFyXzExMTY1XzE4NjcxX2NsaXBfcGF0aCkiIGRhdGEtZmlnbWEtc2tpcC1wYXJzZT0idHJ1ZSI+PGcgdHJhbnNmb3JtPSJtYXRyaXgoMCAwLjAxMiAtMC4wMTIgMCAxMiAxMikiPjxmb3JlaWduT2JqZWN0IHg9Ii0xMDY2LjI0IiB5PSItMTA2Ni4yNCIgd2lkdGg9IjIxMzIuNDkiIGhlaWdodD0iMjEzMi40OSI+PGRpdiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94aHRtbCIgc3R5bGU9ImJhY2tncm91bmQ6Y29uaWMtZ3JhZGllbnQoZnJvbSA5MGRlZyxyZ2JhKDI1NSwgMjU1LCAyNTUsIDEpIDBkZWcscmdiYSgyNTUsIDI1NSwgMjU1LCAxKSA2My4yNDNkZWcscmdiYSgyNTUsIDI1NSwgMjU1LCAwKSAzNjBkZWcpO2hlaWdodDoxMDAlO3dpZHRoOjEwMCU7b3BhY2l0eToxIj48L2Rpdj48L2ZvcmVpZ25PYmplY3Q+PC9nPjwvZz48cGF0aCBkPSJNMjQgMTJDMjQgMTguNjI3NCAxOC42Mjc0IDI0IDEyIDI0QzUuMzcyNTggMjQgMCAxOC42Mjc0IDAgMTJDMCA1LjM3MjU4IDUuMzcyNTggMCAxMiAwQzE4LjYyNzQgMCAyNCA1LjM3MjU4IDI0IDEyWk0zLjU4ODMyIDEyQzMuNTg4MzIgMTYuNjQ1NiA3LjM1NDM2IDIwLjQxMTcgMTIgMjAuNDExN0MxNi42NDU2IDIwLjQxMTcgMjAuNDExNyAxNi42NDU2IDIwLjQxMTcgMTJDMjAuNDExNyA3LjM1NDM2IDE2LjY0NTYgMy41ODgzMiAxMiAzLjU4ODMyQzcuMzU0MzYgMy41ODgzMiAzLjU4ODMyIDcuMzU0MzYgMy41ODgzMiAxMloiIGRhdGEtZmlnbWEtZ3JhZGllbnQtZmlsbD0ieyYjMzQ7dHlwZSYjMzQ7OiYjMzQ7R1JBRElFTlRfQU5HVUxBUiYjMzQ7LCYjMzQ7c3RvcHMmIzM0OzpbeyYjMzQ7Y29sb3ImIzM0Ozp7JiMzNDtyJiMzNDs6MS4wLCYjMzQ7ZyYjMzQ7OjEuMCwmIzM0O2ImIzM0OzoxLjAsJiMzNDthJiMzNDs6MS4wfSwmIzM0O3Bvc2l0aW9uJiMzNDs6MC4wfSx7JiMzNDtjb2xvciYjMzQ7OnsmIzM0O3ImIzM0OzoxLjAsJiMzNDtnJiMzNDs6MS4wLCYjMzQ7YiYjMzQ7OjEuMCwmIzM0O2EmIzM0OzoxLjB9LCYjMzQ7cG9zaXRpb24mIzM0OzowLjE3NTY3NTAwNDcyMDY4Nzg3fSx7JiMzNDtjb2xvciYjMzQ7OnsmIzM0O3ImIzM0OzoxLjAsJiMzNDtnJiMzNDs6MS4wLCYjMzQ7YiYjMzQ7OjEuMCwmIzM0O2EmIzM0OzowLjB9LCYjMzQ7cG9zaXRpb24mIzM0OzoxLjB9XSwmIzM0O3N0b3BzVmFyJiMzNDs6W3smIzM0O2NvbG9yJiMzNDs6eyYjMzQ7ciYjMzQ7OjEuMCwmIzM0O2cmIzM0OzoxLjAsJiMzNDtiJiMzNDs6MS4wLCYjMzQ7YSYjMzQ7OjEuMH0sJiMzNDtwb3NpdGlvbiYjMzQ7OjAuMH0seyYjMzQ7Y29sb3ImIzM0Ozp7JiMzNDtyJiMzNDs6MS4wLCYjMzQ7ZyYjMzQ7OjEuMCwmIzM0O2ImIzM0OzoxLjAsJiMzNDthJiMzNDs6MS4wfSwmIzM0O3Bvc2l0aW9uJiMzNDs6MC4xNzU2NzUwMDQ3MjA2ODc4N30seyYjMzQ7Y29sb3ImIzM0Ozp7JiMzNDtyJiMzNDs6MS4wLCYjMzQ7ZyYjMzQ7OjEuMCwmIzM0O2ImIzM0OzoxLjAsJiMzNDthJiMzNDs6MC4wfSwmIzM0O3Bvc2l0aW9uJiMzNDs6MS4wfV0sJiMzNDt0cmFuc2Zvcm0mIzM0Ozp7JiMzNDttMDAmIzM0OzoxLjQ2OTU3NjIyMzEwMjIwMTRlLTE1LCYjMzQ7bTAxJiMzNDs6LTI0LjAsJiMzNDttMDImIzM0OzoyNC4wLCYjMzQ7bTEwJiMzNDs6MjQuMCwmIzM0O20xMSYjMzQ7OjEuNDY5NTc2MjIzMTAyMjAxNGUtMTUsJiMzNDttMTImIzM0OzotMS40Njk1NzYyMjMxMDIyMDE0ZS0xNX0sJiMzNDtvcGFjaXR5JiMzNDs6MS4wLCYjMzQ7YmxlbmRNb2RlJiMzNDs6JiMzNDtOT1JNQUwmIzM0OywmIzM0O3Zpc2libGUmIzM0Ozp0cnVlfSIvPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJwYWludDBfYW5ndWxhcl8xMTE2NV8xODY3MV9jbGlwX3BhdGgiPjxwYXRoIGQ9Ik0yNCAxMkMyNCAxOC42Mjc0IDE4LjYyNzQgMjQgMTIgMjRDNS4zNzI1OCAyNCAwIDE4LjYyNzQgMCAxMkMwIDUuMzcyNTggNS4zNzI1OCAwIDEyIDBDMTguNjI3NCAwIDI0IDUuMzcyNTggMjQgMTJaTTMuNTg4MzIgMTJDMy41ODgzMiAxNi42NDU2IDcuMzU0MzYgMjAuNDExNyAxMiAyMC40MTE3QzE2LjY0NTYgMjAuNDExNyAyMC40MTE3IDE2LjY0NTYgMjAuNDExNyAxMkMyMC40MTE3IDcuMzU0MzYgMTYuNjQ1NiAzLjU4ODMyIDEyIDMuNTg4MzJDNy4zNTQzNiAzLjU4ODMyIDMuNTg4MzIgNy4zNTQzNiAzLjU4ODMyIDEyWiIvPjwvY2xpcFBhdGg+PC9kZWZzPgo8L3N2Zz4K",WJ=e=>{switch(!0){case"success"===e:return G.jsx(F5,{color:"white"});case"error"===e:return G.jsx(yE,{color:"white"});case"loading"===e:return G.jsx("img",{src:UJ,className:"animate-forward animate-spin [animation-direction:reverse]"});default:return null}},qJ={toastsSizes:{}},G3=oo({name:"systemToast",initialState:qJ,reducers:{addToastSize(e,t){const{id:n,size:r}=t.payload;e.toastsSizes[n]=r},removeToastSize(e,t){delete e.toastsSizes[t.payload]}},selectors:{selectToastSize:e=>Math.max(0,...Object.values(e.toastsSizes))}}).injectInto(L3),{addToastSize:GJ,removeToastSize:HJ}=G3.actions,{selectToastSize:KJ}=G3.selectors,YJ=e=>{const{title:t,actionButton:n,id:r,type:o,promise:a,dismiss:i}=e,s=vE(),u=vy(KJ),[l,c]=v.useState(o),[d,f]=v.useState("loading"===o),p=v.useRef(null),m=WJ(d?"loading":l);v.useEffect((()=>{var e;s(GJ({id:`${r}`,size:(null==(e=p.current)?void 0:e.offsetWidth)??0}))}),[d]),v.useEffect((()=>()=>{s(HJ(`${r}`))}),[]),v.useEffect((()=>{if(!a)return;let e=!1;return f(!0),a.then((()=>c("success"))).catch((()=>c("error"))).finally((()=>{e||f(!1)})),()=>{e=!0}}),[a]);return G.jsxs("div",{ref:p,onClick:()=>{n||i(r)},style:{minWidth:u},"data-testid":"toast-container",className:_e("gap-xs px-xs flex min-h-[56px] w-full items-center rounded-lg bg-gray-800",{"bg-red-dark":"error"===l,"border border-gray-700":"success"===l,"cursor-pointer":!n}),children:[m,G.jsx("p",{dangerouslySetInnerHTML:{__html:t},className:"text-base font-medium text-white"}),n&&G.jsx("button",{className:"h-s px-xs rounded-sm bg-gray-500 text-sm",onClick:()=>{n.onClick(),i(r)},children:n.label})]})},vS=(e,t)=>RS.custom((n=>G.jsx(YJ,{id:n,dismiss:RS.dismiss,...e,actionButton:null==t?void 0:t.actionButton})),{dismissible:!0,duration:S5(e),toasterId:"system-bottom-toaster",...t}),gS={success:(e,t)=>vS({type:"success",title:e},t),error:(e,t)=>vS({type:"error",title:e},t),loading:(e,t)=>vS({type:"loading",title:e},t),dismiss:e=>RS.dismiss(e)};function _Z(){const e=vE(),t=v.useRef(null);function n(){t.current&&(gS.dismiss(t.current),t.current=null)}uO("online",(()=>{e(Kg.actions.setOnline(!0)),n(),t.current=gS.success("Connection restored")})),uO("offline",(()=>{e(Kg.actions.setOnline(!1)),n(),t.current=gS.error("Your network is unavailable")}))}const xZ=()=>vy(Kg.selectors.selectOnline);export{Kg as networkSlice,xZ as useIsOnline,_Z as useNetworkStatusListener};