@wellesley/notifications 1.0.786 → 1.0.787
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.mjs +2 -2
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var DH=Object.defineProperty,jH=(e,t,r)=>t in e?DH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,An=(e,t,r)=>jH(e,"symbol"!=typeof t?t+"":t,r);function LH(e,t){for(var r=0;r<t.length;r++){const n=t[r];if("string"!=typeof n&&!Array.isArray(n))for(const t in n)if("default"!==t&&!(t in e)){const r=Object.getOwnPropertyDescriptor(n,t);r&&Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:()=>n[t]})}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function _C(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 Kx=()=>Math.random().toString(36).substring(7).split("").join("."),VH={INIT:`@@redux/INIT${Kx()}`,REPLACE:`@@redux/REPLACE${Kx()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Kx()}`},R9=VH;function mp(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 BH(e){Object.keys(e).forEach((t=>{const r=e[t];if(typeof r(void 0,{type:R9.INIT})>"u")throw new Error(_C(12));if(typeof r(void 0,{type:R9.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(_C(13))}))}function qj(e){const t=Object.keys(e),r={};for(let n=0;n<t.length;n++){const a=t[n];"function"==typeof e[a]&&(r[a]=e[a])}const n=Object.keys(r);let a;try{BH(r)}catch(e){a=e}return function(e={},t){if(a)throw a;let o=!1;const i={};for(let a=0;a<n.length;a++){const s=n[a],l=r[s],c=e[s],u=l(c,t);if(typeof u>"u")throw t&&t.type,new Error(_C(14));i[s]=u,o=o||u!==c}return o=o||n.length!==Object.keys(e).length,o?i:e}}function Wj(e){return mp(e)&&"type"in e&&"string"==typeof e.type}var iA=Symbol.for("immer-nothing"),zy=Symbol.for("immer-draftable"),Is=Symbol.for("immer-state");function uo(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var im=Object.getPrototypeOf;function qc(e){return!!e&&!!e[Is]}function Wc(e){var t;return!!e&&(Hj(e)||Array.isArray(e)||!!e[zy]||!(null==(t=e.constructor)||!t[zy])||zv(e)||Mv(e))}var FH=Object.prototype.constructor.toString();function Hj(e){if(!e||"object"!=typeof e)return!1;const t=im(e);if(null===t)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object||"function"==typeof r&&Function.toString.call(r)===FH}function UH(e){return qc(e)||uo(15,e),e[Is].base_}function _0(e,t){0===cm(e)?Object.entries(e).forEach((([r,n])=>{t(r,n,e)})):e.forEach(((r,n)=>t(n,r,e)))}function cm(e){const t=e[Is];return t?t.type_:Array.isArray(e)?1:zv(e)?2:Mv(e)?3:0}function Qy(e,t){return 2===cm(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Xx(e,t){return 2===cm(e)?e.get(t):e[t]}function Qj(e,t,r){const n=cm(e);2===n?e.set(t,r):3===n?e.add(r):e[t]=r}function GH(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function zv(e){return e instanceof Map}function Mv(e){return e instanceof Set}function Qh(e){return e.copy_||e.base_}function kC(e,t){if(zv(e))return new Map(e);if(Mv(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&Hj(e))return im(e)?{...e}:Object.assign(Object.create(null),e);const r=Object.getOwnPropertyDescriptors(e);delete r[Is];let n=Reflect.ownKeys(r);for(let t=0;t<n.length;t++){const a=n[t],o=r[a];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(r[a]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[a]})}return Object.create(im(e),r)}function cA(e,t=!1){return Z_(e)||qc(e)||!Wc(e)||(cm(e)>1&&(e.set=e.add=e.clear=e.delete=qH),Object.freeze(e),t&&_0(e,((e,t)=>cA(t,!0)))),e}function qH(){uo(2)}function Z_(e){return Object.isFrozen(e)}var Yy,xC={};function lm(e){const t=xC[e];return t||uo(0,e),t}function WH(e,t){xC[e]||(xC[e]=t)}function Yj(){return Yy}function HH(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function T9(e,t){t&&(lm("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function SC(e){EC(e),e.drafts_.forEach(QH),e.drafts_=null}function EC(e){e===Yy&&(Yy=e.parent_)}function P9(e){return Yy=HH(Yy,e)}function QH(e){const t=e[Is];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function $9(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return void 0!==e&&e!==r?(r[Is].modified_&&(SC(t),uo(4)),Wc(e)&&(e=Jw(t,e),t.parent_||e_(t,e)),t.patches_&&lm("Patches").generateReplacementPatches_(r[Is].base_,e,t.patches_,t.inversePatches_)):e=Jw(t,r,[]),SC(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==iA?e:void 0}function Jw(e,t,r){if(Z_(t))return t;const n=t[Is];if(!n)return _0(t,((a,o)=>z9(e,n,t,a,o,r))),t;if(n.scope_!==e)return t;if(!n.modified_)return e_(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;const t=n.copy_;let a=t,o=!1;3===n.type_&&(a=new Set(t),t.clear(),o=!0),_0(a,((a,i)=>z9(e,n,t,a,i,r,o))),e_(e,t,!1),r&&e.patches_&&lm("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function z9(e,t,r,n,a,o,i){if(qc(a)){const i=Jw(e,a,o&&t&&3!==t.type_&&!Qy(t.assigned_,n)?o.concat(n):void 0);if(Qj(r,n,i),!qc(i))return;e.canAutoFreeze_=!1}else i&&r.add(a);if(Wc(a)&&!Z_(a)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Jw(e,a),(!t||!t.scope_.parent_)&&e_(e,a)}}function e_(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&cA(t,r)}function YH(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:Yj(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let a=n,o=lA;r&&(a=[n],o=Ky);const{revoke:i,proxy:s}=Proxy.revocable(a,o);return n.draft_=s,n.revoke_=i,s}var lA={get(e,t){if(t===Is)return e;const r=Qh(e);if(!Qy(r,t))return KH(e,r,t);const n=r[t];return e.finalized_||!Wc(n)?n:n===Zx(e.base_,t)?(Jx(e),e.copy_[t]=IC(n,e)):n},has:(e,t)=>t in Qh(e),ownKeys:e=>Reflect.ownKeys(Qh(e)),set(e,t,r){const n=Kj(Qh(e),t);if(null!=n&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const n=Zx(Qh(e),t),a=null==n?void 0:n[Is];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(GH(r,n)&&(void 0!==r||Qy(e.base_,t)))return!0;Jx(e),CC(e)}return e.copy_[t]===r&&(void 0!==r||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==Zx(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,Jx(e),CC(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const r=Qh(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:n.enumerable,value:r[t]}},defineProperty(){uo(11)},getPrototypeOf:e=>im(e.base_),setPrototypeOf(){uo(12)}},Ky={};function Zx(e,t){const r=e[Is];return(r?Qh(r):e)[t]}function KH(e,t,r){var n;const a=Kj(t,r);return a?"value"in a?a.value:null==(n=a.get)?void 0:n.call(e.draft_):void 0}function Kj(e,t){if(!(t in e))return;let r=im(e);for(;r;){const e=Object.getOwnPropertyDescriptor(r,t);if(e)return e;r=im(r)}}function CC(e){e.modified_||(e.modified_=!0,e.parent_&&CC(e.parent_))}function Jx(e){e.copy_||(e.copy_=kC(e.base_,e.scope_.immer_.useStrictShallowCopy_))}_0(lA,((e,t)=>{Ky[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Ky.deleteProperty=function(e,t){return Ky.set.call(this,e,t,void 0)},Ky.set=function(e,t,r){return lA.set.call(this,e[0],t,r,e[0])};var XH=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,r)=>{if("function"==typeof e&&"function"!=typeof t){const r=t;t=e;const n=this;return function(e=r,...a){return n.produce(e,(e=>t.call(this,e,...a)))}}let n;if("function"!=typeof t&&uo(6),void 0!==r&&"function"!=typeof r&&uo(7),Wc(e)){const a=P9(this),o=IC(e,void 0);let i=!0;try{n=t(o),i=!1}finally{i?SC(a):EC(a)}return T9(a,r),$9(n,a)}if(!e||"object"!=typeof e){if(n=t(e),void 0===n&&(n=e),n===iA&&(n=void 0),this.autoFreeze_&&cA(n,!0),r){const t=[],a=[];lm("Patches").generateReplacementPatches_(e,n,t,a),r(t,a)}return n}uo(1,e)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...r)=>this.produceWithPatches(t,(t=>e(t,...r)));let r,n;return[this.produce(e,t,((e,t)=>{r=e,n=t})),r,n]},"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){Wc(e)||uo(8),qc(e)&&(e=Xj(e));const t=P9(this),r=IC(e,void 0);return r[Is].isManual_=!0,EC(t),r}finishDraft(e,t){const r=e&&e[Is];(!r||!r.isManual_)&&uo(9);const{scope_:n}=r;return T9(n,t),$9(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const n=t[r];if(0===n.path.length&&"replace"===n.op){e=n.value;break}}r>-1&&(t=t.slice(r+1));const n=lm("Patches").applyPatches_;return qc(e)?n(e,t):this.produce(e,(e=>n(e,t)))}};function IC(e,t){const r=zv(e)?lm("MapSet").proxyMap_(e,t):Mv(e)?lm("MapSet").proxySet_(e,t):YH(e,t);return(t?t.scope_:Yj()).drafts_.push(r),r}function Xj(e){return qc(e)||uo(10,e),Zj(e)}function Zj(e){if(!Wc(e)||Z_(e))return e;const t=e[Is];let r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=kC(e,t.scope_.immer_.useStrictShallowCopy_)}else r=kC(e,!0);return _0(r,((e,t)=>{Qj(r,e,Zj(t))})),t&&(t.finalized_=!1),r}function ZH(){const e="replace",t="remove";function r(e){if(!Wc(e))return e;if(Array.isArray(e))return e.map(r);if(zv(e))return new Map(Array.from(e.entries()).map((([e,t])=>[e,r(t)])));if(Mv(e))return new Set(Array.from(e).map(r));const t=Object.create(im(e));for(const n in e)t[n]=r(e[n]);return Qy(e,zy)&&(t[zy]=e[zy]),t}function n(e){return qc(e)?r(e):e}WH("Patches",{applyPatches_:function(n,a){return a.forEach((a=>{const{path:o,op:i}=a;let s=n;for(let e=0;e<o.length-1;e++){const t=cm(s);let r=o[e];"string"!=typeof r&&"number"!=typeof r&&(r=""+r),(0===t||1===t)&&("__proto__"===r||"constructor"===r)&&uo(19),"function"==typeof s&&"prototype"===r&&uo(19),s=Xx(s,r),"object"!=typeof s&&uo(18,o.join("/"))}const l=cm(s),c=r(a.value),u=o[o.length-1];switch(i){case e:switch(l){case 2:return s.set(u,c);case 3:uo(16);default:return s[u]=c}case"add":switch(l){case 1:return"-"===u?s.push(c):s.splice(u,0,c);case 2:return s.set(u,c);case 3:return s.add(c);default:return s[u]=c}case t:switch(l){case 1:return s.splice(u,1);case 2:return s.delete(u);case 3:return s.delete(a.value);default:return delete s[u]}default:uo(17,i)}})),n},generatePatches_:function(r,a,o,i){switch(r.type_){case 0:case 2:return function(r,a,o,i){const{base_:s,copy_:l}=r;_0(r.assigned_,((r,c)=>{const u=Xx(s,r),f=Xx(l,r),d=c?Qy(s,r)?e:"add":t;if(u===f&&d===e)return;const p=a.concat(r);o.push(d===t?{op:d,path:p}:{op:d,path:p,value:f}),i.push("add"===d?{op:t,path:p}:d===t?{op:"add",path:p,value:n(u)}:{op:e,path:p,value:n(u)})}))}(r,a,o,i);case 1:return function(r,a,o,i){let{base_:s,assigned_:l}=r,c=r.copy_;c.length<s.length&&([s,c]=[c,s],[o,i]=[i,o]);for(let t=0;t<s.length;t++)if(l[t]&&c[t]!==s[t]){const r=a.concat([t]);o.push({op:e,path:r,value:n(c[t])}),i.push({op:e,path:r,value:n(s[t])})}for(let e=s.length;e<c.length;e++){const t=a.concat([e]);o.push({op:"add",path:t,value:n(c[e])})}for(let e=c.length-1;s.length<=e;--e){const r=a.concat([e]);i.push({op:t,path:r})}}(r,a,o,i);case 3:return function(e,r,n,a){let{base_:o,copy_:i}=e,s=0;o.forEach((e=>{if(!i.has(e)){const o=r.concat([s]);n.push({op:t,path:o,value:e}),a.unshift({op:"add",path:o,value:e})}s++})),s=0,i.forEach((e=>{if(!o.has(e)){const o=r.concat([s]);n.push({op:"add",path:o,value:e}),a.unshift({op:t,path:o,value:e})}s++}))}(r,a,o,i)}},generateReplacementPatches_:function(t,r,n,a){n.push({op:e,path:[],value:r===iA?void 0:r}),a.push({op:e,path:[],value:t})}})}var oi=new XH,Ov=oi.produce,Jj=oi.produceWithPatches.bind(oi);oi.setAutoFreeze.bind(oi),oi.setUseStrictShallowCopy.bind(oi);var M9=oi.applyPatches.bind(oi);function JH(e,t="expected a function, instead received "+typeof e){if("function"!=typeof e)throw new TypeError(t)}function eQ(e,t="expected an object, instead received "+typeof e){if("object"!=typeof e)throw new TypeError(t)}function tQ(e,t="expected all items to be functions, instead received the following types: "){if(!e.every((e=>"function"==typeof e))){const r=e.map((e=>"function"==typeof e?`function ${e.name||"unnamed"}()`:typeof e)).join(", ");throw new TypeError(`${t}[${r}]`)}}oi.createDraft.bind(oi),oi.finishDraft.bind(oi);var O9=e=>Array.isArray(e)?e:[e];function nQ(e){const t=Array.isArray(e[0])?e[0]:e;return tQ(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function rQ(e,t){const r=[],{length:n}=e;for(let a=0;a<n;a++)r.push(e[a].apply(null,t));return r}var aQ=class{constructor(e){this.value=e}deref(){return this.value}},oQ=typeof WeakRef<"u"?WeakRef:aQ,sQ=0,N9=1;function Ub(){return{s:sQ,v:void 0,o:null,p:null}}function Xy(e,t={}){let r=Ub();const{resultEqualityCheck:n}=t;let a,o=0;function i(){var t;let i=r;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 r=e.get(t);void 0===r?(i=Ub(),e.set(t,i)):i=r}else{let e=i.p;null===e&&(i.p=e=new Map);const r=e.get(t);void 0===r?(i=Ub(),e.set(t,i)):i=r}}const l=i;let c;if(i.s===N9?c=i.v:(c=e.apply(null,arguments),o++),l.s=N9,n){const e=(null==(t=null==a?void 0:a.deref)?void 0:t.call(a))??a;null!=e&&n(e,c)&&(c=e,0!==o&&o--),a="object"==typeof c&&null!==c||"function"==typeof c?new oQ(c):c}return l.v=c,c}return i.clearCache=()=>{r=Ub(),i.resetResultsCount()},i.resultsCount=()=>o,i.resetResultsCount=()=>{o=0},i}function e8(e,...t){const r="function"==typeof e?{memoize:e,memoizeOptions:t}:e,n=(...e)=>{let t,n=0,a=0,o={},i=e.pop();"object"==typeof i&&(o=i,i=e.pop()),JH(i,`createSelector expects an output function after the inputs, but received: [${typeof i}]`);const s={...r,...o},{memoize:l,memoizeOptions:c=[],argsMemoize:u=Xy,argsMemoizeOptions:f=[],devModeChecks:d={}}=s,p=O9(c),h=O9(f),g=nQ(e),m=l((function(){return n++,i.apply(null,arguments)}),...p),y=u((function(){a++;const e=rQ(g,arguments);return t=m.apply(null,e),t}),...h);return Object.assign(y,{resultFunc:i,memoizedResultFunc:m,dependencies:g,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>t,recomputations:()=>n,resetRecomputations:()=>{n=0},memoize:l,argsMemoize:u})};return Object.assign(n,{withTypes:()=>n}),n}var zr=e8(Xy),iQ=Object.assign(((e,t=zr)=>{eQ(e,"createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+typeof e);const r=Object.keys(e);return t(r.map((t=>e[t])),((...e)=>e.reduce(((e,t,n)=>(e[r[n]]=t,e)),{})))}),{withTypes:()=>iQ}),cQ=(...e)=>{const t=e8(...e),r=Object.assign(((...e)=>{const r=t(...e),n=(e,...t)=>r(qc(e)?Xj(e):e,...t);return Object.assign(n,r),n}),{withTypes:()=>r});return r};cQ(Xy);var lQ=e=>e&&"function"==typeof e.match;function kr(e,t){function r(...r){if(t){let n=t(...r);if(!n)throw new Error(po(0));return{type:e,payload:n.payload,..."meta"in n&&{meta:n.meta},..."error"in n&&{error:n.error}}}return{type:e,payload:r[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=t=>Wj(t)&&t.type===e,r}function D9(e){return Wc(e)?Ov(e,(()=>{})):e}function AC(e,t,r){if(e.has(t)){let n=e.get(t);return r.update&&(n=r.update(n,t,e),e.set(t,n)),n}if(!r.insert)throw new Error(po(10));const n=r.insert(t,e);return e.set(t,n),n}var wy="RTK_autoBatch",Y1=()=>e=>({payload:e,meta:{[wy]:!0}});function t8(e){const t={},r=[];let n;const a={addCase(e,r){const n="string"==typeof e?e:e.type;if(!n)throw new Error(po(28));if(n in t)throw new Error(po(29));return t[n]=r,a},addMatcher:(e,t)=>(r.push({matcher:e,reducer:t}),a),addDefaultCase:e=>(n=e,a)};return e(a),[t,r,n]}function uQ(e){return"function"==typeof e}function fQ(e,t){let r,[n,a,o]=t8(t);if(uQ(e))r=()=>D9(e());else{const t=D9(e);r=()=>t}function i(e=r(),t){let i=[n[t.type],...a.filter((({matcher:e})=>e(t))).map((({reducer:e})=>e))];return 0===i.filter((e=>!!e)).length&&(i=[o]),i.reduce(((e,r)=>{if(r){if(qc(e)){const n=r(e,t);return void 0===n?e:n}if(Wc(e))return Ov(e,(e=>r(e,t)));{const n=r(e,t);if(void 0===n){if(null===e)return e;throw new Error(po(9))}return n}}return e}),e)}return i.getInitialState=r,i}var dQ="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",J_=(e=21)=>{let t="",r=e;for(;r--;)t+=dQ[64*Math.random()|0];return t},n8=(e,t)=>lQ(e)?e.match(t):e(t);function gp(...e){return t=>e.some((e=>n8(e,t)))}function My(...e){return t=>e.every((e=>n8(e,t)))}function e2(e,t){if(!e||!e.meta)return!1;const r="string"==typeof e.meta.requestId,n=t.indexOf(e.meta.requestStatus)>-1;return r&&n}function Nv(e){return"function"==typeof e[0]&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function uA(...e){return 0===e.length?e=>e2(e,["pending"]):Nv(e)?t=>gp(...e.map((e=>e.pending)))(t):uA()(e[0])}function k0(...e){return 0===e.length?e=>e2(e,["rejected"]):Nv(e)?t=>gp(...e.map((e=>e.rejected)))(t):k0()(e[0])}function t2(...e){const t=e=>e&&e.meta&&e.meta.rejectedWithValue;return 0===e.length||Nv(e)?r=>My(k0(...e),t)(r):t2()(e[0])}function yp(...e){return 0===e.length?e=>e2(e,["fulfilled"]):Nv(e)?t=>gp(...e.map((e=>e.fulfilled)))(t):yp()(e[0])}function RC(...e){return 0===e.length?e=>e2(e,["pending","fulfilled","rejected"]):Nv(e)?t=>{const r=[];for(const t of e)r.push(t.pending,t.rejected,t.fulfilled);return gp(...r)(t)}:RC()(e[0])}var pQ=["name","message","stack","code"],e3=class{constructor(e,t){An(this,"_type"),this.payload=e,this.meta=t}},j9=class{constructor(e,t){An(this,"_type"),this.payload=e,this.meta=t}},hQ=e=>{if("object"==typeof e&&null!==e){const t={};for(const r of pQ)"string"==typeof e[r]&&(t[r]=e[r]);return t}return{message:String(e)}},L9=(()=>{function e(e,t,r){const n=kr(e+"/fulfilled",((e,t,r,n)=>({payload:e,meta:{...n||{},arg:r,requestId:t,requestStatus:"fulfilled"}}))),a=kr(e+"/pending",((e,t,r)=>({payload:void 0,meta:{...r||{},arg:t,requestId:e,requestStatus:"pending"}}))),o=kr(e+"/rejected",((e,t,n,a,o)=>({payload:a,error:(r&&r.serializeError||hQ)(e||"Rejected"),meta:{...o||{},arg:n,requestId:t,rejectedWithValue:!!a,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,l)=>{const c=null!=r&&r.idGenerator?r.idGenerator(e):J_(),u=new AbortController;let f,d;function p(e){d=e,u.abort()}const h=async function(){var h,g;let m;try{let o=null==(h=null==r?void 0:r.condition)?void 0:h.call(r,e,{getState:s,extra:l});if(gQ(o)&&(o=await o),!1===o||u.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const y=new Promise(((e,t)=>{f=()=>{t({name:"AbortError",message:d||"Aborted"})},u.signal.addEventListener("abort",f)}));i(a(c,e,null==(g=null==r?void 0:r.getPendingMeta)?void 0:g.call(r,{requestId:c,arg:e},{getState:s,extra:l}))),m=await Promise.race([y,Promise.resolve(t(e,{dispatch:i,getState:s,extra:l,requestId:c,signal:u.signal,abort:p,rejectWithValue:(e,t)=>new e3(e,t),fulfillWithValue:(e,t)=>new j9(e,t)})).then((t=>{if(t instanceof e3)throw t;return t instanceof j9?n(t.payload,c,e,t.meta):n(t,c,e)}))])}catch(t){m=t instanceof e3?o(null,c,e,t.payload,t.meta):o(t,c,e)}finally{f&&u.signal.removeEventListener("abort",f)}return r&&!r.dispatchConditionRejection&&o.match(m)&&m.meta.condition||i(m),m}();return Object.assign(h,{abort:p,requestId:c,arg:e,unwrap:()=>h.then(mQ)})}}),{pending:a,rejected:o,fulfilled:n,settled:gp(o,n),typePrefix:e})}return e.withTypes=()=>e,e})();function mQ(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function gQ(e){return null!==e&&"object"==typeof e&&"function"==typeof e.then}var yQ=Symbol.for("rtk-slice-createasyncthunk");function vQ(e,t){return`${e}/${t}`}function bQ({creators:e}={}){var t;const r=null==(t=null==e?void 0:e.asyncThunk)?void 0:t[yQ];return function(e){const{name:t,reducerPath:n=t}=e;if(!t)throw new Error(po(11));const a=("function"==typeof e.reducers?e.reducers(_Q()):e.reducers)||{},o=Object.keys(a),i={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(e,t){const r="string"==typeof e?e:e.type;if(!r)throw new Error(po(12));if(r in i.sliceCaseReducersByType)throw new Error(po(13));return i.sliceCaseReducersByType[r]=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 l(){const[t={},r=[],n]="function"==typeof e.extraReducers?t8(e.extraReducers):[e.extraReducers],a={...t,...i.sliceCaseReducersByType};return fQ(e.initialState,(e=>{for(let t in a)e.addCase(t,a[t]);for(let t of i.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of r)e.addMatcher(t.matcher,t.reducer);n&&e.addDefaultCase(n)}))}o.forEach((n=>{const o=a[n],i={reducerName:n,type:vQ(t,n),createNotation:"function"==typeof e.reducers};xQ(o)?EQ(i,o,s,r):kQ(i,o,s)}));const c=e=>e,u=new Map;let f;function d(e,t){return f||(f=l()),f(e,t)}function p(){return f||(f=l()),f.getInitialState()}function h(t,r=!1){function n(e){let n=e[t];return typeof n>"u"&&r&&(n=p()),n}function a(t=c){const n=AC(u,r,{insert:()=>new WeakMap});return AC(n,t,{insert:()=>{const n={};for(const[a,o]of Object.entries(e.selectors??{}))n[a]=wQ(o,t,p,r);return n}})}return{reducerPath:t,getSelectors:a,get selectors(){return a(n)},selectSlice:n}}const g={name:t,reducer:d,actions:i.actionCreators,caseReducers:i.sliceCaseReducersByName,getInitialState:p,...h(n),injectInto(e,{reducerPath:t,...r}={}){const a=t??n;return e.inject({reducerPath:a,reducer:d},r),{...g,...h(a,!0)}}};return g}}function wQ(e,t,r,n){function a(a,...o){let i=t(a);return typeof i>"u"&&n&&(i=r()),e(i,...o)}return a.unwrapped=e,a}var ur=bQ();function _Q(){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 kQ({type:e,reducerName:t,createNotation:r},n,a){let o,i;if("reducer"in n){if(r&&!SQ(n))throw new Error(po(17));o=n.reducer,i=n.prepare}else o=n;a.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,i?kr(e,i):kr(e))}function xQ(e){return"asyncThunk"===e._reducerDefinitionType}function SQ(e){return"reducerWithPrepare"===e._reducerDefinitionType}function EQ({type:e,reducerName:t},r,n,a){if(!a)throw new Error(po(18));const{payloadCreator:o,fulfilled:i,pending:s,rejected:l,settled:c,options:u}=r,f=a(e,o,u);n.exposeAction(t,f),i&&n.addCase(f.fulfilled,i),s&&n.addCase(f.pending,s),l&&n.addCase(f.rejected,l),c&&n.addMatcher(f.settled,c),n.exposeCaseReducer(t,{fulfilled:i||Gb,pending:s||Gb,rejected:l||Gb,settled:c||Gb})}function Gb(){}var CQ=(e,t)=>{if("function"!=typeof e)throw new Error(po(32))},fA="listenerMiddleware",IQ=e=>{let{type:t,actionCreator:r,matcher:n,predicate:a,effect:o}=e;if(t)a=kr(t).match;else if(r)t=r.type,a=r.match;else if(n)a=n;else if(!a)throw new Error(po(21));return CQ(o),{predicate:a,type:t,effect:o}},AQ=Object.assign((e=>{const{type:t,predicate:r,effect:n}=IQ(e);return{id:J_(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(po(22))}}}),{withTypes:()=>AQ}),RQ=Object.assign(kr(`${fA}/add`),{withTypes:()=>RQ});kr(`${fA}/removeAll`);var TQ=Object.assign(kr(`${fA}/remove`),{withTypes:()=>TQ}),PQ=e=>"reducerPath"in e&&"string"==typeof e.reducerPath,$Q=e=>e.flatMap((e=>PQ(e)?[[e.reducerPath,e.reducer]]:Object.entries(e))),dA=Symbol.for("rtk-state-proxy-original"),zQ=e=>!!e&&!!e[dA],MQ=new WeakMap,OQ=(e,t)=>AC(MQ,e,{insert:()=>new Proxy(e,{get:(e,r,n)=>{if(r===dA)return e;const a=Reflect.get(e,r,n);if(typeof a>"u"){const e=t[r.toString()];if(e){const t=e(void 0,{type:J_()});if(typeof t>"u")throw new Error(po(24));return t}}return a}})}),NQ=e=>{if(!zQ(e))throw new Error(po(25));return e[dA]},DQ=(e={})=>e;function jQ(...e){const t=Object.fromEntries($Q(e)),r=()=>Object.keys(t).length?qj(t):DQ;let n=r();function a(e,t){return n(e,t)}a.withLazyLoadedSlices=()=>a;const o=Object.assign((function(e,r){return function(n,...a){return e(OQ(r?r(n,...a):n,t),...a)}}),{original:NQ});return Object.assign(a,{inject:(e,o={})=>{const{reducerPath:i,reducer:s}=e,l=t[i];return!o.overrideExisting&&l&&l!==s||(t[i]=s,n=r()),a},selector:o})}function po(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. `}var LQ={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/notifications/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/notifications/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:"c2b5189a3bdc0590",NODE:"/home/teamcity/.nvm/versions/node/v22.18.0/bin/node",npm_package_name:"@wellesley/notifications",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.786",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/notifications",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/notifications",EDITOR:"vi",NODE_ENV:"production",BUILD_NUMBER:"3822",APP_NAME:"@wellesley/notifications"},r8=(e=>(e.uninitialized="uninitialized",e.pending="pending",e.fulfilled="fulfilled",e.rejected="rejected",e))(r8||{});function VQ(e){return{status:e,isUninitialized:"uninitialized"===e,isLoading:"pending"===e,isSuccess:"fulfilled"===e,isError:"rejected"===e}}function BQ(e){return new RegExp("(^|:)//").test(e)}var FQ=e=>e.replace(/\/$/,""),UQ=e=>e.replace(/^\//,"");function GQ(e,t){if(!e)return t;if(!t)return e;if(BQ(t))return t;const r=e.endsWith("/")||!t.startsWith("?")?"/":"";return`${e=FQ(e)}${r}${t=UQ(t)}`}var V9=e=>[].concat(...e);function qQ(){return typeof navigator>"u"||void 0===navigator.onLine||navigator.onLine}function WQ(){return typeof document>"u"||"hidden"!==document.visibilityState}var B9=mp;function a8(e,t){if(e===t||!(B9(e)&&B9(t)||Array.isArray(e)&&Array.isArray(t)))return t;const r=Object.keys(t),n=Object.keys(e);let a=r.length===n.length;const o=Array.isArray(t)?[]:{};for(const n of r)o[n]=a8(e[n],t[n]),a&&(a=e[n]===o[n]);return a?e:o}var F9=(...e)=>fetch(...e),HQ=e=>e.status>=200&&e.status<=299,QQ=e=>/ion\/(vnd\.api\+)?json/.test(e.get("content-type")||"");function U9(e){if(!mp(e))return e;const t={...e};for(const[e,r]of Object.entries(t))void 0===r&&delete t[e];return t}function YQ({baseUrl:e,prepareHeaders:t=e=>e,fetchFn:r=F9,paramsSerializer:n,isJsonContentType:a=QQ,jsonContentType:o="application/json",jsonReplacer:i,timeout:s,responseHandler:l,validateStatus:c,...u}={}){return typeof fetch>"u"&&r===F9&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),async(d,p)=>{const{signal:h,getState:g,extra:m,endpoint:y,forced:v,type:b}=p;let w,{url:_,headers:k=new Headers(u.headers),params:x,responseHandler:E=l??"json",validateStatus:A=c??HQ,timeout:S=s,...C}="string"==typeof d?{url:d}:d,z={...u,signal:h,...C};k=new Headers(U9(k)),z.headers=await t(k,{getState:g,extra:m,endpoint:y,forced:v,type:b})||k;const I=e=>"object"==typeof e&&(mp(e)||Array.isArray(e)||"function"==typeof e.toJSON);if(!z.headers.has("content-type")&&I(z.body)&&z.headers.set("content-type",o),I(z.body)&&a(z.headers)&&(z.body=JSON.stringify(z.body,i)),x){const e=~_.indexOf("?")?"&":"?";_+=e+(n?n(x):new URLSearchParams(U9(x)))}_=GQ(e,_);const j=new Request(_,z);w={request:new Request(_,z)};let P,T=!1,R=S&&setTimeout((()=>{T=!0,p.abort()}),S);try{P=await r(j)}catch(e){return{error:{status:T?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(e)},meta:w}}finally{R&&clearTimeout(R)}const N=P.clone();w.response=N;let O,M="";try{let e;if(await Promise.all([f(P,E).then((e=>O=e),(t=>e=t)),N.text().then((e=>M=e),(()=>{}))]),e)throw e}catch(e){return{error:{status:"PARSING_ERROR",originalStatus:P.status,data:M,error:String(e)},meta:w}}return A(P,O)?{data:O,meta:w}:{error:{status:P.status,data:O},meta:w}};async function f(e,t){if("function"==typeof t)return t(e);if("content-type"===t&&(t=a(e.headers)?"json":"text"),"json"===t){const t=await e.text();return t.length?JSON.parse(t):null}return e.text()}}var G9=class{constructor(e,t=void 0){this.value=e,this.meta=t}},pA=kr("__rtkq/focused"),o8=kr("__rtkq/unfocused"),hA=kr("__rtkq/online"),s8=kr("__rtkq/offline");function i8(e){return"query"===e.type}function KQ(e){return"mutation"===e.type}function mA(e,t,r,n,a,o){return XQ(e)?e(t,r,n,a).map(TC).map(o):Array.isArray(e)?e.map(TC).map(o):[]}function XQ(e){return"function"==typeof e}function TC(e){return"string"==typeof e?{type:e}:e}function q9(e){return null!=e}function h0(e){let t=0;for(const r in e)t++;return t}function ZQ(e,t){return e.catch(t)}var Zy=Symbol("forceQueryFn"),PC=e=>"function"==typeof e[Zy];function JQ({serializeQueryArgs:e,queryThunk:t,mutationThunk:r,api:n,context:a}){const o=new Map,i=new Map,{unsubscribeQueryResult:s,removeMutationResult:l,updateSubscriptionOptions:c}=n.internalActions;return{buildInitiateQuery:function(r,a){const i=(l,{subscribe:u=!0,forceRefetch:f,subscriptionOptions:d,[Zy]:p,...h}={})=>(g,m)=>{var y;const v=e({queryArgs:l,endpointDefinition:a,endpointName:r}),b=t({...h,type:"query",subscribe:u,forceRefetch:f,subscriptionOptions:d,endpointName:r,originalArgs:l,queryCacheKey:v,[Zy]:p}),w=n.endpoints[r].select(l),_=g(b),k=w(m()),{requestId:x,abort:E}=_,A=k.requestId!==x,S=null==(y=o.get(g))?void 0:y[v],C=()=>w(m()),z=Object.assign(p?_.then(C):A&&!S?Promise.resolve(k):Promise.all([S,_]).then(C),{arg:l,requestId:x,subscriptionOptions:d,queryCacheKey:v,abort:E,async unwrap(){const e=await z;if(e.isError)throw e.error;return e.data},refetch:()=>g(i(l,{subscribe:!1,forceRefetch:!0})),unsubscribe(){u&&g(s({queryCacheKey:v,requestId:x}))},updateSubscriptionOptions(e){z.subscriptionOptions=e,g(c({endpointName:r,requestId:x,queryCacheKey:v,options:e}))}});if(!S&&!A&&!p){const e=o.get(g)||{};e[v]=z,o.set(g,e),z.then((()=>{delete e[v],h0(e)||o.delete(g)}))}return z};return i},buildInitiateMutation:function(e){return(t,{track:n=!0,fixedCacheKey:a}={})=>(o,s)=>{const c=r({type:"mutation",endpointName:e,originalArgs:t,track:n,fixedCacheKey:a}),u=o(c),{requestId:f,abort:d,unwrap:p}=u,h=ZQ(u.unwrap().then((e=>({data:e}))),(e=>({error:e}))),g=Object.assign(h,{arg:u.arg,requestId:f,abort:d,unwrap:p,reset:()=>{o(l({requestId:f,fixedCacheKey:a}))}}),m=i.get(o)||{};return i.set(o,m),m[f]=g,g.then((()=>{delete m[f],h0(m)||i.delete(o)})),a&&(m[a]=g,g.then((()=>{m[a]===g&&(delete m[a],h0(m)||i.delete(o))}))),g}},getRunningQueryThunk:function(t,r){return n=>{var i;const s=a.endpointDefinitions[t],l=e({queryArgs:r,endpointDefinition:s,endpointName:t});return null==(i=o.get(n))?void 0:i[l]}},getRunningMutationThunk:function(e,t){return e=>{var r;return null==(r=i.get(e))?void 0:r[t]}},getRunningQueriesThunk:function(){return e=>Object.values(o.get(e)||{}).filter(q9)},getRunningMutationsThunk:function(){return e=>Object.values(i.get(e)||{}).filter(q9)}}}function W9(e){return e}function eY({reducerPath:e,baseQuery:t,context:{endpointDefinitions:r},serializeQueryArgs:n,api:a,assertTagType:o}){const i=async(e,{signal:n,abort:a,rejectWithValue:o,fulfillWithValue:i,dispatch:l,getState:c,extra:u})=>{const f=r[e.endpointName];try{let r,o=W9;const d={signal:n,abort:a,dispatch:l,getState:c,extra:u,endpoint:e.endpointName,type:e.type,forced:"query"===e.type?s(e,c()):void 0},p="query"===e.type?e[Zy]:void 0;if(p?r=p():f.query?(r=await t(f.query(e.originalArgs),d,f.extraOptions),f.transformResponse&&(o=f.transformResponse)):r=await f.queryFn(e.originalArgs,d,f.extraOptions,(e=>t(e,d,f.extraOptions))),typeof process<"u"&&LQ.NODE_ENV,r.error)throw new G9(r.error,r.meta);return i(await o(r.data,r.meta,e.originalArgs),{fulfilledTimeStamp:Date.now(),baseQueryMeta:r.meta,[wy]:!0})}catch(t){let r=t;if(r instanceof G9){let t=W9;f.query&&f.transformErrorResponse&&(t=f.transformErrorResponse);try{return o(await t(r.value,r.meta,e.originalArgs),{baseQueryMeta:r.meta,[wy]:!0})}catch(e){r=e}}throw console.error(r),r}};function s(t,r){var n,a,o;const i=null==(a=null==(n=r[e])?void 0:n.queries)?void 0:a[t.queryCacheKey],s=null==(o=r[e])?void 0:o.config.refetchOnMountOrArgChange,l=null==i?void 0:i.fulfilledTimeStamp,c=t.forceRefetch??(t.subscribe&&s);return!!c&&(!0===c||(Number(new Date)-Number(l))/1e3>=c)}const l=L9(`${e}/executeQuery`,i,{getPendingMeta:()=>({startedTimeStamp:Date.now(),[wy]:!0}),condition(t,{getState:n}){var a,o,i;const l=n(),c=null==(o=null==(a=l[e])?void 0:a.queries)?void 0:o[t.queryCacheKey],u=null==c?void 0:c.fulfilledTimeStamp,f=t.originalArgs,d=null==c?void 0:c.originalArgs,p=r[t.endpointName];return!!PC(t)||"pending"!==(null==c?void 0:c.status)&&(!!(s(t,l)||i8(p)&&null!=(i=null==p?void 0:p.forceRefetch)&&i.call(p,{currentArg:f,previousArg:d,endpointState:c,state:l}))||!u)},dispatchConditionRejection:!0}),c=L9(`${e}/executeMutation`,i,{getPendingMeta:()=>({startedTimeStamp:Date.now(),[wy]:!0})});function u(e){return t=>{var r,n;return(null==(n=null==(r=null==t?void 0:t.meta)?void 0:r.arg)?void 0:n.endpointName)===e}}return{queryThunk:l,mutationThunk:c,prefetch:(e,t,r)=>(n,o)=>{const i=(e=>"force"in e)(r)&&r.force,s=(e=>"ifOlderThan"in e)(r)&&r.ifOlderThan,l=(r=!0)=>{const n={forceRefetch:r,isPrefetch:!0};return a.endpoints[e].initiate(t,n)},c=a.endpoints[e].select(t)(o());if(i)n(l());else if(s){const e=null==c?void 0:c.fulfilledTimeStamp;if(!e)return void n(l());(Number(new Date)-Number(new Date(e)))/1e3>=s&&n(l())}else n(l(!1))},updateQueryData:(e,t,r,n=!0)=>(o,i)=>{const s=a.endpoints[e].select(t)(i());let l,c={patches:[],inversePatches:[],undo:()=>o(a.util.patchQueryData(e,t,c.inversePatches,n))};if("uninitialized"===s.status)return c;if("data"in s)if(Wc(s.data)){const[e,t,n]=Jj(s.data,r);c.patches.push(...t),c.inversePatches.push(...n),l=e}else l=r(s.data),c.patches.push({op:"replace",path:[],value:l}),c.inversePatches.push({op:"replace",path:[],value:s.data});return o(a.util.patchQueryData(e,t,c.patches,n)),c},upsertQueryData:(e,t,r)=>n=>n(a.endpoints[e].initiate(t,{subscribe:!1,forceRefetch:!0,[Zy]:()=>({data:r})})),patchQueryData:(e,t,i,s)=>(l,c)=>{const u=r[e],f=n({queryArgs:t,endpointDefinition:u,endpointName:e});if(l(a.internalActions.queryResultPatched({queryCacheKey:f,patches:i})),!s)return;const d=a.endpoints[e].select(t)(c()),p=mA(u.providesTags,d.data,void 0,t,{},o);l(a.internalActions.updateProvidedBy({queryCacheKey:f,providedTags:p}))},buildMatchThunkActions:function(e,t){return{matchPending:My(uA(e),u(t)),matchFulfilled:My(yp(e),u(t)),matchRejected:My(k0(e),u(t))}}}}function c8(e,t,r,n){return mA(r[e.meta.arg.endpointName][t],yp(e)?e.payload:void 0,t2(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,n)}function qb(e,t,r){const n=e[t];n&&r(n)}function Jy(e){return("arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)??e.requestId}function H9(e,t,r){const n=e[Jy(t)];n&&r(n)}var K1={};function tY({reducerPath:e,queryThunk:t,mutationThunk:r,context:{endpointDefinitions:n,apiUid:a,extractRehydrationInfo:o,hasRehydrationInfo:i},assertTagType:s,config:l}){const c=kr(`${e}/resetApiState`),u=ur({name:`${e}/queries`,initialState:K1,reducers:{removeQueryResult:{reducer(e,{payload:{queryCacheKey:t}}){delete e[t]},prepare:Y1()},queryResultPatched:{reducer(e,{payload:{queryCacheKey:t,patches:r}}){qb(e,t,(e=>{e.data=M9(e.data,r.concat())}))},prepare:Y1()}},extraReducers(e){e.addCase(t.pending,((e,{meta:t,meta:{arg:r}})=>{var n;const a=PC(r);e[n=r.queryCacheKey]??(e[n]={status:"uninitialized",endpointName:r.endpointName}),qb(e,r.queryCacheKey,(e=>{e.status="pending",e.requestId=a&&e.requestId?e.requestId:t.requestId,void 0!==r.originalArgs&&(e.originalArgs=r.originalArgs),e.startedTimeStamp=t.startedTimeStamp}))})).addCase(t.fulfilled,((e,{meta:t,payload:r})=>{qb(e,t.arg.queryCacheKey,(e=>{if(e.requestId!==t.requestId&&!PC(t.arg))return;const{merge:a}=n[t.arg.endpointName];if(e.status="fulfilled",a)if(void 0!==e.data){const{fulfilledTimeStamp:n,arg:o,baseQueryMeta:i,requestId:s}=t;let l=Ov(e.data,(e=>a(e,r,{arg:o.originalArgs,baseQueryMeta:i,fulfilledTimeStamp:n,requestId:s})));e.data=l}else e.data=r;else e.data=n[t.arg.endpointName].structuralSharing??1?a8(qc(e.data)?UH(e.data):e.data,r):r;delete e.error,e.fulfilledTimeStamp=t.fulfilledTimeStamp}))})).addCase(t.rejected,((e,{meta:{condition:t,arg:r,requestId:n},error:a,payload:o})=>{qb(e,r.queryCacheKey,(e=>{if(!t){if(e.requestId!==n)return;e.status="rejected",e.error=o??a}}))})).addMatcher(i,((e,t)=>{const{queries:r}=o(t);for(const[t,n]of Object.entries(r))("fulfilled"===(null==n?void 0:n.status)||"rejected"===(null==n?void 0:n.status))&&(e[t]=n)}))}}),f=ur({name:`${e}/mutations`,initialState:K1,reducers:{removeMutationResult:{reducer(e,{payload:t}){const r=Jy(t);r in e&&delete e[r]},prepare:Y1()}},extraReducers(e){e.addCase(r.pending,((e,{meta:t,meta:{requestId:r,arg:n,startedTimeStamp:a}})=>{n.track&&(e[Jy(t)]={requestId:r,status:"pending",endpointName:n.endpointName,startedTimeStamp:a})})).addCase(r.fulfilled,((e,{payload:t,meta:r})=>{r.arg.track&&H9(e,r,(e=>{e.requestId===r.requestId&&(e.status="fulfilled",e.data=t,e.fulfilledTimeStamp=r.fulfilledTimeStamp)}))})).addCase(r.rejected,((e,{payload:t,error:r,meta:n})=>{n.arg.track&&H9(e,n,(e=>{e.requestId===n.requestId&&(e.status="rejected",e.error=t??r)}))})).addMatcher(i,((e,t)=>{const{mutations:r}=o(t);for(const[t,n]of Object.entries(r))("fulfilled"===(null==n?void 0:n.status)||"rejected"===(null==n?void 0:n.status))&&t!==(null==n?void 0:n.requestId)&&(e[t]=n)}))}}),d=ur({name:`${e}/invalidation`,initialState:K1,reducers:{updateProvidedBy:{reducer(e,t){var r,n;const{queryCacheKey:a,providedTags:o}=t.payload;for(const t of Object.values(e))for(const e of Object.values(t)){const t=e.indexOf(a);-1!==t&&e.splice(t,1)}for(const{type:t,id:i}of o){const o=(r=e[t]??(e[t]={}))[n=i||"__internal_without_id"]??(r[n]=[]);o.includes(a)||o.push(a)}},prepare:Y1()}},extraReducers(e){e.addCase(u.actions.removeQueryResult,((e,{payload:{queryCacheKey:t}})=>{for(const r of Object.values(e))for(const e of Object.values(r)){const r=e.indexOf(t);-1!==r&&e.splice(r,1)}})).addMatcher(i,((e,t)=>{var r,n;const{provided:a}=o(t);for(const[t,o]of Object.entries(a))for(const[a,i]of Object.entries(o)){const o=(r=e[t]??(e[t]={}))[n=a||"__internal_without_id"]??(r[n]=[]);for(const e of i)o.includes(e)||o.push(e)}})).addMatcher(gp(yp(t),t2(t)),((e,t)=>{const r=c8(t,"providesTags",n,s),{queryCacheKey:a}=t.meta.arg;d.caseReducers.updateProvidedBy(e,d.actions.updateProvidedBy({queryCacheKey:a,providedTags:r}))}))}}),p=ur({name:`${e}/subscriptions`,initialState:K1,reducers:{updateSubscriptionOptions(e,t){},unsubscribeQueryResult(e,t){},internal_getRTKQSubscriptions(){}}}),h=ur({name:`${e}/internalSubscriptions`,initialState:K1,reducers:{subscriptionsUpdated:{reducer:(e,t)=>M9(e,t.payload),prepare:Y1()}}}),g=ur({name:`${e}/config`,initialState:{online:qQ(),focused:WQ(),middlewareRegistered:!1,...l},reducers:{middlewareRegistered(e,{payload:t}){e.middlewareRegistered="conflict"!==e.middlewareRegistered&&a===t||"conflict"}},extraReducers:e=>{e.addCase(hA,(e=>{e.online=!0})).addCase(s8,(e=>{e.online=!1})).addCase(pA,(e=>{e.focused=!0})).addCase(o8,(e=>{e.focused=!1})).addMatcher(i,(e=>({...e})))}}),m=qj({queries:u.reducer,mutations:f.reducer,provided:d.reducer,subscriptions:h.reducer,config:g.reducer});return{reducer:(e,t)=>m(c.match(t)?void 0:e,t),actions:{...g.actions,...u.actions,...p.actions,...h.actions,...f.actions,...d.actions,resetApiState:c}}}var Jh=Symbol.for("RTKQ/skipToken"),l8={status:"uninitialized"},Q9=Ov(l8,(()=>{})),Y9=Ov(l8,(()=>{}));function nY({serializeQueryArgs:e,reducerPath:t,createSelector:r}){const n=e=>Q9,a=e=>Y9;return{buildQuerySelector:function(t,a){return s=>{const l=e({queryArgs:s,endpointDefinition:a,endpointName:t});return r(s===Jh?n:e=>{var t,r;return(null==(r=null==(t=i(e))?void 0:t.queries)?void 0:r[l])??Q9},o)}},buildMutationSelector:function(){return e=>{let t;return t="object"==typeof e?Jy(e)??Jh:e,r(t===Jh?a:e=>{var r,n;return(null==(n=null==(r=i(e))?void 0:r.mutations)?void 0:n[t])??Y9},o)}},selectInvalidatedBy:function(e,r){const n=e[t],a=new Set;for(const e of r.map(TC)){const t=n.provided[e.type];if(!t)continue;let r=(void 0!==e.id?t[e.id]:V9(Object.values(t)))??[];for(const e of r)a.add(e)}return V9(Array.from(a.values()).map((e=>{const t=n.queries[e];return t?[{queryCacheKey:e,endpointName:t.endpointName,originalArgs:t.originalArgs}]:[]})))},selectCachedArgsForQuery:function(e,r){return Object.values(e[t].queries).filter((e=>(null==e?void 0:e.endpointName)===r&&"uninitialized"!==e.status)).map((e=>e.originalArgs))}};function o(e){return{...e,...VQ(e.status)}}function i(e){return e[t]}}var Kg=WeakMap?new WeakMap:void 0,K9=({endpointName:e,queryArgs:t})=>{let r="";const n=null==Kg?void 0:Kg.get(t);if("string"==typeof n)r=n;else{const e=JSON.stringify(t,((e,t)=>mp(t)?Object.keys(t).sort().reduce(((e,r)=>(e[r]=t[r],e)),{}):t));mp(t)&&(null==Kg||Kg.set(t,e)),r=e}return`${e}(${r})`};function rY(...e){return function(t){const r=Xy((e=>{var r;return null==(r=t.extractRehydrationInfo)?void 0:r.call(t,e,{reducerPath:t.reducerPath??"api"})})),n={reducerPath:"api",keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1,invalidationBehavior:"delayed",...t,extractRehydrationInfo:r,serializeQueryArgs(e){let r=K9;if("serializeQueryArgs"in e.endpointDefinition){const t=e.endpointDefinition.serializeQueryArgs;r=e=>{const r=t(e);return"string"==typeof r?r:K9({...e,queryArgs:r})}}else t.serializeQueryArgs&&(r=t.serializeQueryArgs);return r(e)},tagTypes:[...t.tagTypes||[]]},a={endpointDefinitions:{},batch(e){e()},apiUid:J_(),extractRehydrationInfo:r,hasRehydrationInfo:Xy((e=>null!=r(e)))},o={injectEndpoints:function(e){const t=e.endpoints({query:e=>({...e,type:"query"}),mutation:e=>({...e,type:"mutation"})});for(const[r,n]of Object.entries(t))if(!0!==e.overrideExisting&&r in a.endpointDefinitions){if("throw"===e.overrideExisting)throw new Error(po(39))}else{a.endpointDefinitions[r]=n;for(const e of i)e.injectEndpoint(r,n)}return o},enhanceEndpoints({addTagTypes:e,endpoints:t}){if(e)for(const t of e)n.tagTypes.includes(t)||n.tagTypes.push(t);if(t)for(const[e,r]of Object.entries(t))"function"==typeof r?r(a.endpointDefinitions[e]):Object.assign(a.endpointDefinitions[e]||{},r);return o}},i=e.map((e=>e.init(o,n,a)));return o.injectEndpoints({endpoints:t.endpoints})}}function aY(e){for(let t in e)return!1;return!0}var oY=2147482.647,sY=({reducerPath:e,api:t,context:r,internalState:n})=>{const{removeQueryResult:a,unsubscribeQueryResult:o}=t.internalActions;function i(e){const t=n.currentSubscriptions[e];return!!t&&!aY(t)}const s={};function l(e,t,n,o){const l=r.endpointDefinitions[t],c=(null==l?void 0:l.keepUnusedDataFor)??o.keepUnusedDataFor;if(c===1/0)return;const u=Math.max(0,Math.min(c,oY));if(!i(e)){const t=s[e];t&&clearTimeout(t),s[e]=setTimeout((()=>{i(e)||n.dispatch(a({queryCacheKey:e})),delete s[e]}),1e3*u)}}return(n,a,i)=>{var c;if(o.match(n)){const t=a.getState()[e],{queryCacheKey:r}=n.payload;l(r,null==(c=t.queries[r])?void 0:c.endpointName,a,t.config)}if(t.util.resetApiState.match(n))for(const[e,t]of Object.entries(s))t&&clearTimeout(t),delete s[e];if(r.hasRehydrationInfo(n)){const t=a.getState()[e],{queries:o}=r.extractRehydrationInfo(n);for(const[e,r]of Object.entries(o))l(e,null==r?void 0:r.endpointName,a,t.config)}}},iY=({reducerPath:e,context:t,context:{endpointDefinitions:r},mutationThunk:n,queryThunk:a,api:o,assertTagType:i,refetchQuery:s,internalState:l})=>{const{removeQueryResult:c}=o.internalActions,u=gp(yp(n),t2(n)),f=gp(yp(n,a),k0(n,a));let d=[];function p(r,n){const a=n.getState(),i=a[e];if(d.push(...r),"delayed"===i.config.invalidationBehavior&&function(e){var t,r;for(const r in e.queries)if("pending"===(null==(t=e.queries[r])?void 0:t.status))return!0;for(const t in e.mutations)if("pending"===(null==(r=e.mutations[t])?void 0:r.status))return!0;return!1}(i))return;const u=d;if(d=[],0===u.length)return;const f=o.util.selectInvalidatedBy(a,u);t.batch((()=>{const e=Array.from(f.values());for(const{queryCacheKey:t}of e){const e=i.queries[t],r=l.currentSubscriptions[t]??{};e&&(0===h0(r)?n.dispatch(c({queryCacheKey:t})):"uninitialized"!==e.status&&n.dispatch(s(e,t)))}}))}return(e,t)=>{u(e)?p(c8(e,"invalidatesTags",r,i),t):f(e)?p([],t):o.util.invalidateTags.match(e)&&p(mA(e.payload,void 0,void 0,void 0,void 0,i),t)}},cY=({reducerPath:e,queryThunk:t,api:r,refetchQuery:n,internalState:a})=>{const o={};function i({queryCacheKey:t},r){const s=r.getState()[e],l=s.queries[t],u=a.currentSubscriptions[t];if(!l||"uninitialized"===l.status)return;const{lowestPollingInterval:f,skipPollingIfUnfocused:d}=c(u);if(!Number.isFinite(f))return;const p=o[t];null!=p&&p.timeout&&(clearTimeout(p.timeout),p.timeout=void 0);const h=Date.now()+f;o[t]={nextPollTimestamp:h,pollingInterval:f,timeout:setTimeout((()=>{(s.config.focused||!d)&&r.dispatch(n(l,t)),i({queryCacheKey:t},r)}),f)}}function s({queryCacheKey:t},r){const n=r.getState()[e].queries[t],s=a.currentSubscriptions[t];if(!n||"uninitialized"===n.status)return;const{lowestPollingInterval:u}=c(s);if(!Number.isFinite(u))return void l(t);const f=o[t],d=Date.now()+u;(!f||d<f.nextPollTimestamp)&&i({queryCacheKey:t},r)}function l(e){const t=o[e];null!=t&&t.timeout&&clearTimeout(t.timeout),delete o[e]}function c(e={}){let t=!1,r=Number.POSITIVE_INFINITY;for(let n in e)e[n].pollingInterval&&(r=Math.min(e[n].pollingInterval,r),t=e[n].skipPollingIfUnfocused||t);return{lowestPollingInterval:r,skipPollingIfUnfocused:t}}return(e,n)=>{(r.internalActions.updateSubscriptionOptions.match(e)||r.internalActions.unsubscribeQueryResult.match(e))&&s(e.payload,n),(t.pending.match(e)||t.rejected.match(e)&&e.meta.condition)&&s(e.meta.arg,n),(t.fulfilled.match(e)||t.rejected.match(e)&&!e.meta.condition)&&i(e.meta.arg,n),r.util.resetApiState.match(e)&&function(){for(const e of Object.keys(o))l(e)}()}},lY=({reducerPath:e,context:t,api:r,refetchQuery:n,internalState:a})=>{const{removeQueryResult:o}=r.internalActions;function i(r,i){const s=r.getState()[e],l=s.queries,c=a.currentSubscriptions;t.batch((()=>{for(const e of Object.keys(c)){const t=l[e],a=c[e];a&&t&&((Object.values(a).some((e=>!0===e[i]))||Object.values(a).every((e=>void 0===e[i]))&&s.config[i])&&(0===h0(a)?r.dispatch(o({queryCacheKey:e})):"uninitialized"!==t.status&&r.dispatch(n(t,e))))}}))}return(e,t)=>{pA.match(e)&&i(t,"refetchOnFocus"),hA.match(e)&&i(t,"refetchOnReconnect")}},X9=new Error("Promise never resolved before cacheEntryRemoved."),uY=({api:e,reducerPath:t,context:r,queryThunk:n,mutationThunk:a,internalState:o})=>{const i=RC(n),s=RC(a),l=yp(n,a),c={};function u(t,n,a,o,i){const s=r.endpointDefinitions[t],l=null==s?void 0:s.onCacheEntryAdded;if(!l)return;let u={};const f=new Promise((e=>{u.cacheEntryRemoved=e})),d=Promise.race([new Promise((e=>{u.valueResolved=e})),f.then((()=>{throw X9}))]);d.catch((()=>{})),c[a]=u;const p=e.endpoints[t].select("query"===s.type?n:a),h=o.dispatch(((e,t,r)=>r)),g={...o,getCacheEntry:()=>p(o.getState()),requestId:i,extra:h,updateCachedData:"query"===s.type?r=>o.dispatch(e.util.updateQueryData(t,n,r)):void 0,cacheDataLoaded:d,cacheEntryRemoved:f},m=l(n,g);Promise.resolve(m).catch((e=>{if(e!==X9)throw e}))}return(r,o,f)=>{const d=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)?Jy(t.payload):""}(r);if(n.pending.match(r)){const e=f[t].queries[d],n=o.getState()[t].queries[d];!e&&n&&u(r.meta.arg.endpointName,r.meta.arg.originalArgs,d,o,r.meta.requestId)}else if(a.pending.match(r))o.getState()[t].mutations[d]&&u(r.meta.arg.endpointName,r.meta.arg.originalArgs,d,o,r.meta.requestId);else if(l(r)){const e=c[d];null!=e&&e.valueResolved&&(e.valueResolved({data:r.payload,meta:r.meta.baseQueryMeta}),delete e.valueResolved)}else if(e.internalActions.removeQueryResult.match(r)||e.internalActions.removeMutationResult.match(r)){const e=c[d];e&&(delete c[d],e.cacheEntryRemoved())}else if(e.util.resetApiState.match(r))for(const[e,t]of Object.entries(c))delete c[e],t.cacheEntryRemoved()}},fY=({api:e,context:t,queryThunk:r,mutationThunk:n})=>{const a=uA(r,n),o=k0(r,n),i=yp(r,n),s={};return(r,n)=>{var l,c;if(a(r)){const{requestId:a,arg:{endpointName:o,originalArgs:i}}=r.meta,l=t.endpointDefinitions[o],c=null==l?void 0:l.onQueryStarted;if(c){const t={},r=new Promise(((e,r)=>{t.resolve=e,t.reject=r}));r.catch((()=>{})),s[a]=t;const u=e.endpoints[o].select("query"===l.type?i:a),f=n.dispatch(((e,t,r)=>r)),d={...n,getCacheEntry:()=>u(n.getState()),requestId:a,extra:f,updateCachedData:"query"===l.type?t=>n.dispatch(e.util.updateQueryData(o,i,t)):void 0,queryFulfilled:r};c(i,d)}}else if(i(r)){const{requestId:e,baseQueryMeta:t}=r.meta;null==(l=s[e])||l.resolve({data:r.payload,meta:t}),delete s[e]}else if(o(r)){const{requestId:e,rejectedWithValue:t,baseQueryMeta:n}=r.meta;null==(c=s[e])||c.reject({error:r.payload??r.error,isUnhandledError:!t,meta:n}),delete s[e]}}},dY=({api:e,context:{apiUid:t},reducerPath:r})=>(r,n)=>{e.util.resetApiState.match(r)&&n.dispatch(e.internalActions.middlewareRegistered(t))},pY=({api:e,queryThunk:t,internalState:r})=>{const n=`${e.reducerPath}/subscriptions`;let a=null,o=null;const{updateSubscriptionOptions:i,unsubscribeQueryResult:s}=e.internalActions,l=()=>r.currentSubscriptions,c={getSubscriptions:l,getSubscriptionCount:e=>h0(l()[e]??{}),isRequestSubscribed:(e,t)=>{var r;const n=l();return!(null==(r=null==n?void 0:n[e])||!r[t])}};return(l,u)=>{if(a||(a=JSON.parse(JSON.stringify(r.currentSubscriptions))),e.util.resetApiState.match(l))return a=r.currentSubscriptions={},o=null,[!0,!1];if(e.internalActions.internal_getRTKQSubscriptions.match(l))return[!1,c];const f=((r,n)=>{var a,o,l;if(i.match(n)){const{queryCacheKey:e,requestId:t,options:o}=n.payload;return null!=(a=null==r?void 0:r[e])&&a[t]&&(r[e][t]=o),!0}if(s.match(n)){const{queryCacheKey:e,requestId:t}=n.payload;return r[e]&&delete r[e][t],!0}if(e.internalActions.removeQueryResult.match(n))return delete r[n.payload.queryCacheKey],!0;if(t.pending.match(n)){const{meta:{arg:e,requestId:t}}=n,a=r[o=e.queryCacheKey]??(r[o]={});return a[`${t}_running`]={},e.subscribe&&(a[t]=e.subscriptionOptions??a[t]??{}),!0}let c=!1;if(t.fulfilled.match(n)||t.rejected.match(n)){const e=r[n.meta.arg.queryCacheKey]||{},t=`${n.meta.requestId}_running`;c||(c=!!e[t]),delete e[t]}if(t.rejected.match(n)){const{meta:{condition:e,arg:t,requestId:a}}=n;if(e&&t.subscribe){const e=r[l=t.queryCacheKey]??(r[l]={});e[a]=t.subscriptionOptions??e[a]??{},c=!0}}return c})(r.currentSubscriptions,l);let d=!0;if(f){o||(o=setTimeout((()=>{const t=JSON.parse(JSON.stringify(r.currentSubscriptions)),[,n]=Jj(a,(()=>t));u.next(e.internalActions.subscriptionsUpdated(n)),a=t,o=null}),500));const i="string"==typeof l.type&&!!l.type.startsWith(n),s=t.rejected.match(l)&&l.meta.condition&&!!l.meta.arg.subscribe;d=!i&&!s}return[d,!1]}};function hY(e){const{reducerPath:t,queryThunk:r,api:n,context:a}=e,{apiUid:o}=a,i={invalidateTags:kr(`${t}/invalidateTags`)},s=e=>e.type.startsWith(`${t}/`),l=[dY,sY,iY,cY,uY,fY];return{middleware:r=>{let i=!1;const u={...e,internalState:{currentSubscriptions:{}},refetchQuery:c,isThisApiSliceAction:s},f=l.map((e=>e(u))),d=pY(u),p=lY(u);return e=>l=>{if(!Wj(l))return e(l);i||(i=!0,r.dispatch(n.internalActions.middlewareRegistered(o)));const c={...r,next:e},u=r.getState(),[h,g]=d(l,c,u);let m;if(m=h?e(l):g,r.getState()[t]&&(p(l,c,u),s(l)||a.hasRehydrationInfo(l)))for(let e of f)e(l,c,u);return m}},actions:i};function c(e,t,n={}){return r({type:"query",endpointName:e.endpointName,originalArgs:e.originalArgs,subscribe:!1,forceRefetch:!0,queryCacheKey:t,...n})}}function Jd(e,...t){return Object.assign(e,...t)}var Z9=Symbol(),mY=({createSelector:e=zr}={})=>({name:Z9,init(t,{baseQuery:r,tagTypes:n,reducerPath:a,serializeQueryArgs:o,keepUnusedDataFor:i,refetchOnMountOrArgChange:s,refetchOnFocus:l,refetchOnReconnect:c,invalidationBehavior:u},f){ZH();const d=e=>e;Object.assign(t,{reducerPath:a,endpoints:{},internalActions:{onOnline:hA,onOffline:s8,onFocus:pA,onFocusLost:o8},util:{}});const{queryThunk:p,mutationThunk:h,patchQueryData:g,updateQueryData:m,upsertQueryData:y,prefetch:v,buildMatchThunkActions:b}=eY({baseQuery:r,reducerPath:a,context:f,api:t,serializeQueryArgs:o,assertTagType:d}),{reducer:w,actions:_}=tY({context:f,queryThunk:p,mutationThunk:h,reducerPath:a,assertTagType:d,config:{refetchOnFocus:l,refetchOnReconnect:c,refetchOnMountOrArgChange:s,keepUnusedDataFor:i,reducerPath:a,invalidationBehavior:u}});Jd(t.util,{patchQueryData:g,updateQueryData:m,upsertQueryData:y,prefetch:v,resetApiState:_.resetApiState}),Jd(t.internalActions,_);const{middleware:k,actions:x}=hY({reducerPath:a,context:f,queryThunk:p,mutationThunk:h,api:t,assertTagType:d});Jd(t.util,x),Jd(t,{reducer:w,middleware:k});const{buildQuerySelector:E,buildMutationSelector:A,selectInvalidatedBy:S,selectCachedArgsForQuery:C}=nY({serializeQueryArgs:o,reducerPath:a,createSelector:e});Jd(t.util,{selectInvalidatedBy:S,selectCachedArgsForQuery:C});const{buildInitiateQuery:z,buildInitiateMutation:I,getRunningMutationThunk:j,getRunningMutationsThunk:P,getRunningQueriesThunk:T,getRunningQueryThunk:R}=JQ({queryThunk:p,mutationThunk:h,api:t,serializeQueryArgs:o,context:f});return Jd(t.util,{getRunningMutationThunk:j,getRunningMutationsThunk:P,getRunningQueryThunk:R,getRunningQueriesThunk:T}),{name:Z9,injectEndpoint(e,r){var n;const a=t;(n=a.endpoints)[e]??(n[e]={}),i8(r)?Jd(a.endpoints[e],{name:e,select:E(e,r),initiate:z(e,r)},b(p,e)):KQ(r)&&Jd(a.endpoints[e],{name:e,select:A(),initiate:I(e)},b(h,e))}}}}),qi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Qc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var J9,eP,t3={exports:{}},Kt={};
|
|
1
|
+
var DH=Object.defineProperty,jH=(e,t,r)=>t in e?DH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,An=(e,t,r)=>jH(e,"symbol"!=typeof t?t+"":t,r);function LH(e,t){for(var r=0;r<t.length;r++){const n=t[r];if("string"!=typeof n&&!Array.isArray(n))for(const t in n)if("default"!==t&&!(t in e)){const r=Object.getOwnPropertyDescriptor(n,t);r&&Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:()=>n[t]})}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function _C(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 Kx=()=>Math.random().toString(36).substring(7).split("").join("."),VH={INIT:`@@redux/INIT${Kx()}`,REPLACE:`@@redux/REPLACE${Kx()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Kx()}`},R9=VH;function mp(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 BH(e){Object.keys(e).forEach((t=>{const r=e[t];if(typeof r(void 0,{type:R9.INIT})>"u")throw new Error(_C(12));if(typeof r(void 0,{type:R9.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(_C(13))}))}function qj(e){const t=Object.keys(e),r={};for(let n=0;n<t.length;n++){const a=t[n];"function"==typeof e[a]&&(r[a]=e[a])}const n=Object.keys(r);let a;try{BH(r)}catch(e){a=e}return function(e={},t){if(a)throw a;let o=!1;const i={};for(let a=0;a<n.length;a++){const s=n[a],l=r[s],c=e[s],u=l(c,t);if(typeof u>"u")throw t&&t.type,new Error(_C(14));i[s]=u,o=o||u!==c}return o=o||n.length!==Object.keys(e).length,o?i:e}}function Wj(e){return mp(e)&&"type"in e&&"string"==typeof e.type}var iA=Symbol.for("immer-nothing"),zy=Symbol.for("immer-draftable"),Is=Symbol.for("immer-state");function uo(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var im=Object.getPrototypeOf;function qc(e){return!!e&&!!e[Is]}function Wc(e){var t;return!!e&&(Hj(e)||Array.isArray(e)||!!e[zy]||!(null==(t=e.constructor)||!t[zy])||zv(e)||Mv(e))}var FH=Object.prototype.constructor.toString();function Hj(e){if(!e||"object"!=typeof e)return!1;const t=im(e);if(null===t)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object||"function"==typeof r&&Function.toString.call(r)===FH}function UH(e){return qc(e)||uo(15,e),e[Is].base_}function _0(e,t){0===cm(e)?Object.entries(e).forEach((([r,n])=>{t(r,n,e)})):e.forEach(((r,n)=>t(n,r,e)))}function cm(e){const t=e[Is];return t?t.type_:Array.isArray(e)?1:zv(e)?2:Mv(e)?3:0}function Qy(e,t){return 2===cm(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Xx(e,t){return 2===cm(e)?e.get(t):e[t]}function Qj(e,t,r){const n=cm(e);2===n?e.set(t,r):3===n?e.add(r):e[t]=r}function GH(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function zv(e){return e instanceof Map}function Mv(e){return e instanceof Set}function Qh(e){return e.copy_||e.base_}function kC(e,t){if(zv(e))return new Map(e);if(Mv(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&Hj(e))return im(e)?{...e}:Object.assign(Object.create(null),e);const r=Object.getOwnPropertyDescriptors(e);delete r[Is];let n=Reflect.ownKeys(r);for(let t=0;t<n.length;t++){const a=n[t],o=r[a];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(r[a]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[a]})}return Object.create(im(e),r)}function cA(e,t=!1){return Z_(e)||qc(e)||!Wc(e)||(cm(e)>1&&(e.set=e.add=e.clear=e.delete=qH),Object.freeze(e),t&&_0(e,((e,t)=>cA(t,!0)))),e}function qH(){uo(2)}function Z_(e){return Object.isFrozen(e)}var Yy,xC={};function lm(e){const t=xC[e];return t||uo(0,e),t}function WH(e,t){xC[e]||(xC[e]=t)}function Yj(){return Yy}function HH(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function T9(e,t){t&&(lm("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function SC(e){EC(e),e.drafts_.forEach(QH),e.drafts_=null}function EC(e){e===Yy&&(Yy=e.parent_)}function P9(e){return Yy=HH(Yy,e)}function QH(e){const t=e[Is];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function $9(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return void 0!==e&&e!==r?(r[Is].modified_&&(SC(t),uo(4)),Wc(e)&&(e=Jw(t,e),t.parent_||e_(t,e)),t.patches_&&lm("Patches").generateReplacementPatches_(r[Is].base_,e,t.patches_,t.inversePatches_)):e=Jw(t,r,[]),SC(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==iA?e:void 0}function Jw(e,t,r){if(Z_(t))return t;const n=t[Is];if(!n)return _0(t,((a,o)=>z9(e,n,t,a,o,r))),t;if(n.scope_!==e)return t;if(!n.modified_)return e_(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;const t=n.copy_;let a=t,o=!1;3===n.type_&&(a=new Set(t),t.clear(),o=!0),_0(a,((a,i)=>z9(e,n,t,a,i,r,o))),e_(e,t,!1),r&&e.patches_&&lm("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function z9(e,t,r,n,a,o,i){if(qc(a)){const i=Jw(e,a,o&&t&&3!==t.type_&&!Qy(t.assigned_,n)?o.concat(n):void 0);if(Qj(r,n,i),!qc(i))return;e.canAutoFreeze_=!1}else i&&r.add(a);if(Wc(a)&&!Z_(a)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Jw(e,a),(!t||!t.scope_.parent_)&&e_(e,a)}}function e_(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&cA(t,r)}function YH(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:Yj(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let a=n,o=lA;r&&(a=[n],o=Ky);const{revoke:i,proxy:s}=Proxy.revocable(a,o);return n.draft_=s,n.revoke_=i,s}var lA={get(e,t){if(t===Is)return e;const r=Qh(e);if(!Qy(r,t))return KH(e,r,t);const n=r[t];return e.finalized_||!Wc(n)?n:n===Zx(e.base_,t)?(Jx(e),e.copy_[t]=IC(n,e)):n},has:(e,t)=>t in Qh(e),ownKeys:e=>Reflect.ownKeys(Qh(e)),set(e,t,r){const n=Kj(Qh(e),t);if(null!=n&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const n=Zx(Qh(e),t),a=null==n?void 0:n[Is];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(GH(r,n)&&(void 0!==r||Qy(e.base_,t)))return!0;Jx(e),CC(e)}return e.copy_[t]===r&&(void 0!==r||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==Zx(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,Jx(e),CC(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const r=Qh(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:n.enumerable,value:r[t]}},defineProperty(){uo(11)},getPrototypeOf:e=>im(e.base_),setPrototypeOf(){uo(12)}},Ky={};function Zx(e,t){const r=e[Is];return(r?Qh(r):e)[t]}function KH(e,t,r){var n;const a=Kj(t,r);return a?"value"in a?a.value:null==(n=a.get)?void 0:n.call(e.draft_):void 0}function Kj(e,t){if(!(t in e))return;let r=im(e);for(;r;){const e=Object.getOwnPropertyDescriptor(r,t);if(e)return e;r=im(r)}}function CC(e){e.modified_||(e.modified_=!0,e.parent_&&CC(e.parent_))}function Jx(e){e.copy_||(e.copy_=kC(e.base_,e.scope_.immer_.useStrictShallowCopy_))}_0(lA,((e,t)=>{Ky[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Ky.deleteProperty=function(e,t){return Ky.set.call(this,e,t,void 0)},Ky.set=function(e,t,r){return lA.set.call(this,e[0],t,r,e[0])};var XH=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,r)=>{if("function"==typeof e&&"function"!=typeof t){const r=t;t=e;const n=this;return function(e=r,...a){return n.produce(e,(e=>t.call(this,e,...a)))}}let n;if("function"!=typeof t&&uo(6),void 0!==r&&"function"!=typeof r&&uo(7),Wc(e)){const a=P9(this),o=IC(e,void 0);let i=!0;try{n=t(o),i=!1}finally{i?SC(a):EC(a)}return T9(a,r),$9(n,a)}if(!e||"object"!=typeof e){if(n=t(e),void 0===n&&(n=e),n===iA&&(n=void 0),this.autoFreeze_&&cA(n,!0),r){const t=[],a=[];lm("Patches").generateReplacementPatches_(e,n,t,a),r(t,a)}return n}uo(1,e)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...r)=>this.produceWithPatches(t,(t=>e(t,...r)));let r,n;return[this.produce(e,t,((e,t)=>{r=e,n=t})),r,n]},"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){Wc(e)||uo(8),qc(e)&&(e=Xj(e));const t=P9(this),r=IC(e,void 0);return r[Is].isManual_=!0,EC(t),r}finishDraft(e,t){const r=e&&e[Is];(!r||!r.isManual_)&&uo(9);const{scope_:n}=r;return T9(n,t),$9(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const n=t[r];if(0===n.path.length&&"replace"===n.op){e=n.value;break}}r>-1&&(t=t.slice(r+1));const n=lm("Patches").applyPatches_;return qc(e)?n(e,t):this.produce(e,(e=>n(e,t)))}};function IC(e,t){const r=zv(e)?lm("MapSet").proxyMap_(e,t):Mv(e)?lm("MapSet").proxySet_(e,t):YH(e,t);return(t?t.scope_:Yj()).drafts_.push(r),r}function Xj(e){return qc(e)||uo(10,e),Zj(e)}function Zj(e){if(!Wc(e)||Z_(e))return e;const t=e[Is];let r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=kC(e,t.scope_.immer_.useStrictShallowCopy_)}else r=kC(e,!0);return _0(r,((e,t)=>{Qj(r,e,Zj(t))})),t&&(t.finalized_=!1),r}function ZH(){const e="replace",t="remove";function r(e){if(!Wc(e))return e;if(Array.isArray(e))return e.map(r);if(zv(e))return new Map(Array.from(e.entries()).map((([e,t])=>[e,r(t)])));if(Mv(e))return new Set(Array.from(e).map(r));const t=Object.create(im(e));for(const n in e)t[n]=r(e[n]);return Qy(e,zy)&&(t[zy]=e[zy]),t}function n(e){return qc(e)?r(e):e}WH("Patches",{applyPatches_:function(n,a){return a.forEach((a=>{const{path:o,op:i}=a;let s=n;for(let e=0;e<o.length-1;e++){const t=cm(s);let r=o[e];"string"!=typeof r&&"number"!=typeof r&&(r=""+r),(0===t||1===t)&&("__proto__"===r||"constructor"===r)&&uo(19),"function"==typeof s&&"prototype"===r&&uo(19),s=Xx(s,r),"object"!=typeof s&&uo(18,o.join("/"))}const l=cm(s),c=r(a.value),u=o[o.length-1];switch(i){case e:switch(l){case 2:return s.set(u,c);case 3:uo(16);default:return s[u]=c}case"add":switch(l){case 1:return"-"===u?s.push(c):s.splice(u,0,c);case 2:return s.set(u,c);case 3:return s.add(c);default:return s[u]=c}case t:switch(l){case 1:return s.splice(u,1);case 2:return s.delete(u);case 3:return s.delete(a.value);default:return delete s[u]}default:uo(17,i)}})),n},generatePatches_:function(r,a,o,i){switch(r.type_){case 0:case 2:return function(r,a,o,i){const{base_:s,copy_:l}=r;_0(r.assigned_,((r,c)=>{const u=Xx(s,r),f=Xx(l,r),d=c?Qy(s,r)?e:"add":t;if(u===f&&d===e)return;const p=a.concat(r);o.push(d===t?{op:d,path:p}:{op:d,path:p,value:f}),i.push("add"===d?{op:t,path:p}:d===t?{op:"add",path:p,value:n(u)}:{op:e,path:p,value:n(u)})}))}(r,a,o,i);case 1:return function(r,a,o,i){let{base_:s,assigned_:l}=r,c=r.copy_;c.length<s.length&&([s,c]=[c,s],[o,i]=[i,o]);for(let t=0;t<s.length;t++)if(l[t]&&c[t]!==s[t]){const r=a.concat([t]);o.push({op:e,path:r,value:n(c[t])}),i.push({op:e,path:r,value:n(s[t])})}for(let e=s.length;e<c.length;e++){const t=a.concat([e]);o.push({op:"add",path:t,value:n(c[e])})}for(let e=c.length-1;s.length<=e;--e){const r=a.concat([e]);i.push({op:t,path:r})}}(r,a,o,i);case 3:return function(e,r,n,a){let{base_:o,copy_:i}=e,s=0;o.forEach((e=>{if(!i.has(e)){const o=r.concat([s]);n.push({op:t,path:o,value:e}),a.unshift({op:"add",path:o,value:e})}s++})),s=0,i.forEach((e=>{if(!o.has(e)){const o=r.concat([s]);n.push({op:"add",path:o,value:e}),a.unshift({op:t,path:o,value:e})}s++}))}(r,a,o,i)}},generateReplacementPatches_:function(t,r,n,a){n.push({op:e,path:[],value:r===iA?void 0:r}),a.push({op:e,path:[],value:t})}})}var oi=new XH,Ov=oi.produce,Jj=oi.produceWithPatches.bind(oi);oi.setAutoFreeze.bind(oi),oi.setUseStrictShallowCopy.bind(oi);var M9=oi.applyPatches.bind(oi);function JH(e,t="expected a function, instead received "+typeof e){if("function"!=typeof e)throw new TypeError(t)}function eQ(e,t="expected an object, instead received "+typeof e){if("object"!=typeof e)throw new TypeError(t)}function tQ(e,t="expected all items to be functions, instead received the following types: "){if(!e.every((e=>"function"==typeof e))){const r=e.map((e=>"function"==typeof e?`function ${e.name||"unnamed"}()`:typeof e)).join(", ");throw new TypeError(`${t}[${r}]`)}}oi.createDraft.bind(oi),oi.finishDraft.bind(oi);var O9=e=>Array.isArray(e)?e:[e];function nQ(e){const t=Array.isArray(e[0])?e[0]:e;return tQ(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function rQ(e,t){const r=[],{length:n}=e;for(let a=0;a<n;a++)r.push(e[a].apply(null,t));return r}var aQ=class{constructor(e){this.value=e}deref(){return this.value}},oQ=typeof WeakRef<"u"?WeakRef:aQ,sQ=0,N9=1;function Ub(){return{s:sQ,v:void 0,o:null,p:null}}function Xy(e,t={}){let r=Ub();const{resultEqualityCheck:n}=t;let a,o=0;function i(){var t;let i=r;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 r=e.get(t);void 0===r?(i=Ub(),e.set(t,i)):i=r}else{let e=i.p;null===e&&(i.p=e=new Map);const r=e.get(t);void 0===r?(i=Ub(),e.set(t,i)):i=r}}const l=i;let c;if(i.s===N9?c=i.v:(c=e.apply(null,arguments),o++),l.s=N9,n){const e=(null==(t=null==a?void 0:a.deref)?void 0:t.call(a))??a;null!=e&&n(e,c)&&(c=e,0!==o&&o--),a="object"==typeof c&&null!==c||"function"==typeof c?new oQ(c):c}return l.v=c,c}return i.clearCache=()=>{r=Ub(),i.resetResultsCount()},i.resultsCount=()=>o,i.resetResultsCount=()=>{o=0},i}function e8(e,...t){const r="function"==typeof e?{memoize:e,memoizeOptions:t}:e,n=(...e)=>{let t,n=0,a=0,o={},i=e.pop();"object"==typeof i&&(o=i,i=e.pop()),JH(i,`createSelector expects an output function after the inputs, but received: [${typeof i}]`);const s={...r,...o},{memoize:l,memoizeOptions:c=[],argsMemoize:u=Xy,argsMemoizeOptions:f=[],devModeChecks:d={}}=s,p=O9(c),h=O9(f),g=nQ(e),m=l((function(){return n++,i.apply(null,arguments)}),...p),y=u((function(){a++;const e=rQ(g,arguments);return t=m.apply(null,e),t}),...h);return Object.assign(y,{resultFunc:i,memoizedResultFunc:m,dependencies:g,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>t,recomputations:()=>n,resetRecomputations:()=>{n=0},memoize:l,argsMemoize:u})};return Object.assign(n,{withTypes:()=>n}),n}var zr=e8(Xy),iQ=Object.assign(((e,t=zr)=>{eQ(e,"createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+typeof e);const r=Object.keys(e);return t(r.map((t=>e[t])),((...e)=>e.reduce(((e,t,n)=>(e[r[n]]=t,e)),{})))}),{withTypes:()=>iQ}),cQ=(...e)=>{const t=e8(...e),r=Object.assign(((...e)=>{const r=t(...e),n=(e,...t)=>r(qc(e)?Xj(e):e,...t);return Object.assign(n,r),n}),{withTypes:()=>r});return r};cQ(Xy);var lQ=e=>e&&"function"==typeof e.match;function kr(e,t){function r(...r){if(t){let n=t(...r);if(!n)throw new Error(po(0));return{type:e,payload:n.payload,..."meta"in n&&{meta:n.meta},..."error"in n&&{error:n.error}}}return{type:e,payload:r[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=t=>Wj(t)&&t.type===e,r}function D9(e){return Wc(e)?Ov(e,(()=>{})):e}function AC(e,t,r){if(e.has(t)){let n=e.get(t);return r.update&&(n=r.update(n,t,e),e.set(t,n)),n}if(!r.insert)throw new Error(po(10));const n=r.insert(t,e);return e.set(t,n),n}var wy="RTK_autoBatch",Y1=()=>e=>({payload:e,meta:{[wy]:!0}});function t8(e){const t={},r=[];let n;const a={addCase(e,r){const n="string"==typeof e?e:e.type;if(!n)throw new Error(po(28));if(n in t)throw new Error(po(29));return t[n]=r,a},addMatcher:(e,t)=>(r.push({matcher:e,reducer:t}),a),addDefaultCase:e=>(n=e,a)};return e(a),[t,r,n]}function uQ(e){return"function"==typeof e}function fQ(e,t){let r,[n,a,o]=t8(t);if(uQ(e))r=()=>D9(e());else{const t=D9(e);r=()=>t}function i(e=r(),t){let i=[n[t.type],...a.filter((({matcher:e})=>e(t))).map((({reducer:e})=>e))];return 0===i.filter((e=>!!e)).length&&(i=[o]),i.reduce(((e,r)=>{if(r){if(qc(e)){const n=r(e,t);return void 0===n?e:n}if(Wc(e))return Ov(e,(e=>r(e,t)));{const n=r(e,t);if(void 0===n){if(null===e)return e;throw new Error(po(9))}return n}}return e}),e)}return i.getInitialState=r,i}var dQ="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",J_=(e=21)=>{let t="",r=e;for(;r--;)t+=dQ[64*Math.random()|0];return t},n8=(e,t)=>lQ(e)?e.match(t):e(t);function gp(...e){return t=>e.some((e=>n8(e,t)))}function My(...e){return t=>e.every((e=>n8(e,t)))}function e2(e,t){if(!e||!e.meta)return!1;const r="string"==typeof e.meta.requestId,n=t.indexOf(e.meta.requestStatus)>-1;return r&&n}function Nv(e){return"function"==typeof e[0]&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function uA(...e){return 0===e.length?e=>e2(e,["pending"]):Nv(e)?t=>gp(...e.map((e=>e.pending)))(t):uA()(e[0])}function k0(...e){return 0===e.length?e=>e2(e,["rejected"]):Nv(e)?t=>gp(...e.map((e=>e.rejected)))(t):k0()(e[0])}function t2(...e){const t=e=>e&&e.meta&&e.meta.rejectedWithValue;return 0===e.length||Nv(e)?r=>My(k0(...e),t)(r):t2()(e[0])}function yp(...e){return 0===e.length?e=>e2(e,["fulfilled"]):Nv(e)?t=>gp(...e.map((e=>e.fulfilled)))(t):yp()(e[0])}function RC(...e){return 0===e.length?e=>e2(e,["pending","fulfilled","rejected"]):Nv(e)?t=>{const r=[];for(const t of e)r.push(t.pending,t.rejected,t.fulfilled);return gp(...r)(t)}:RC()(e[0])}var pQ=["name","message","stack","code"],e3=class{constructor(e,t){An(this,"_type"),this.payload=e,this.meta=t}},j9=class{constructor(e,t){An(this,"_type"),this.payload=e,this.meta=t}},hQ=e=>{if("object"==typeof e&&null!==e){const t={};for(const r of pQ)"string"==typeof e[r]&&(t[r]=e[r]);return t}return{message:String(e)}},L9=(()=>{function e(e,t,r){const n=kr(e+"/fulfilled",((e,t,r,n)=>({payload:e,meta:{...n||{},arg:r,requestId:t,requestStatus:"fulfilled"}}))),a=kr(e+"/pending",((e,t,r)=>({payload:void 0,meta:{...r||{},arg:t,requestId:e,requestStatus:"pending"}}))),o=kr(e+"/rejected",((e,t,n,a,o)=>({payload:a,error:(r&&r.serializeError||hQ)(e||"Rejected"),meta:{...o||{},arg:n,requestId:t,rejectedWithValue:!!a,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,l)=>{const c=null!=r&&r.idGenerator?r.idGenerator(e):J_(),u=new AbortController;let f,d;function p(e){d=e,u.abort()}const h=async function(){var h,g;let m;try{let o=null==(h=null==r?void 0:r.condition)?void 0:h.call(r,e,{getState:s,extra:l});if(gQ(o)&&(o=await o),!1===o||u.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const y=new Promise(((e,t)=>{f=()=>{t({name:"AbortError",message:d||"Aborted"})},u.signal.addEventListener("abort",f)}));i(a(c,e,null==(g=null==r?void 0:r.getPendingMeta)?void 0:g.call(r,{requestId:c,arg:e},{getState:s,extra:l}))),m=await Promise.race([y,Promise.resolve(t(e,{dispatch:i,getState:s,extra:l,requestId:c,signal:u.signal,abort:p,rejectWithValue:(e,t)=>new e3(e,t),fulfillWithValue:(e,t)=>new j9(e,t)})).then((t=>{if(t instanceof e3)throw t;return t instanceof j9?n(t.payload,c,e,t.meta):n(t,c,e)}))])}catch(t){m=t instanceof e3?o(null,c,e,t.payload,t.meta):o(t,c,e)}finally{f&&u.signal.removeEventListener("abort",f)}return r&&!r.dispatchConditionRejection&&o.match(m)&&m.meta.condition||i(m),m}();return Object.assign(h,{abort:p,requestId:c,arg:e,unwrap:()=>h.then(mQ)})}}),{pending:a,rejected:o,fulfilled:n,settled:gp(o,n),typePrefix:e})}return e.withTypes=()=>e,e})();function mQ(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function gQ(e){return null!==e&&"object"==typeof e&&"function"==typeof e.then}var yQ=Symbol.for("rtk-slice-createasyncthunk");function vQ(e,t){return`${e}/${t}`}function bQ({creators:e}={}){var t;const r=null==(t=null==e?void 0:e.asyncThunk)?void 0:t[yQ];return function(e){const{name:t,reducerPath:n=t}=e;if(!t)throw new Error(po(11));const a=("function"==typeof e.reducers?e.reducers(_Q()):e.reducers)||{},o=Object.keys(a),i={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(e,t){const r="string"==typeof e?e:e.type;if(!r)throw new Error(po(12));if(r in i.sliceCaseReducersByType)throw new Error(po(13));return i.sliceCaseReducersByType[r]=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 l(){const[t={},r=[],n]="function"==typeof e.extraReducers?t8(e.extraReducers):[e.extraReducers],a={...t,...i.sliceCaseReducersByType};return fQ(e.initialState,(e=>{for(let t in a)e.addCase(t,a[t]);for(let t of i.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of r)e.addMatcher(t.matcher,t.reducer);n&&e.addDefaultCase(n)}))}o.forEach((n=>{const o=a[n],i={reducerName:n,type:vQ(t,n),createNotation:"function"==typeof e.reducers};xQ(o)?EQ(i,o,s,r):kQ(i,o,s)}));const c=e=>e,u=new Map;let f;function d(e,t){return f||(f=l()),f(e,t)}function p(){return f||(f=l()),f.getInitialState()}function h(t,r=!1){function n(e){let n=e[t];return typeof n>"u"&&r&&(n=p()),n}function a(t=c){const n=AC(u,r,{insert:()=>new WeakMap});return AC(n,t,{insert:()=>{const n={};for(const[a,o]of Object.entries(e.selectors??{}))n[a]=wQ(o,t,p,r);return n}})}return{reducerPath:t,getSelectors:a,get selectors(){return a(n)},selectSlice:n}}const g={name:t,reducer:d,actions:i.actionCreators,caseReducers:i.sliceCaseReducersByName,getInitialState:p,...h(n),injectInto(e,{reducerPath:t,...r}={}){const a=t??n;return e.inject({reducerPath:a,reducer:d},r),{...g,...h(a,!0)}}};return g}}function wQ(e,t,r,n){function a(a,...o){let i=t(a);return typeof i>"u"&&n&&(i=r()),e(i,...o)}return a.unwrapped=e,a}var ur=bQ();function _Q(){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 kQ({type:e,reducerName:t,createNotation:r},n,a){let o,i;if("reducer"in n){if(r&&!SQ(n))throw new Error(po(17));o=n.reducer,i=n.prepare}else o=n;a.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,i?kr(e,i):kr(e))}function xQ(e){return"asyncThunk"===e._reducerDefinitionType}function SQ(e){return"reducerWithPrepare"===e._reducerDefinitionType}function EQ({type:e,reducerName:t},r,n,a){if(!a)throw new Error(po(18));const{payloadCreator:o,fulfilled:i,pending:s,rejected:l,settled:c,options:u}=r,f=a(e,o,u);n.exposeAction(t,f),i&&n.addCase(f.fulfilled,i),s&&n.addCase(f.pending,s),l&&n.addCase(f.rejected,l),c&&n.addMatcher(f.settled,c),n.exposeCaseReducer(t,{fulfilled:i||Gb,pending:s||Gb,rejected:l||Gb,settled:c||Gb})}function Gb(){}var CQ=(e,t)=>{if("function"!=typeof e)throw new Error(po(32))},fA="listenerMiddleware",IQ=e=>{let{type:t,actionCreator:r,matcher:n,predicate:a,effect:o}=e;if(t)a=kr(t).match;else if(r)t=r.type,a=r.match;else if(n)a=n;else if(!a)throw new Error(po(21));return CQ(o),{predicate:a,type:t,effect:o}},AQ=Object.assign((e=>{const{type:t,predicate:r,effect:n}=IQ(e);return{id:J_(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(po(22))}}}),{withTypes:()=>AQ}),RQ=Object.assign(kr(`${fA}/add`),{withTypes:()=>RQ});kr(`${fA}/removeAll`);var TQ=Object.assign(kr(`${fA}/remove`),{withTypes:()=>TQ}),PQ=e=>"reducerPath"in e&&"string"==typeof e.reducerPath,$Q=e=>e.flatMap((e=>PQ(e)?[[e.reducerPath,e.reducer]]:Object.entries(e))),dA=Symbol.for("rtk-state-proxy-original"),zQ=e=>!!e&&!!e[dA],MQ=new WeakMap,OQ=(e,t)=>AC(MQ,e,{insert:()=>new Proxy(e,{get:(e,r,n)=>{if(r===dA)return e;const a=Reflect.get(e,r,n);if(typeof a>"u"){const e=t[r.toString()];if(e){const t=e(void 0,{type:J_()});if(typeof t>"u")throw new Error(po(24));return t}}return a}})}),NQ=e=>{if(!zQ(e))throw new Error(po(25));return e[dA]},DQ=(e={})=>e;function jQ(...e){const t=Object.fromEntries($Q(e)),r=()=>Object.keys(t).length?qj(t):DQ;let n=r();function a(e,t){return n(e,t)}a.withLazyLoadedSlices=()=>a;const o=Object.assign((function(e,r){return function(n,...a){return e(OQ(r?r(n,...a):n,t),...a)}}),{original:NQ});return Object.assign(a,{inject:(e,o={})=>{const{reducerPath:i,reducer:s}=e,l=t[i];return!o.overrideExisting&&l&&l!==s||(t[i]=s,n=r()),a},selector:o})}function po(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. `}var LQ={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/notifications/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/notifications/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:"377ebc54abc038e2",NODE:"/home/teamcity/.nvm/versions/node/v22.18.0/bin/node",npm_package_name:"@wellesley/notifications",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.787",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/notifications",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/notifications",EDITOR:"vi",NODE_ENV:"production",BUILD_NUMBER:"3823",APP_NAME:"@wellesley/notifications"},r8=(e=>(e.uninitialized="uninitialized",e.pending="pending",e.fulfilled="fulfilled",e.rejected="rejected",e))(r8||{});function VQ(e){return{status:e,isUninitialized:"uninitialized"===e,isLoading:"pending"===e,isSuccess:"fulfilled"===e,isError:"rejected"===e}}function BQ(e){return new RegExp("(^|:)//").test(e)}var FQ=e=>e.replace(/\/$/,""),UQ=e=>e.replace(/^\//,"");function GQ(e,t){if(!e)return t;if(!t)return e;if(BQ(t))return t;const r=e.endsWith("/")||!t.startsWith("?")?"/":"";return`${e=FQ(e)}${r}${t=UQ(t)}`}var V9=e=>[].concat(...e);function qQ(){return typeof navigator>"u"||void 0===navigator.onLine||navigator.onLine}function WQ(){return typeof document>"u"||"hidden"!==document.visibilityState}var B9=mp;function a8(e,t){if(e===t||!(B9(e)&&B9(t)||Array.isArray(e)&&Array.isArray(t)))return t;const r=Object.keys(t),n=Object.keys(e);let a=r.length===n.length;const o=Array.isArray(t)?[]:{};for(const n of r)o[n]=a8(e[n],t[n]),a&&(a=e[n]===o[n]);return a?e:o}var F9=(...e)=>fetch(...e),HQ=e=>e.status>=200&&e.status<=299,QQ=e=>/ion\/(vnd\.api\+)?json/.test(e.get("content-type")||"");function U9(e){if(!mp(e))return e;const t={...e};for(const[e,r]of Object.entries(t))void 0===r&&delete t[e];return t}function YQ({baseUrl:e,prepareHeaders:t=e=>e,fetchFn:r=F9,paramsSerializer:n,isJsonContentType:a=QQ,jsonContentType:o="application/json",jsonReplacer:i,timeout:s,responseHandler:l,validateStatus:c,...u}={}){return typeof fetch>"u"&&r===F9&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),async(d,p)=>{const{signal:h,getState:g,extra:m,endpoint:y,forced:v,type:b}=p;let w,{url:_,headers:k=new Headers(u.headers),params:x,responseHandler:E=l??"json",validateStatus:A=c??HQ,timeout:S=s,...C}="string"==typeof d?{url:d}:d,z={...u,signal:h,...C};k=new Headers(U9(k)),z.headers=await t(k,{getState:g,extra:m,endpoint:y,forced:v,type:b})||k;const I=e=>"object"==typeof e&&(mp(e)||Array.isArray(e)||"function"==typeof e.toJSON);if(!z.headers.has("content-type")&&I(z.body)&&z.headers.set("content-type",o),I(z.body)&&a(z.headers)&&(z.body=JSON.stringify(z.body,i)),x){const e=~_.indexOf("?")?"&":"?";_+=e+(n?n(x):new URLSearchParams(U9(x)))}_=GQ(e,_);const j=new Request(_,z);w={request:new Request(_,z)};let P,T=!1,R=S&&setTimeout((()=>{T=!0,p.abort()}),S);try{P=await r(j)}catch(e){return{error:{status:T?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(e)},meta:w}}finally{R&&clearTimeout(R)}const N=P.clone();w.response=N;let O,M="";try{let e;if(await Promise.all([f(P,E).then((e=>O=e),(t=>e=t)),N.text().then((e=>M=e),(()=>{}))]),e)throw e}catch(e){return{error:{status:"PARSING_ERROR",originalStatus:P.status,data:M,error:String(e)},meta:w}}return A(P,O)?{data:O,meta:w}:{error:{status:P.status,data:O},meta:w}};async function f(e,t){if("function"==typeof t)return t(e);if("content-type"===t&&(t=a(e.headers)?"json":"text"),"json"===t){const t=await e.text();return t.length?JSON.parse(t):null}return e.text()}}var G9=class{constructor(e,t=void 0){this.value=e,this.meta=t}},pA=kr("__rtkq/focused"),o8=kr("__rtkq/unfocused"),hA=kr("__rtkq/online"),s8=kr("__rtkq/offline");function i8(e){return"query"===e.type}function KQ(e){return"mutation"===e.type}function mA(e,t,r,n,a,o){return XQ(e)?e(t,r,n,a).map(TC).map(o):Array.isArray(e)?e.map(TC).map(o):[]}function XQ(e){return"function"==typeof e}function TC(e){return"string"==typeof e?{type:e}:e}function q9(e){return null!=e}function h0(e){let t=0;for(const r in e)t++;return t}function ZQ(e,t){return e.catch(t)}var Zy=Symbol("forceQueryFn"),PC=e=>"function"==typeof e[Zy];function JQ({serializeQueryArgs:e,queryThunk:t,mutationThunk:r,api:n,context:a}){const o=new Map,i=new Map,{unsubscribeQueryResult:s,removeMutationResult:l,updateSubscriptionOptions:c}=n.internalActions;return{buildInitiateQuery:function(r,a){const i=(l,{subscribe:u=!0,forceRefetch:f,subscriptionOptions:d,[Zy]:p,...h}={})=>(g,m)=>{var y;const v=e({queryArgs:l,endpointDefinition:a,endpointName:r}),b=t({...h,type:"query",subscribe:u,forceRefetch:f,subscriptionOptions:d,endpointName:r,originalArgs:l,queryCacheKey:v,[Zy]:p}),w=n.endpoints[r].select(l),_=g(b),k=w(m()),{requestId:x,abort:E}=_,A=k.requestId!==x,S=null==(y=o.get(g))?void 0:y[v],C=()=>w(m()),z=Object.assign(p?_.then(C):A&&!S?Promise.resolve(k):Promise.all([S,_]).then(C),{arg:l,requestId:x,subscriptionOptions:d,queryCacheKey:v,abort:E,async unwrap(){const e=await z;if(e.isError)throw e.error;return e.data},refetch:()=>g(i(l,{subscribe:!1,forceRefetch:!0})),unsubscribe(){u&&g(s({queryCacheKey:v,requestId:x}))},updateSubscriptionOptions(e){z.subscriptionOptions=e,g(c({endpointName:r,requestId:x,queryCacheKey:v,options:e}))}});if(!S&&!A&&!p){const e=o.get(g)||{};e[v]=z,o.set(g,e),z.then((()=>{delete e[v],h0(e)||o.delete(g)}))}return z};return i},buildInitiateMutation:function(e){return(t,{track:n=!0,fixedCacheKey:a}={})=>(o,s)=>{const c=r({type:"mutation",endpointName:e,originalArgs:t,track:n,fixedCacheKey:a}),u=o(c),{requestId:f,abort:d,unwrap:p}=u,h=ZQ(u.unwrap().then((e=>({data:e}))),(e=>({error:e}))),g=Object.assign(h,{arg:u.arg,requestId:f,abort:d,unwrap:p,reset:()=>{o(l({requestId:f,fixedCacheKey:a}))}}),m=i.get(o)||{};return i.set(o,m),m[f]=g,g.then((()=>{delete m[f],h0(m)||i.delete(o)})),a&&(m[a]=g,g.then((()=>{m[a]===g&&(delete m[a],h0(m)||i.delete(o))}))),g}},getRunningQueryThunk:function(t,r){return n=>{var i;const s=a.endpointDefinitions[t],l=e({queryArgs:r,endpointDefinition:s,endpointName:t});return null==(i=o.get(n))?void 0:i[l]}},getRunningMutationThunk:function(e,t){return e=>{var r;return null==(r=i.get(e))?void 0:r[t]}},getRunningQueriesThunk:function(){return e=>Object.values(o.get(e)||{}).filter(q9)},getRunningMutationsThunk:function(){return e=>Object.values(i.get(e)||{}).filter(q9)}}}function W9(e){return e}function eY({reducerPath:e,baseQuery:t,context:{endpointDefinitions:r},serializeQueryArgs:n,api:a,assertTagType:o}){const i=async(e,{signal:n,abort:a,rejectWithValue:o,fulfillWithValue:i,dispatch:l,getState:c,extra:u})=>{const f=r[e.endpointName];try{let r,o=W9;const d={signal:n,abort:a,dispatch:l,getState:c,extra:u,endpoint:e.endpointName,type:e.type,forced:"query"===e.type?s(e,c()):void 0},p="query"===e.type?e[Zy]:void 0;if(p?r=p():f.query?(r=await t(f.query(e.originalArgs),d,f.extraOptions),f.transformResponse&&(o=f.transformResponse)):r=await f.queryFn(e.originalArgs,d,f.extraOptions,(e=>t(e,d,f.extraOptions))),typeof process<"u"&&LQ.NODE_ENV,r.error)throw new G9(r.error,r.meta);return i(await o(r.data,r.meta,e.originalArgs),{fulfilledTimeStamp:Date.now(),baseQueryMeta:r.meta,[wy]:!0})}catch(t){let r=t;if(r instanceof G9){let t=W9;f.query&&f.transformErrorResponse&&(t=f.transformErrorResponse);try{return o(await t(r.value,r.meta,e.originalArgs),{baseQueryMeta:r.meta,[wy]:!0})}catch(e){r=e}}throw console.error(r),r}};function s(t,r){var n,a,o;const i=null==(a=null==(n=r[e])?void 0:n.queries)?void 0:a[t.queryCacheKey],s=null==(o=r[e])?void 0:o.config.refetchOnMountOrArgChange,l=null==i?void 0:i.fulfilledTimeStamp,c=t.forceRefetch??(t.subscribe&&s);return!!c&&(!0===c||(Number(new Date)-Number(l))/1e3>=c)}const l=L9(`${e}/executeQuery`,i,{getPendingMeta:()=>({startedTimeStamp:Date.now(),[wy]:!0}),condition(t,{getState:n}){var a,o,i;const l=n(),c=null==(o=null==(a=l[e])?void 0:a.queries)?void 0:o[t.queryCacheKey],u=null==c?void 0:c.fulfilledTimeStamp,f=t.originalArgs,d=null==c?void 0:c.originalArgs,p=r[t.endpointName];return!!PC(t)||"pending"!==(null==c?void 0:c.status)&&(!!(s(t,l)||i8(p)&&null!=(i=null==p?void 0:p.forceRefetch)&&i.call(p,{currentArg:f,previousArg:d,endpointState:c,state:l}))||!u)},dispatchConditionRejection:!0}),c=L9(`${e}/executeMutation`,i,{getPendingMeta:()=>({startedTimeStamp:Date.now(),[wy]:!0})});function u(e){return t=>{var r,n;return(null==(n=null==(r=null==t?void 0:t.meta)?void 0:r.arg)?void 0:n.endpointName)===e}}return{queryThunk:l,mutationThunk:c,prefetch:(e,t,r)=>(n,o)=>{const i=(e=>"force"in e)(r)&&r.force,s=(e=>"ifOlderThan"in e)(r)&&r.ifOlderThan,l=(r=!0)=>{const n={forceRefetch:r,isPrefetch:!0};return a.endpoints[e].initiate(t,n)},c=a.endpoints[e].select(t)(o());if(i)n(l());else if(s){const e=null==c?void 0:c.fulfilledTimeStamp;if(!e)return void n(l());(Number(new Date)-Number(new Date(e)))/1e3>=s&&n(l())}else n(l(!1))},updateQueryData:(e,t,r,n=!0)=>(o,i)=>{const s=a.endpoints[e].select(t)(i());let l,c={patches:[],inversePatches:[],undo:()=>o(a.util.patchQueryData(e,t,c.inversePatches,n))};if("uninitialized"===s.status)return c;if("data"in s)if(Wc(s.data)){const[e,t,n]=Jj(s.data,r);c.patches.push(...t),c.inversePatches.push(...n),l=e}else l=r(s.data),c.patches.push({op:"replace",path:[],value:l}),c.inversePatches.push({op:"replace",path:[],value:s.data});return o(a.util.patchQueryData(e,t,c.patches,n)),c},upsertQueryData:(e,t,r)=>n=>n(a.endpoints[e].initiate(t,{subscribe:!1,forceRefetch:!0,[Zy]:()=>({data:r})})),patchQueryData:(e,t,i,s)=>(l,c)=>{const u=r[e],f=n({queryArgs:t,endpointDefinition:u,endpointName:e});if(l(a.internalActions.queryResultPatched({queryCacheKey:f,patches:i})),!s)return;const d=a.endpoints[e].select(t)(c()),p=mA(u.providesTags,d.data,void 0,t,{},o);l(a.internalActions.updateProvidedBy({queryCacheKey:f,providedTags:p}))},buildMatchThunkActions:function(e,t){return{matchPending:My(uA(e),u(t)),matchFulfilled:My(yp(e),u(t)),matchRejected:My(k0(e),u(t))}}}}function c8(e,t,r,n){return mA(r[e.meta.arg.endpointName][t],yp(e)?e.payload:void 0,t2(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,n)}function qb(e,t,r){const n=e[t];n&&r(n)}function Jy(e){return("arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)??e.requestId}function H9(e,t,r){const n=e[Jy(t)];n&&r(n)}var K1={};function tY({reducerPath:e,queryThunk:t,mutationThunk:r,context:{endpointDefinitions:n,apiUid:a,extractRehydrationInfo:o,hasRehydrationInfo:i},assertTagType:s,config:l}){const c=kr(`${e}/resetApiState`),u=ur({name:`${e}/queries`,initialState:K1,reducers:{removeQueryResult:{reducer(e,{payload:{queryCacheKey:t}}){delete e[t]},prepare:Y1()},queryResultPatched:{reducer(e,{payload:{queryCacheKey:t,patches:r}}){qb(e,t,(e=>{e.data=M9(e.data,r.concat())}))},prepare:Y1()}},extraReducers(e){e.addCase(t.pending,((e,{meta:t,meta:{arg:r}})=>{var n;const a=PC(r);e[n=r.queryCacheKey]??(e[n]={status:"uninitialized",endpointName:r.endpointName}),qb(e,r.queryCacheKey,(e=>{e.status="pending",e.requestId=a&&e.requestId?e.requestId:t.requestId,void 0!==r.originalArgs&&(e.originalArgs=r.originalArgs),e.startedTimeStamp=t.startedTimeStamp}))})).addCase(t.fulfilled,((e,{meta:t,payload:r})=>{qb(e,t.arg.queryCacheKey,(e=>{if(e.requestId!==t.requestId&&!PC(t.arg))return;const{merge:a}=n[t.arg.endpointName];if(e.status="fulfilled",a)if(void 0!==e.data){const{fulfilledTimeStamp:n,arg:o,baseQueryMeta:i,requestId:s}=t;let l=Ov(e.data,(e=>a(e,r,{arg:o.originalArgs,baseQueryMeta:i,fulfilledTimeStamp:n,requestId:s})));e.data=l}else e.data=r;else e.data=n[t.arg.endpointName].structuralSharing??1?a8(qc(e.data)?UH(e.data):e.data,r):r;delete e.error,e.fulfilledTimeStamp=t.fulfilledTimeStamp}))})).addCase(t.rejected,((e,{meta:{condition:t,arg:r,requestId:n},error:a,payload:o})=>{qb(e,r.queryCacheKey,(e=>{if(!t){if(e.requestId!==n)return;e.status="rejected",e.error=o??a}}))})).addMatcher(i,((e,t)=>{const{queries:r}=o(t);for(const[t,n]of Object.entries(r))("fulfilled"===(null==n?void 0:n.status)||"rejected"===(null==n?void 0:n.status))&&(e[t]=n)}))}}),f=ur({name:`${e}/mutations`,initialState:K1,reducers:{removeMutationResult:{reducer(e,{payload:t}){const r=Jy(t);r in e&&delete e[r]},prepare:Y1()}},extraReducers(e){e.addCase(r.pending,((e,{meta:t,meta:{requestId:r,arg:n,startedTimeStamp:a}})=>{n.track&&(e[Jy(t)]={requestId:r,status:"pending",endpointName:n.endpointName,startedTimeStamp:a})})).addCase(r.fulfilled,((e,{payload:t,meta:r})=>{r.arg.track&&H9(e,r,(e=>{e.requestId===r.requestId&&(e.status="fulfilled",e.data=t,e.fulfilledTimeStamp=r.fulfilledTimeStamp)}))})).addCase(r.rejected,((e,{payload:t,error:r,meta:n})=>{n.arg.track&&H9(e,n,(e=>{e.requestId===n.requestId&&(e.status="rejected",e.error=t??r)}))})).addMatcher(i,((e,t)=>{const{mutations:r}=o(t);for(const[t,n]of Object.entries(r))("fulfilled"===(null==n?void 0:n.status)||"rejected"===(null==n?void 0:n.status))&&t!==(null==n?void 0:n.requestId)&&(e[t]=n)}))}}),d=ur({name:`${e}/invalidation`,initialState:K1,reducers:{updateProvidedBy:{reducer(e,t){var r,n;const{queryCacheKey:a,providedTags:o}=t.payload;for(const t of Object.values(e))for(const e of Object.values(t)){const t=e.indexOf(a);-1!==t&&e.splice(t,1)}for(const{type:t,id:i}of o){const o=(r=e[t]??(e[t]={}))[n=i||"__internal_without_id"]??(r[n]=[]);o.includes(a)||o.push(a)}},prepare:Y1()}},extraReducers(e){e.addCase(u.actions.removeQueryResult,((e,{payload:{queryCacheKey:t}})=>{for(const r of Object.values(e))for(const e of Object.values(r)){const r=e.indexOf(t);-1!==r&&e.splice(r,1)}})).addMatcher(i,((e,t)=>{var r,n;const{provided:a}=o(t);for(const[t,o]of Object.entries(a))for(const[a,i]of Object.entries(o)){const o=(r=e[t]??(e[t]={}))[n=a||"__internal_without_id"]??(r[n]=[]);for(const e of i)o.includes(e)||o.push(e)}})).addMatcher(gp(yp(t),t2(t)),((e,t)=>{const r=c8(t,"providesTags",n,s),{queryCacheKey:a}=t.meta.arg;d.caseReducers.updateProvidedBy(e,d.actions.updateProvidedBy({queryCacheKey:a,providedTags:r}))}))}}),p=ur({name:`${e}/subscriptions`,initialState:K1,reducers:{updateSubscriptionOptions(e,t){},unsubscribeQueryResult(e,t){},internal_getRTKQSubscriptions(){}}}),h=ur({name:`${e}/internalSubscriptions`,initialState:K1,reducers:{subscriptionsUpdated:{reducer:(e,t)=>M9(e,t.payload),prepare:Y1()}}}),g=ur({name:`${e}/config`,initialState:{online:qQ(),focused:WQ(),middlewareRegistered:!1,...l},reducers:{middlewareRegistered(e,{payload:t}){e.middlewareRegistered="conflict"!==e.middlewareRegistered&&a===t||"conflict"}},extraReducers:e=>{e.addCase(hA,(e=>{e.online=!0})).addCase(s8,(e=>{e.online=!1})).addCase(pA,(e=>{e.focused=!0})).addCase(o8,(e=>{e.focused=!1})).addMatcher(i,(e=>({...e})))}}),m=qj({queries:u.reducer,mutations:f.reducer,provided:d.reducer,subscriptions:h.reducer,config:g.reducer});return{reducer:(e,t)=>m(c.match(t)?void 0:e,t),actions:{...g.actions,...u.actions,...p.actions,...h.actions,...f.actions,...d.actions,resetApiState:c}}}var Jh=Symbol.for("RTKQ/skipToken"),l8={status:"uninitialized"},Q9=Ov(l8,(()=>{})),Y9=Ov(l8,(()=>{}));function nY({serializeQueryArgs:e,reducerPath:t,createSelector:r}){const n=e=>Q9,a=e=>Y9;return{buildQuerySelector:function(t,a){return s=>{const l=e({queryArgs:s,endpointDefinition:a,endpointName:t});return r(s===Jh?n:e=>{var t,r;return(null==(r=null==(t=i(e))?void 0:t.queries)?void 0:r[l])??Q9},o)}},buildMutationSelector:function(){return e=>{let t;return t="object"==typeof e?Jy(e)??Jh:e,r(t===Jh?a:e=>{var r,n;return(null==(n=null==(r=i(e))?void 0:r.mutations)?void 0:n[t])??Y9},o)}},selectInvalidatedBy:function(e,r){const n=e[t],a=new Set;for(const e of r.map(TC)){const t=n.provided[e.type];if(!t)continue;let r=(void 0!==e.id?t[e.id]:V9(Object.values(t)))??[];for(const e of r)a.add(e)}return V9(Array.from(a.values()).map((e=>{const t=n.queries[e];return t?[{queryCacheKey:e,endpointName:t.endpointName,originalArgs:t.originalArgs}]:[]})))},selectCachedArgsForQuery:function(e,r){return Object.values(e[t].queries).filter((e=>(null==e?void 0:e.endpointName)===r&&"uninitialized"!==e.status)).map((e=>e.originalArgs))}};function o(e){return{...e,...VQ(e.status)}}function i(e){return e[t]}}var Kg=WeakMap?new WeakMap:void 0,K9=({endpointName:e,queryArgs:t})=>{let r="";const n=null==Kg?void 0:Kg.get(t);if("string"==typeof n)r=n;else{const e=JSON.stringify(t,((e,t)=>mp(t)?Object.keys(t).sort().reduce(((e,r)=>(e[r]=t[r],e)),{}):t));mp(t)&&(null==Kg||Kg.set(t,e)),r=e}return`${e}(${r})`};function rY(...e){return function(t){const r=Xy((e=>{var r;return null==(r=t.extractRehydrationInfo)?void 0:r.call(t,e,{reducerPath:t.reducerPath??"api"})})),n={reducerPath:"api",keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1,invalidationBehavior:"delayed",...t,extractRehydrationInfo:r,serializeQueryArgs(e){let r=K9;if("serializeQueryArgs"in e.endpointDefinition){const t=e.endpointDefinition.serializeQueryArgs;r=e=>{const r=t(e);return"string"==typeof r?r:K9({...e,queryArgs:r})}}else t.serializeQueryArgs&&(r=t.serializeQueryArgs);return r(e)},tagTypes:[...t.tagTypes||[]]},a={endpointDefinitions:{},batch(e){e()},apiUid:J_(),extractRehydrationInfo:r,hasRehydrationInfo:Xy((e=>null!=r(e)))},o={injectEndpoints:function(e){const t=e.endpoints({query:e=>({...e,type:"query"}),mutation:e=>({...e,type:"mutation"})});for(const[r,n]of Object.entries(t))if(!0!==e.overrideExisting&&r in a.endpointDefinitions){if("throw"===e.overrideExisting)throw new Error(po(39))}else{a.endpointDefinitions[r]=n;for(const e of i)e.injectEndpoint(r,n)}return o},enhanceEndpoints({addTagTypes:e,endpoints:t}){if(e)for(const t of e)n.tagTypes.includes(t)||n.tagTypes.push(t);if(t)for(const[e,r]of Object.entries(t))"function"==typeof r?r(a.endpointDefinitions[e]):Object.assign(a.endpointDefinitions[e]||{},r);return o}},i=e.map((e=>e.init(o,n,a)));return o.injectEndpoints({endpoints:t.endpoints})}}function aY(e){for(let t in e)return!1;return!0}var oY=2147482.647,sY=({reducerPath:e,api:t,context:r,internalState:n})=>{const{removeQueryResult:a,unsubscribeQueryResult:o}=t.internalActions;function i(e){const t=n.currentSubscriptions[e];return!!t&&!aY(t)}const s={};function l(e,t,n,o){const l=r.endpointDefinitions[t],c=(null==l?void 0:l.keepUnusedDataFor)??o.keepUnusedDataFor;if(c===1/0)return;const u=Math.max(0,Math.min(c,oY));if(!i(e)){const t=s[e];t&&clearTimeout(t),s[e]=setTimeout((()=>{i(e)||n.dispatch(a({queryCacheKey:e})),delete s[e]}),1e3*u)}}return(n,a,i)=>{var c;if(o.match(n)){const t=a.getState()[e],{queryCacheKey:r}=n.payload;l(r,null==(c=t.queries[r])?void 0:c.endpointName,a,t.config)}if(t.util.resetApiState.match(n))for(const[e,t]of Object.entries(s))t&&clearTimeout(t),delete s[e];if(r.hasRehydrationInfo(n)){const t=a.getState()[e],{queries:o}=r.extractRehydrationInfo(n);for(const[e,r]of Object.entries(o))l(e,null==r?void 0:r.endpointName,a,t.config)}}},iY=({reducerPath:e,context:t,context:{endpointDefinitions:r},mutationThunk:n,queryThunk:a,api:o,assertTagType:i,refetchQuery:s,internalState:l})=>{const{removeQueryResult:c}=o.internalActions,u=gp(yp(n),t2(n)),f=gp(yp(n,a),k0(n,a));let d=[];function p(r,n){const a=n.getState(),i=a[e];if(d.push(...r),"delayed"===i.config.invalidationBehavior&&function(e){var t,r;for(const r in e.queries)if("pending"===(null==(t=e.queries[r])?void 0:t.status))return!0;for(const t in e.mutations)if("pending"===(null==(r=e.mutations[t])?void 0:r.status))return!0;return!1}(i))return;const u=d;if(d=[],0===u.length)return;const f=o.util.selectInvalidatedBy(a,u);t.batch((()=>{const e=Array.from(f.values());for(const{queryCacheKey:t}of e){const e=i.queries[t],r=l.currentSubscriptions[t]??{};e&&(0===h0(r)?n.dispatch(c({queryCacheKey:t})):"uninitialized"!==e.status&&n.dispatch(s(e,t)))}}))}return(e,t)=>{u(e)?p(c8(e,"invalidatesTags",r,i),t):f(e)?p([],t):o.util.invalidateTags.match(e)&&p(mA(e.payload,void 0,void 0,void 0,void 0,i),t)}},cY=({reducerPath:e,queryThunk:t,api:r,refetchQuery:n,internalState:a})=>{const o={};function i({queryCacheKey:t},r){const s=r.getState()[e],l=s.queries[t],u=a.currentSubscriptions[t];if(!l||"uninitialized"===l.status)return;const{lowestPollingInterval:f,skipPollingIfUnfocused:d}=c(u);if(!Number.isFinite(f))return;const p=o[t];null!=p&&p.timeout&&(clearTimeout(p.timeout),p.timeout=void 0);const h=Date.now()+f;o[t]={nextPollTimestamp:h,pollingInterval:f,timeout:setTimeout((()=>{(s.config.focused||!d)&&r.dispatch(n(l,t)),i({queryCacheKey:t},r)}),f)}}function s({queryCacheKey:t},r){const n=r.getState()[e].queries[t],s=a.currentSubscriptions[t];if(!n||"uninitialized"===n.status)return;const{lowestPollingInterval:u}=c(s);if(!Number.isFinite(u))return void l(t);const f=o[t],d=Date.now()+u;(!f||d<f.nextPollTimestamp)&&i({queryCacheKey:t},r)}function l(e){const t=o[e];null!=t&&t.timeout&&clearTimeout(t.timeout),delete o[e]}function c(e={}){let t=!1,r=Number.POSITIVE_INFINITY;for(let n in e)e[n].pollingInterval&&(r=Math.min(e[n].pollingInterval,r),t=e[n].skipPollingIfUnfocused||t);return{lowestPollingInterval:r,skipPollingIfUnfocused:t}}return(e,n)=>{(r.internalActions.updateSubscriptionOptions.match(e)||r.internalActions.unsubscribeQueryResult.match(e))&&s(e.payload,n),(t.pending.match(e)||t.rejected.match(e)&&e.meta.condition)&&s(e.meta.arg,n),(t.fulfilled.match(e)||t.rejected.match(e)&&!e.meta.condition)&&i(e.meta.arg,n),r.util.resetApiState.match(e)&&function(){for(const e of Object.keys(o))l(e)}()}},lY=({reducerPath:e,context:t,api:r,refetchQuery:n,internalState:a})=>{const{removeQueryResult:o}=r.internalActions;function i(r,i){const s=r.getState()[e],l=s.queries,c=a.currentSubscriptions;t.batch((()=>{for(const e of Object.keys(c)){const t=l[e],a=c[e];a&&t&&((Object.values(a).some((e=>!0===e[i]))||Object.values(a).every((e=>void 0===e[i]))&&s.config[i])&&(0===h0(a)?r.dispatch(o({queryCacheKey:e})):"uninitialized"!==t.status&&r.dispatch(n(t,e))))}}))}return(e,t)=>{pA.match(e)&&i(t,"refetchOnFocus"),hA.match(e)&&i(t,"refetchOnReconnect")}},X9=new Error("Promise never resolved before cacheEntryRemoved."),uY=({api:e,reducerPath:t,context:r,queryThunk:n,mutationThunk:a,internalState:o})=>{const i=RC(n),s=RC(a),l=yp(n,a),c={};function u(t,n,a,o,i){const s=r.endpointDefinitions[t],l=null==s?void 0:s.onCacheEntryAdded;if(!l)return;let u={};const f=new Promise((e=>{u.cacheEntryRemoved=e})),d=Promise.race([new Promise((e=>{u.valueResolved=e})),f.then((()=>{throw X9}))]);d.catch((()=>{})),c[a]=u;const p=e.endpoints[t].select("query"===s.type?n:a),h=o.dispatch(((e,t,r)=>r)),g={...o,getCacheEntry:()=>p(o.getState()),requestId:i,extra:h,updateCachedData:"query"===s.type?r=>o.dispatch(e.util.updateQueryData(t,n,r)):void 0,cacheDataLoaded:d,cacheEntryRemoved:f},m=l(n,g);Promise.resolve(m).catch((e=>{if(e!==X9)throw e}))}return(r,o,f)=>{const d=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)?Jy(t.payload):""}(r);if(n.pending.match(r)){const e=f[t].queries[d],n=o.getState()[t].queries[d];!e&&n&&u(r.meta.arg.endpointName,r.meta.arg.originalArgs,d,o,r.meta.requestId)}else if(a.pending.match(r))o.getState()[t].mutations[d]&&u(r.meta.arg.endpointName,r.meta.arg.originalArgs,d,o,r.meta.requestId);else if(l(r)){const e=c[d];null!=e&&e.valueResolved&&(e.valueResolved({data:r.payload,meta:r.meta.baseQueryMeta}),delete e.valueResolved)}else if(e.internalActions.removeQueryResult.match(r)||e.internalActions.removeMutationResult.match(r)){const e=c[d];e&&(delete c[d],e.cacheEntryRemoved())}else if(e.util.resetApiState.match(r))for(const[e,t]of Object.entries(c))delete c[e],t.cacheEntryRemoved()}},fY=({api:e,context:t,queryThunk:r,mutationThunk:n})=>{const a=uA(r,n),o=k0(r,n),i=yp(r,n),s={};return(r,n)=>{var l,c;if(a(r)){const{requestId:a,arg:{endpointName:o,originalArgs:i}}=r.meta,l=t.endpointDefinitions[o],c=null==l?void 0:l.onQueryStarted;if(c){const t={},r=new Promise(((e,r)=>{t.resolve=e,t.reject=r}));r.catch((()=>{})),s[a]=t;const u=e.endpoints[o].select("query"===l.type?i:a),f=n.dispatch(((e,t,r)=>r)),d={...n,getCacheEntry:()=>u(n.getState()),requestId:a,extra:f,updateCachedData:"query"===l.type?t=>n.dispatch(e.util.updateQueryData(o,i,t)):void 0,queryFulfilled:r};c(i,d)}}else if(i(r)){const{requestId:e,baseQueryMeta:t}=r.meta;null==(l=s[e])||l.resolve({data:r.payload,meta:t}),delete s[e]}else if(o(r)){const{requestId:e,rejectedWithValue:t,baseQueryMeta:n}=r.meta;null==(c=s[e])||c.reject({error:r.payload??r.error,isUnhandledError:!t,meta:n}),delete s[e]}}},dY=({api:e,context:{apiUid:t},reducerPath:r})=>(r,n)=>{e.util.resetApiState.match(r)&&n.dispatch(e.internalActions.middlewareRegistered(t))},pY=({api:e,queryThunk:t,internalState:r})=>{const n=`${e.reducerPath}/subscriptions`;let a=null,o=null;const{updateSubscriptionOptions:i,unsubscribeQueryResult:s}=e.internalActions,l=()=>r.currentSubscriptions,c={getSubscriptions:l,getSubscriptionCount:e=>h0(l()[e]??{}),isRequestSubscribed:(e,t)=>{var r;const n=l();return!(null==(r=null==n?void 0:n[e])||!r[t])}};return(l,u)=>{if(a||(a=JSON.parse(JSON.stringify(r.currentSubscriptions))),e.util.resetApiState.match(l))return a=r.currentSubscriptions={},o=null,[!0,!1];if(e.internalActions.internal_getRTKQSubscriptions.match(l))return[!1,c];const f=((r,n)=>{var a,o,l;if(i.match(n)){const{queryCacheKey:e,requestId:t,options:o}=n.payload;return null!=(a=null==r?void 0:r[e])&&a[t]&&(r[e][t]=o),!0}if(s.match(n)){const{queryCacheKey:e,requestId:t}=n.payload;return r[e]&&delete r[e][t],!0}if(e.internalActions.removeQueryResult.match(n))return delete r[n.payload.queryCacheKey],!0;if(t.pending.match(n)){const{meta:{arg:e,requestId:t}}=n,a=r[o=e.queryCacheKey]??(r[o]={});return a[`${t}_running`]={},e.subscribe&&(a[t]=e.subscriptionOptions??a[t]??{}),!0}let c=!1;if(t.fulfilled.match(n)||t.rejected.match(n)){const e=r[n.meta.arg.queryCacheKey]||{},t=`${n.meta.requestId}_running`;c||(c=!!e[t]),delete e[t]}if(t.rejected.match(n)){const{meta:{condition:e,arg:t,requestId:a}}=n;if(e&&t.subscribe){const e=r[l=t.queryCacheKey]??(r[l]={});e[a]=t.subscriptionOptions??e[a]??{},c=!0}}return c})(r.currentSubscriptions,l);let d=!0;if(f){o||(o=setTimeout((()=>{const t=JSON.parse(JSON.stringify(r.currentSubscriptions)),[,n]=Jj(a,(()=>t));u.next(e.internalActions.subscriptionsUpdated(n)),a=t,o=null}),500));const i="string"==typeof l.type&&!!l.type.startsWith(n),s=t.rejected.match(l)&&l.meta.condition&&!!l.meta.arg.subscribe;d=!i&&!s}return[d,!1]}};function hY(e){const{reducerPath:t,queryThunk:r,api:n,context:a}=e,{apiUid:o}=a,i={invalidateTags:kr(`${t}/invalidateTags`)},s=e=>e.type.startsWith(`${t}/`),l=[dY,sY,iY,cY,uY,fY];return{middleware:r=>{let i=!1;const u={...e,internalState:{currentSubscriptions:{}},refetchQuery:c,isThisApiSliceAction:s},f=l.map((e=>e(u))),d=pY(u),p=lY(u);return e=>l=>{if(!Wj(l))return e(l);i||(i=!0,r.dispatch(n.internalActions.middlewareRegistered(o)));const c={...r,next:e},u=r.getState(),[h,g]=d(l,c,u);let m;if(m=h?e(l):g,r.getState()[t]&&(p(l,c,u),s(l)||a.hasRehydrationInfo(l)))for(let e of f)e(l,c,u);return m}},actions:i};function c(e,t,n={}){return r({type:"query",endpointName:e.endpointName,originalArgs:e.originalArgs,subscribe:!1,forceRefetch:!0,queryCacheKey:t,...n})}}function Jd(e,...t){return Object.assign(e,...t)}var Z9=Symbol(),mY=({createSelector:e=zr}={})=>({name:Z9,init(t,{baseQuery:r,tagTypes:n,reducerPath:a,serializeQueryArgs:o,keepUnusedDataFor:i,refetchOnMountOrArgChange:s,refetchOnFocus:l,refetchOnReconnect:c,invalidationBehavior:u},f){ZH();const d=e=>e;Object.assign(t,{reducerPath:a,endpoints:{},internalActions:{onOnline:hA,onOffline:s8,onFocus:pA,onFocusLost:o8},util:{}});const{queryThunk:p,mutationThunk:h,patchQueryData:g,updateQueryData:m,upsertQueryData:y,prefetch:v,buildMatchThunkActions:b}=eY({baseQuery:r,reducerPath:a,context:f,api:t,serializeQueryArgs:o,assertTagType:d}),{reducer:w,actions:_}=tY({context:f,queryThunk:p,mutationThunk:h,reducerPath:a,assertTagType:d,config:{refetchOnFocus:l,refetchOnReconnect:c,refetchOnMountOrArgChange:s,keepUnusedDataFor:i,reducerPath:a,invalidationBehavior:u}});Jd(t.util,{patchQueryData:g,updateQueryData:m,upsertQueryData:y,prefetch:v,resetApiState:_.resetApiState}),Jd(t.internalActions,_);const{middleware:k,actions:x}=hY({reducerPath:a,context:f,queryThunk:p,mutationThunk:h,api:t,assertTagType:d});Jd(t.util,x),Jd(t,{reducer:w,middleware:k});const{buildQuerySelector:E,buildMutationSelector:A,selectInvalidatedBy:S,selectCachedArgsForQuery:C}=nY({serializeQueryArgs:o,reducerPath:a,createSelector:e});Jd(t.util,{selectInvalidatedBy:S,selectCachedArgsForQuery:C});const{buildInitiateQuery:z,buildInitiateMutation:I,getRunningMutationThunk:j,getRunningMutationsThunk:P,getRunningQueriesThunk:T,getRunningQueryThunk:R}=JQ({queryThunk:p,mutationThunk:h,api:t,serializeQueryArgs:o,context:f});return Jd(t.util,{getRunningMutationThunk:j,getRunningMutationsThunk:P,getRunningQueryThunk:R,getRunningQueriesThunk:T}),{name:Z9,injectEndpoint(e,r){var n;const a=t;(n=a.endpoints)[e]??(n[e]={}),i8(r)?Jd(a.endpoints[e],{name:e,select:E(e,r),initiate:z(e,r)},b(p,e)):KQ(r)&&Jd(a.endpoints[e],{name:e,select:A(),initiate:I(e)},b(h,e))}}}}),qi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Qc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var J9,eP,t3={exports:{}},Kt={};
|
|
2
2
|
/**
|
|
3
3
|
* @license React
|
|
4
4
|
* react.production.min.js
|
|
@@ -122,4 +122,4 @@ and limitations under the License.
|
|
|
122
122
|
* by Pedro Ladaria <pedro.ladaria@gmail.com>
|
|
123
123
|
* https://github.com/pladaria/reconnecting-websocket
|
|
124
124
|
* License MIT
|
|
125
|
-
*/!function(){function e(e,t,r){var n=this;void 0===r&&(r={}),this._listeners={error:[],message:[],open:[],close:[]},this._retryCount=-1,this._shouldReconnect=!0,this._connectLock=!1,this._binaryType="blob",this._closeCalled=!1,this._messageQueue=[],this.onclose=null,this.onerror=null,this.onmessage=null,this.onopen=null,this._handleOpen=function(e){n._debug("open event");var t=n._options.minUptime,r=void 0===t?qh.minUptime:t;clearTimeout(n._connectTimeout),n._uptimeTimeout=setTimeout((function(){return n._acceptOpen()}),r),n._ws.binaryType=n._binaryType,n._messageQueue.forEach((function(e){return n._ws.send(e)})),n._messageQueue=[],n.onopen&&n.onopen(e),n._listeners.open.forEach((function(t){return n._callEventListener(e,t)}))},this._handleMessage=function(e){n._debug("message event"),n.onmessage&&n.onmessage(e),n._listeners.message.forEach((function(t){return n._callEventListener(e,t)}))},this._handleError=function(e){n._debug("error event",e.message),n._disconnect(void 0,"TIMEOUT"===e.message?"timeout":void 0),n.onerror&&n.onerror(e),n._debug("exec error listeners"),n._listeners.error.forEach((function(t){return n._callEventListener(e,t)})),n._connect()},this._handleClose=function(e){n._debug("close event"),n._clearTimeouts(),n._shouldReconnect&&n._connect(),n.onclose&&n.onclose(e),n._listeners.close.forEach((function(t){return n._callEventListener(e,t)}))},this._url=e,this._protocols=t,this._options=r,this._options.startClosed&&(this._shouldReconnect=!1),this._connect()}Object.defineProperty(e,"CONNECTING",{get:function(){return 0},enumerable:!0,configurable:!0}),Object.defineProperty(e,"OPEN",{get:function(){return 1},enumerable:!0,configurable:!0}),Object.defineProperty(e,"CLOSING",{get:function(){return 2},enumerable:!0,configurable:!0}),Object.defineProperty(e,"CLOSED",{get:function(){return 3},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"CONNECTING",{get:function(){return e.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"OPEN",{get:function(){return e.OPEN},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"CLOSING",{get:function(){return e.CLOSING},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"CLOSED",{get:function(){return e.CLOSED},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"binaryType",{get:function(){return this._ws?this._ws.binaryType:this._binaryType},set:function(e){this._binaryType=e,this._ws&&(this._ws.binaryType=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"retryCount",{get:function(){return Math.max(this._retryCount,0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bufferedAmount",{get:function(){return this._messageQueue.reduce((function(e,t){return"string"==typeof t?e+=t.length:t instanceof Blob?e+=t.size:e+=t.byteLength,e}),0)+(this._ws?this._ws.bufferedAmount:0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"extensions",{get:function(){return this._ws?this._ws.extensions:""},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"protocol",{get:function(){return this._ws?this._ws.protocol:""},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"readyState",{get:function(){return this._ws?this._ws.readyState:this._options.startClosed?e.CLOSED:e.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this._ws?this._ws.url:""},enumerable:!0,configurable:!0}),e.prototype.close=function(e,t){void 0===e&&(e=1e3),this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),this._ws?this._ws.readyState!==this.CLOSED?this._ws.close(e,t):this._debug("close: already closed"):this._debug("close enqueued: no ws instance")},e.prototype.reconnect=function(e,t){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,this._ws&&this._ws.readyState!==this.CLOSED?(this._disconnect(e,t),this._connect()):this._connect()},e.prototype.send=function(e){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",e),this._ws.send(e);else{var t=this._options.maxEnqueuedMessages,r=void 0===t?qh.maxEnqueuedMessages:t;this._messageQueue.length<r&&(this._debug("enqueue",e),this._messageQueue.push(e))}},e.prototype.addEventListener=function(e,t){this._listeners[e]&&this._listeners[e].push(t)},e.prototype.dispatchEvent=function(e){var t,r,n=this._listeners[e.type];if(n)try{for(var a=MWe(n),o=a.next();!o.done;o=a.next()){var i=o.value;this._callEventListener(e,i)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}return!0},e.prototype.removeEventListener=function(e,t){this._listeners[e]&&(this._listeners[e]=this._listeners[e].filter((function(e){return e!==t})))},e.prototype._debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._options.debug&&console.log.apply(console,NWe(["RWS>"],e))},e.prototype._getNextDelay=function(){var e=this._options,t=e.reconnectionDelayGrowFactor,r=void 0===t?qh.reconnectionDelayGrowFactor:t,n=e.minReconnectionDelay,a=void 0===n?qh.minReconnectionDelay:n,o=e.maxReconnectionDelay,i=void 0===o?qh.maxReconnectionDelay:o,s=0;return this._retryCount>0&&((s=a*Math.pow(r,this._retryCount-1))>i&&(s=i)),this._debug("next delay",s),s},e.prototype._wait=function(){var e=this;return new Promise((function(t){setTimeout(t,e._getNextDelay())}))},e.prototype._getNextUrl=function(e){if("string"==typeof e)return Promise.resolve(e);if("function"==typeof e){var t=e();if("string"==typeof t)return Promise.resolve(t);if(t.then)return t}throw Error("Invalid URL")},e.prototype._connect=function(){var e=this;if(!this._connectLock&&this._shouldReconnect){this._connectLock=!0;var t=this._options,r=t.maxRetries,n=void 0===r?qh.maxRetries:r,a=t.connectionTimeout,o=void 0===a?qh.connectionTimeout:a,i=t.WebSocket,s=void 0===i?LWe():i;if(this._retryCount>=n)return void this._debug("max retries reached",this._retryCount,">=",n);if(this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),!VWe(s))throw Error("No valid WebSocket class provided");this._wait().then((function(){return e._getNextUrl(e._url)})).then((function(t){e._closeCalled||(e._debug("connect",{url:t,protocols:e._protocols}),e._ws=e._protocols?new s(t,e._protocols):new s(t),e._ws.binaryType=e._binaryType,e._connectLock=!1,e._addListeners(),e._connectTimeout=setTimeout((function(){return e._handleTimeout()}),o))}))}},e.prototype._handleTimeout=function(){this._debug("timeout event"),this._handleError(new DWe(Error("TIMEOUT"),this))},e.prototype._disconnect=function(e,t){if(void 0===e&&(e=1e3),this._clearTimeouts(),this._ws){this._removeListeners();try{this._ws.close(e,t),this._handleClose(new jWe(e,t,this))}catch{}}},e.prototype._acceptOpen=function(){this._debug("accept open"),this._retryCount=0},e.prototype._callEventListener=function(e,t){"handleEvent"in t?t.handleEvent(e):t(e)},e.prototype._removeListeners=function(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))},e.prototype._addListeners=function(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))},e.prototype._clearTimeouts=function(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)}}();const BWe=(e="")=>e.startsWith("@")?null==e?void 0:e.replace("@",""):e,FWe=({username:e,canFetch:t=!0,htmlContent:r=!0})=>{const n=BWe(e),{data:a,error:o,isLoading:i}=gWe({username:n,full:!0,htmlContent:r},{skip:!n||!t});return{data:a,error:o,isLoading:i}},Lm=()=>{const e=en(Ql.selectors.selectCurrentUser),t=en(Qi.selectors.selectIsAuthenticated);return{user:e,isLoading:en(Ql.selectors.selectPending),isLogged:t,error:en(Ql.selectors.selectError)}},UWe=({userId:e="",canFetch:t=!0,htmlContent:r=!0})=>{const{data:n,error:a,isLoading:o,isFetching:i}=SWe({userId:e,full:!0,htmlContent:r},{skip:!e||!t});return{data:n,error:a,isLoading:o,isFetching:i}},sH=({onChange:e})=>{const{user:t}=Lm(),r=null==t?void 0:t.id,n=g.useRef(r);g.useEffect((()=>{n.current?r!==n.current&&(e(),n.current=r):n.current=r}),[r,n.current])},YD=["following","followed","blocked","muted","note","blocked_by"],KD=({userId:e,currentUserId:t})=>{const r="string"==typeof e,n=r?[e]:(null==e?void 0:e.filter((e=>e!==t)))||[],a=e===t;return{isSingleUser:r,canFetch:!(!n.length||a||!t),safeTargets:n}},k9=({userId:e,skip:t})=>{const r=en(Ql.selectors.selectCurrentUser),n=null==r?void 0:r.id,{canFetch:a,isSingleUser:o,safeTargets:i}=KD({userId:e,currentUserId:n}),{data:s,isLoading:l}=bWe({targets:i,filter:YD},{skip:!a||t}),[c]=kWe(),u=({userId:e})=>{const{canFetch:t,safeTargets:r}=KD({userId:e,currentUserId:n});t&&c({targets:r,filter:YD})};return sH({onChange:()=>{u({userId:i})}}),{relationship:(o?null==s?void 0:s[e]:s)||{},isLoading:l,updateRelations:u}},GWe=g.forwardRef((({accept:e,children:t,className:r,hasPreview:n,onChange:a,onDelete:o,disabled:i,imgType:s,disableDelete:l,isButtonWrapper:c=!0},u)=>{const f="cover"===s?"changeCover":"changeAvatar",[d,p]=g.useState(!1),h=e=>{a(e),p(!1)};return E.jsx("div",{"data-testid":f,className:he("my-2 flex cursor-pointer items-center gap-2 md:my-0",r),children:n?E.jsxs(Yv,{open:d,onOpenChange:e=>{p(e)},children:[E.jsx(Kv,{children:E.jsx(XD,{disabled:i,isWrapper:c,children:t||`Edit ${s}`})}),E.jsxs(q0,{align:"cover"===s?"end":"start",className:he({"mt-xxxs":"photo"===s}),children:[E.jsx("label",{className:"block w-full items-center",children:E.jsxs(dv,{onSelect:e=>{e.preventDefault()},className:"cursor-pointer",children:[E.jsx(Z8,{size:20})," Upload ",s,E.jsx(vv,{ref:u,accept:e,onChange:h})]})}),E.jsxs(dv,{onClick:()=>{null==o||o()},disabled:l,className:"text-red-dark cursor-pointer",children:[E.jsx(r7,{size:20}),"Remove ",s]})]})]}):E.jsxs(XD,{isLabel:!0,disabled:i,isWrapper:c,children:[t||`Add ${s}`,E.jsx(vv,{ref:u,accept:e,onChange:h})]})})})),XD=({children:e,disabled:t,isLabel:r,isWrapper:n})=>{if(!n)return E.jsx("label",{children:e});const a={variant:"secondary",size:"s",...t?{disabled:!0}:{as:r?"label":"button"}};return E.jsx(Gn,{...a,className:"cursor-pointer",children:e})};function qWe(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function WWe(e){return"nodeType"in e}function HWe(e){var t,r;return e?qWe(e)?e:WWe(e)&&null!=(t=null==(r=e.ownerDocument)?void 0:r.defaultView)?t:window:window}var ZD;GWe.displayName="ChangeImgButton",function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"}(ZD||(ZD={}));const QWe=Object.freeze({x:0,y:0});function YWe(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function KWe(e,t,r){const n=YWe(t);if(!n)return e;const{scaleX:a,scaleY:o,x:i,y:s}=n,l=e.left-i-(1-a)*parseFloat(r),c=e.top-s-(1-o)*parseFloat(r.slice(r.indexOf(" ")+1)),u=a?e.width/a:e.width,f=o?e.height/o:e.height;return{width:u,height:f,top:c,right:l+u,bottom:c+f,left:l}}const XWe={ignoreTransform:!1};function iH(e,t){void 0===t&&(t=XWe);let r=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:n}=HWe(e).getComputedStyle(e);t&&(r=KWe(r,t,n))}const{top:n,left:a,width:o,height:i,bottom:s,right:l}=r;return{top:n,left:a,width:o,height:i,bottom:s,right:l}}function JD(e){return iH(e,{ignoreTransform:!0})}var p0,ej,Ui,tj,nj,rj,rA,aA,aj;!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(p0||(p0={})),function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(ej||(ej={})),function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"}(Ui||(Ui={})),Ui.Space,Ui.Enter,Ui.Esc,Ui.Space,Ui.Enter,Ui.Tab,function(e){e[e.RightClick=2]="RightClick"}(tj||(tj={})),function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(nj||(nj={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(rj||(rj={})),p0.Backward,p0.Forward,p0.Backward,p0.Forward,function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(rA||(rA={})),(aA||(aA={})).Optimized="optimized",rA.WhileDragging,aA.Optimized,function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(aj||(aj={})),Ui.Down,Ui.Right,Ui.Up,Ui.Left,N0("user");var oj,Kw={exports:{}},ZWe=Kw.exports;function JWe(){return oj||(oj=1,Kw.exports=function(e,t,r){t.prototype.isToday=function(){var e="YYYY-MM-DD",t=r();return this.format(e)===t.format(e)}}),Kw.exports}var eHe=JWe();const cH=Qc(eHe);function Q_(e){return(Q_="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 Sm(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function ss(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function ru(e){ss(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===Q_(e)&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):(("string"==typeof e||"[object String]"===t)&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function tHe(e,t){ss(2,arguments);var r=ru(e).getTime(),n=Sm(t);return new Date(r+n)}pG.extend(cH);var nHe={};function xk(){return nHe}function rHe(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function aHe(e){return ss(1,arguments),e instanceof Date||"object"===Q_(e)&&"[object Date]"===Object.prototype.toString.call(e)}function oHe(e){if(ss(1,arguments),!aHe(e)&&"number"!=typeof e)return!1;var t=ru(e);return!isNaN(Number(t))}function sHe(e,t){return ss(2,arguments),tHe(e,-Sm(t))}var iHe=864e5;function cHe(e){ss(1,arguments);var t=ru(e),r=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var n=r-t.getTime();return Math.floor(n/iHe)+1}function Y_(e){ss(1,arguments);var t=ru(e),r=t.getUTCDay(),n=(r<1?7:0)+r-1;return t.setUTCDate(t.getUTCDate()-n),t.setUTCHours(0,0,0,0),t}function lH(e){ss(1,arguments);var t=ru(e),r=t.getUTCFullYear(),n=new Date(0);n.setUTCFullYear(r+1,0,4),n.setUTCHours(0,0,0,0);var a=Y_(n),o=new Date(0);o.setUTCFullYear(r,0,4),o.setUTCHours(0,0,0,0);var i=Y_(o);return t.getTime()>=a.getTime()?r+1:t.getTime()>=i.getTime()?r:r-1}function lHe(e){ss(1,arguments);var t=lH(e),r=new Date(0);return r.setUTCFullYear(t,0,4),r.setUTCHours(0,0,0,0),Y_(r)}var uHe=6048e5;function fHe(e){ss(1,arguments);var t=ru(e),r=Y_(t).getTime()-lHe(t).getTime();return Math.round(r/uHe)+1}function K_(e,t){var r,n,a,o,i,s,l,c;ss(1,arguments);var u=xk(),f=Sm(null!==(r=null!==(n=null!==(a=null!==(o=null==t?void 0:t.weekStartsOn)&&void 0!==o?o:null==t||null===(i=t.locale)||void 0===i||null===(s=i.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==a?a:u.weekStartsOn)&&void 0!==n?n:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==r?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=ru(e),p=d.getUTCDay(),h=(p<f?7:0)+p-f;return d.setUTCDate(d.getUTCDate()-h),d.setUTCHours(0,0,0,0),d}function uH(e,t){var r,n,a,o,i,s,l,c;ss(1,arguments);var u=ru(e),f=u.getUTCFullYear(),d=xk(),p=Sm(null!==(r=null!==(n=null!==(a=null!==(o=null==t?void 0:t.firstWeekContainsDate)&&void 0!==o?o:null==t||null===(i=t.locale)||void 0===i||null===(s=i.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==a?a:d.firstWeekContainsDate)&&void 0!==n?n:null===(l=d.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==r?r:1);if(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var h=new Date(0);h.setUTCFullYear(f+1,0,p),h.setUTCHours(0,0,0,0);var g=K_(h,t),m=new Date(0);m.setUTCFullYear(f,0,p),m.setUTCHours(0,0,0,0);var y=K_(m,t);return u.getTime()>=g.getTime()?f+1:u.getTime()>=y.getTime()?f:f-1}function dHe(e,t){var r,n,a,o,i,s,l,c;ss(1,arguments);var u=xk(),f=Sm(null!==(r=null!==(n=null!==(a=null!==(o=null==t?void 0:t.firstWeekContainsDate)&&void 0!==o?o:null==t||null===(i=t.locale)||void 0===i||null===(s=i.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==a?a:u.firstWeekContainsDate)&&void 0!==n?n:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==r?r:1),d=uH(e,t),p=new Date(0);return p.setUTCFullYear(d,0,f),p.setUTCHours(0,0,0,0),K_(p,t)}var pHe=6048e5;function hHe(e,t){ss(1,arguments);var r=ru(e),n=K_(r,t).getTime()-dHe(r,t).getTime();return Math.round(n/pHe)+1}function Ln(e,t){for(var r=e<0?"-":"",n=Math.abs(e).toString();n.length<t;)n="0"+n;return r+n}var rp={y:function(e,t){var r=e.getUTCFullYear(),n=r>0?r:1-r;return Ln("yy"===t?n%100:n,t.length)},M:function(e,t){var r=e.getUTCMonth();return"M"===t?String(r+1):Ln(r+1,2)},d:function(e,t){return Ln(e.getUTCDate(),t.length)},a:function(e,t){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];default:return"am"===r?"a.m.":"p.m."}},h:function(e,t){return Ln(e.getUTCHours()%12||12,t.length)},H:function(e,t){return Ln(e.getUTCHours(),t.length)},m:function(e,t){return Ln(e.getUTCMinutes(),t.length)},s:function(e,t){return Ln(e.getUTCSeconds(),t.length)},S:function(e,t){var r=t.length,n=e.getUTCMilliseconds();return Ln(Math.floor(n*Math.pow(10,r-3)),t.length)}},i0={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},mHe={G:function(e,t,r){var n=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if("yo"===t){var n=e.getUTCFullYear(),a=n>0?n:1-n;return r.ordinalNumber(a,{unit:"year"})}return rp.y(e,t)},Y:function(e,t,r,n){var a=uH(e,n),o=a>0?a:1-a;return"YY"===t?Ln(o%100,2):"Yo"===t?r.ordinalNumber(o,{unit:"year"}):Ln(o,t.length)},R:function(e,t){return Ln(lH(e),t.length)},u:function(e,t){return Ln(e.getUTCFullYear(),t.length)},Q:function(e,t,r){var n=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return Ln(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){var n=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return Ln(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){var n=e.getUTCMonth();switch(t){case"M":case"MM":return rp.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){var n=e.getUTCMonth();switch(t){case"L":return String(n+1);case"LL":return Ln(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){var a=hHe(e,n);return"wo"===t?r.ordinalNumber(a,{unit:"week"}):Ln(a,t.length)},I:function(e,t,r){var n=fHe(e);return"Io"===t?r.ordinalNumber(n,{unit:"week"}):Ln(n,t.length)},d:function(e,t,r){return"do"===t?r.ordinalNumber(e.getUTCDate(),{unit:"date"}):rp.d(e,t)},D:function(e,t,r){var n=cHe(e);return"Do"===t?r.ordinalNumber(n,{unit:"dayOfYear"}):Ln(n,t.length)},E:function(e,t,r){var n=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){var a=e.getUTCDay(),o=(a-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return Ln(o,2);case"eo":return r.ordinalNumber(o,{unit:"day"});case"eee":return r.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(a,{width:"short",context:"formatting"});default:return r.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){var a=e.getUTCDay(),o=(a-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return Ln(o,t.length);case"co":return r.ordinalNumber(o,{unit:"day"});case"ccc":return r.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(a,{width:"narrow",context:"standalone"});case"cccccc":return r.day(a,{width:"short",context:"standalone"});default:return r.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,r){var n=e.getUTCDay(),a=0===n?7:n;switch(t){case"i":return String(a);case"ii":return Ln(a,t.length);case"io":return r.ordinalNumber(a,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,r){var n,a=e.getUTCHours();switch(n=12===a?i0.noon:0===a?i0.midnight:a/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(e,t,r){var n,a=e.getUTCHours();switch(n=a>=17?i0.evening:a>=12?i0.afternoon:a>=4?i0.morning:i0.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(e,t,r){if("ho"===t){var n=e.getUTCHours()%12;return 0===n&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return rp.h(e,t)},H:function(e,t,r){return"Ho"===t?r.ordinalNumber(e.getUTCHours(),{unit:"hour"}):rp.H(e,t)},K:function(e,t,r){var n=e.getUTCHours()%12;return"Ko"===t?r.ordinalNumber(n,{unit:"hour"}):Ln(n,t.length)},k:function(e,t,r){var n=e.getUTCHours();return 0===n&&(n=24),"ko"===t?r.ordinalNumber(n,{unit:"hour"}):Ln(n,t.length)},m:function(e,t,r){return"mo"===t?r.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):rp.m(e,t)},s:function(e,t,r){return"so"===t?r.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):rp.s(e,t)},S:function(e,t){return rp.S(e,t)},X:function(e,t,r,n){var a=(n._originalDate||e).getTimezoneOffset();if(0===a)return"Z";switch(t){case"X":return ij(a);case"XXXX":case"XX":return Xh(a);default:return Xh(a,":")}},x:function(e,t,r,n){var a=(n._originalDate||e).getTimezoneOffset();switch(t){case"x":return ij(a);case"xxxx":case"xx":return Xh(a);default:return Xh(a,":")}},O:function(e,t,r,n){var a=(n._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+sj(a,":");default:return"GMT"+Xh(a,":")}},z:function(e,t,r,n){var a=(n._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+sj(a,":");default:return"GMT"+Xh(a,":")}},t:function(e,t,r,n){var a=n._originalDate||e;return Ln(Math.floor(a.getTime()/1e3),t.length)},T:function(e,t,r,n){return Ln((n._originalDate||e).getTime(),t.length)}};function sj(e,t){var r=e>0?"-":"+",n=Math.abs(e),a=Math.floor(n/60),o=n%60;if(0===o)return r+String(a);var i=t;return r+String(a)+i+Ln(o,2)}function ij(e,t){return e%60==0?(e>0?"-":"+")+Ln(Math.abs(e)/60,2):Xh(e,t)}function Xh(e,t){var r=t||"",n=e>0?"-":"+",a=Math.abs(e);return n+Ln(Math.floor(a/60),2)+r+Ln(a%60,2)}var cj=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},fH=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},gHe=function(e,t){var r,n=e.match(/(P+)(p+)?/)||[],a=n[1],o=n[2];if(!o)return cj(e,t);switch(a){case"P":r=t.dateTime({width:"short"});break;case"PP":r=t.dateTime({width:"medium"});break;case"PPP":r=t.dateTime({width:"long"});break;default:r=t.dateTime({width:"full"})}return r.replace("{{date}}",cj(a,t)).replace("{{time}}",fH(o,t))},yHe={p:fH,P:gHe},vHe=["D","DD"],bHe=["YY","YYYY"];function wHe(e){return-1!==vHe.indexOf(e)}function _He(e){return-1!==bHe.indexOf(e)}function lj(e,t,r){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var kHe={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},xHe=function(e,t,r){var n,a=kHe[e];return n="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",t.toString()),null!=r&&r.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function pC(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}var SHe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},EHe={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},CHe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},IHe={date:pC({formats:SHe,defaultWidth:"full"}),time:pC({formats:EHe,defaultWidth:"full"}),dateTime:pC({formats:CHe,defaultWidth:"full"})},AHe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},RHe=function(e,t,r,n){return AHe[e]};function hy(e){return function(t,r){var n;if("formatting"===(null!=r&&r.context?String(r.context):"standalone")&&e.formattingValues){var a=e.defaultFormattingWidth||e.defaultWidth,o=null!=r&&r.width?String(r.width):a;n=e.formattingValues[o]||e.formattingValues[a]}else{var i=e.defaultWidth,s=null!=r&&r.width?String(r.width):e.defaultWidth;n=e.values[s]||e.values[i]}return n[e.argumentCallback?e.argumentCallback(t):t]}}var THe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},PHe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},$He={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},zHe={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},MHe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},OHe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},NHe=function(e,t){var r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},DHe={ordinalNumber:NHe,era:hy({values:THe,defaultWidth:"wide"}),quarter:hy({values:PHe,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:hy({values:$He,defaultWidth:"wide"}),day:hy({values:zHe,defaultWidth:"wide"}),dayPeriod:hy({values:MHe,defaultWidth:"wide",formattingValues:OHe,defaultFormattingWidth:"wide"})};function my(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.width,a=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],o=t.match(a);if(!o)return null;var i,s=o[0],l=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?LHe(l,(function(e){return e.test(s)})):jHe(l,(function(e){return e.test(s)}));return i=e.valueCallback?e.valueCallback(c):c,{value:i=r.valueCallback?r.valueCallback(i):i,rest:t.slice(s.length)}}}function jHe(e,t){for(var r in e)if(e.hasOwnProperty(r)&&t(e[r]))return r}function LHe(e,t){for(var r=0;r<e.length;r++)if(t(e[r]))return r}function VHe(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.match(e.matchPattern);if(!n)return null;var a=n[0],o=t.match(e.parsePattern);if(!o)return null;var i=e.valueCallback?e.valueCallback(o[0]):o[0];return{value:i=r.valueCallback?r.valueCallback(i):i,rest:t.slice(a.length)}}}var BHe=/^(\d+)(th|st|nd|rd)?/i,FHe=/\d+/i,UHe={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},GHe={any:[/^b/i,/^(a|c)/i]},qHe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},WHe={any:[/1/i,/2/i,/3/i,/4/i]},HHe={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},QHe={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},YHe={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},KHe={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},XHe={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},ZHe={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},JHe={ordinalNumber:VHe({matchPattern:BHe,parsePattern:FHe,valueCallback:function(e){return parseInt(e,10)}}),era:my({matchPatterns:UHe,defaultMatchWidth:"wide",parsePatterns:GHe,defaultParseWidth:"any"}),quarter:my({matchPatterns:qHe,defaultMatchWidth:"wide",parsePatterns:WHe,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:my({matchPatterns:HHe,defaultMatchWidth:"wide",parsePatterns:QHe,defaultParseWidth:"any"}),day:my({matchPatterns:YHe,defaultMatchWidth:"wide",parsePatterns:KHe,defaultParseWidth:"any"}),dayPeriod:my({matchPatterns:XHe,defaultMatchWidth:"any",parsePatterns:ZHe,defaultParseWidth:"any"})},eQe={code:"en-US",formatDistance:xHe,formatLong:IHe,formatRelative:RHe,localize:DHe,match:JHe,options:{weekStartsOn:0,firstWeekContainsDate:1}},tQe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,nQe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,rQe=/^'([^]*?)'?$/,aQe=/''/g,oQe=/[a-zA-Z]/;function Wh(e,t,r){var n,a,o,i,s,l,c,u,f,d,p;ss(2,arguments);var h=String(t),g=xk(),m=null!==(n=g.locale)&&void 0!==n?n:eQe,y=Sm(null!==(a=null!==(o=null!==(i=void 0)&&void 0!==i?i:g.firstWeekContainsDate)&&void 0!==o?o:null===(s=g.locale)||void 0===s||null===(l=s.options)||void 0===l?void 0:l.firstWeekContainsDate)&&void 0!==a?a:1);if(!(y>=1&&y<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var v=Sm(null!==(c=null!==(u=null!==(f=void 0)&&void 0!==f?f:g.weekStartsOn)&&void 0!==u?u:null===(d=g.locale)||void 0===d||null===(p=d.options)||void 0===p?void 0:p.weekStartsOn)&&void 0!==c?c:0);if(!(v>=0&&v<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!m.localize)throw new RangeError("locale must contain localize property");if(!m.formatLong)throw new RangeError("locale must contain formatLong property");var b=ru(e);if(!oHe(b))throw new RangeError("Invalid time value");var w=sHe(b,rHe(b)),_={firstWeekContainsDate:y,weekStartsOn:v,locale:m,_originalDate:b};return h.match(nQe).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,yHe[t])(e,m.formatLong):e})).join("").match(tQe).map((function(r){if("''"===r)return"'";var n=r[0];if("'"===n)return sQe(r);var a=mHe[n];if(a)return _He(r)&&lj(r,t,String(e)),wHe(r)&&lj(r,t,String(e)),a(w,r,m.localize,_);if(n.match(oQe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+n+"`");return r})).join("")}function sQe(e){var t=e.match(rQe);return t?t[1].replace(aQe,"'"):e}const iQe=(e,t,r)=>{if("single"===e)return t?Wh(t,"PPP"):r;if("range"===e){const e=t;return null!=e&&e.from?e.to?`${Wh(e.from,"MMM dd")} - ${Wh(e.to,"MMM dd, yyyy")}`:Wh(e.from,"PPP"):r}if("multiple"===e){const e=t;return e&&0!==e.length?1===e.length?Wh(e[0],"PPP"):2===e.length?`${Wh(e[0],"MMM dd")}, ${Wh(e[1],"MMM dd")}`:`${e.length} dates selected`:r}return r},cQe=g.forwardRef((({value:e,placeholder:t,className:r,icon:n,...a},o)=>{const i=iQe(e?Array.isArray(e)?"multiple":"object"==typeof e&&"from"in e?"range":"single":"single",e,t);return E.jsxs(Gn,{ref:o,variant:"secondary",className:he("rounded-m py-l w-[280px] justify-between border border-gray-200 bg-white text-left font-normal text-gray-900",r),...a,children:[E.jsxs("span",{className:"gap-xxs flex items-center",children:[n||E.jsx(zX,{size:16}),i]}),E.jsx(i2,{size:16,className:"ml-xxs"})]})}));cQe.displayName="DatePickerTrigger",pG.extend(cH);const lQe=(e,t,r)=>{let n=e;for(let e=0;e<t.length-1;e++){const r=t[e];r in n||(n[r]={}),n=n[r]}n[t[t.length-1]]=r},uQe=e=>{if(!e)return;const t={};for(const r in e){const n=r.split("."),a=e[r];void 0!==a&&lQe(t,n,a)}return t},fQe=["user.follow","user.privacy","user.translation","user.discoverFeed","user.notifications.prefs","user.notifications.policy"],dQe=()=>{const{data:e,...t}=EFe({keys:fQe});return{settings:uQe(e),flatSettings:e,...t}},dH=()=>{var e,t;const r=en(Dc.selectors.selectSettings),{settings:n,isLoading:a}=dQe(),{preferredLanguage:o,excludedLanguages:i}=(null==(e=null==n?void 0:n.user)?void 0:e.translation)||{},s=(null==(t=null==r?void 0:r[S_.translation])?void 0:t.enabled)||!1,l=!a&&!!n,c=g.useCallback((e=>{if(!s||!l)return!1;const t=[...i||[],o].map((e=>null==e?void 0:e.toLowerCase()));return!!e&&!t.includes(e.toLowerCase())}),[s,l,o,i]);return{isEnabled:s,isSettingsReady:l,preferredLanguage:o,checkIfTranslatable:c}},pQe="DELETE";Ke.object({value:Ke.string().refine((e=>e.trim()===pQe),{message:"Value is not correct"})});const hQe={view:"default",transitView:null,isProfileFormDirty:!1};ur({name:"manageUsers",initialState:hQe,reducers:{changeView:(e,{payload:t})=>{e.isProfileFormDirty?e.transitView=t:(e.view=t,e.transitView=null)},resetTransitView:e=>{e.transitView=null},changeProfileFormDirty:(e,{payload:t})=>{e.isProfileFormDirty=t}},selectors:{selectView:e=>e.view,selectTransitView:e=>e.transitView,selectIsProfileFormDirty:e=>e.isProfileFormDirty}}).injectInto(Tp);const hb=e=>{const t=en(Ql.selectors.selectCurrentUser),r=en(Qi.selectors.selectIsAuthenticated),n="SUSPENDED"===(null==t?void 0:t.state),a=n;return{isDisabled:a,guardedAction:(e=()=>{})=>()=>{r?r&&!n&&e():WUe()},ActionTooltipWrapper:({children:e,triggerClassname:r})=>a?E.jsx(vm,{theme:"dark",tooltipText:`${ho(t)} is suspended`,size:"default",triggerClassname:r,children:E.jsx("div",{className:"!pointer-events-auto w-full",children:e})}):E.jsx(E.Fragment,{children:e})}},x9=e=>{const t=en(Ql.selectors.selectCurrentUser);return(null==t?void 0:t.id)===e},pH=32,uj=({user:e,avatarSize:t})=>{var r;const n=(null==(r=OI({size:t||32,upload:e.avatar}))?void 0:r.uri)||"";return E.jsx(zp,{size:t,name:e.displayName,imgUrl:n})},mQe=({users:e,className:t,avatarSize:r=32,borderWidth:n=4,isUserPreviewLink:a=!0})=>{const o=r+2*n;return E.jsx("div",{className:he("relative flex items-center",t),style:{left:-n,height:o,width:e.length*(r-n)+n},children:null==e?void 0:e.map(((e,t)=>E.jsx("div",{"data-testid":"user-avatar",className:"absolute rounded-full border-white",style:{borderWidth:n,width:o,height:o,top:0*t,left:t*(r-n),zIndex:t+1},children:a?E.jsx(Wi,{to:"/:username",props:{username:ho(e)},children:E.jsx(uj,{user:e,avatarSize:r})}):E.jsx(uj,{user:e,avatarSize:r})},e.id)))})},gQe=e=>!(null!=e&&e.following)||"REJECTED"===(null==e?void 0:e.following),fj=e=>"ACCEPTED"===(null==e?void 0:e.following),yQe=e=>gQe(e)&&"ACCEPTED"===(null==e?void 0:e.followed),vQe=e=>"PENDING"===(null==e?void 0:e.following),bQe=e=>!(null==e||!e.blocked),wQe=e=>{var t;return!(null==(t=null==e?void 0:e.muted)||!t.state)},_Qe=e=>"ACCEPTED"===(null==e?void 0:e.followed),hH=({user:e,onFollow:t,onUnfollow:r,unsubscribe:n})=>{const[a,o]=g.useState(!1),i=en(Qi.selectors.selectIsAuthenticated),[s]=AWe(),[l]=RWe(),c=null==e?void 0:e.domain,u={user:e,username:ho(e),...c&&{domain:c}};return{follow:async()=>{i?await s(u):o(!0),null==t||t()},unfollow:async()=>{await l({mutual:n,...u}),null==r||r()},renderGuestFollowModal:()=>a?E.jsx(pWe,{user:e,open:a,onCloseModal:()=>o(!1)}):null}},kQe=({delay:e=0,defaultHover:t=!1,dependProps:r=[],leaveDelay:n=0}={})=>{const a=g.useRef(null),[o,i]=g.useState(t),s=g.useRef(null),l=g.useRef(null),c=()=>{s.current&&clearTimeout(s.current),s.current=setTimeout((()=>{i(!0)}),e),l.current&&clearTimeout(l.current)},u=()=>{l.current&&clearTimeout(l.current),l.current=setTimeout((()=>{i(!1)}),n),s.current&&clearTimeout(s.current)};return g.useEffect((()=>()=>{s.current&&clearTimeout(s.current),l.current&&clearTimeout(l.current)}),[]),g.useEffect((()=>{const e=a.current;if(e)return e.addEventListener("mouseenter",c),e.addEventListener("mouseleave",u),()=>{e.removeEventListener("mouseenter",c),e.removeEventListener("mouseleave",u)}}),[a.current,...r]),[a,o,i]},S9=({user:e,relationship:t})=>{const[r,{isLoading:n}]=uX(),[a]=lX(),[o,i,s]=l9(),l=bQe(t);return[l,i,async()=>{try{await a({userId:e.id}).unwrap(),Lt.success(`${e.username} is unblocked`)}catch(e){Lt.error(`${wr(e)}`)}},()=>E.jsx(Jq,{open:o,title:`Do you want to block ${e.username}?`,onClose:s,"data-testid":"block-dialog",leftButton:{title:"Cancel",isLoading:!1,variant:"secondary",onClick:s},rightButton:{title:"Block",variant:"red_primary",isLoading:n,onClick:()=>{(async()=>{try{await r({userId:e.id}).unwrap(),Lt.success(`${e.username} is blocked`),s()}catch(e){Lt.error(`${wr(e)}`)}})()}},children:"Blocked users will not be able to follow you or see your content, and you will not see any content from them. They will also be aware that they have been blocked."}),o]},mH=({size:e,user:t,follow:r,unfollow:n,disabled:a,relationship:o,isRelationshipPending:i,className:s,followButtonText:l,unfollowButtonText:c})=>{const[u,,f]=S9({user:t,relationship:o}),d=yQe(o)?"Follow back":l||"Follow",p=c||"Unfollow",h=vQe(o),g=fj(o),[m,y]=kQe(),v=h&&!y||g;if(!i)return E.jsx(Gn,{ref:m,"data-testid":"followBtn",onClick:u?f:g||h?n:r,size:e,className:he("rounded-m px-xs w-[100%] min-w-[130px] md:max-w-[300px] lg:max-w-full",!fj&&"bg-gray-700",s),variant:u?"secondary_danger":v?"secondary":"primary",disabled:a,children:u?"Unblock":h?y?"Cancel follow request":"Follow Pending":g?p:d})},gH=({user:e,size:t="m",disabled:r,className:n,relationship:a,isRelationshipPending:o,onFollow:i,onUnfollow:s,followButtonText:l,unfollowButtonText:c})=>{const{follow:u,unfollow:f,renderGuestFollowModal:d}=hH({user:e,onFollow:i,onUnfollow:s}),p=x9(e.id),{isDisabled:h,ActionTooltipWrapper:g}=hb();return p||o?null:E.jsxs("div",{"data-testid":"followControl",children:[d(),E.jsx(g,{triggerClassname:he("l"===t&&"w-full"),children:E.jsx(mH,{user:e,size:t,disabled:r,className:n,follow:()=>{u()},unfollow:()=>{f()},disabled:h,relationship:a,isRelationshipPending:!1,followButtonText:l,unfollowButtonText:c})})]})},E9=e=>{var t;const r="REPOST"===e.type&&(null==(t=e.post)?void 0:t.text),n="COMMENT"===e.type,a="LIKE"===e.type,o="FOLLOW_REQUEST"===e.type,i="UNREAD"===e.status,s="FOLLOW"===e.type,l=s||o;return{isLike:a,isQuote:r,isReply:n,isUnread:i,isFollow:s,isEventRelated:"EVENT_INVITE"===e.type||"EVENT_JOIN"===e.type||"EVENT_CANCEL"===e.type||"EVENT_UPDATE"===e.type,isFollowRequest:o,isFollowingRelated:l}},xQe=({isPopup:e,notification:t})=>{var r,n;const a=Em(),[o]=mX(),[i]=gX(),s=t.fromUser,{relationship:l,isLoading:c}=k9({userId:null==s?void 0:s.id}),{isFollow:u,isFollowRequest:f}=E9(t),d=!(!s||!u),p=!(!s||!f),h=s?ho(s):"",g=t.followResponse||(null==(n=null==(r=t.meta)?void 0:r.actionsTaken)?void 0:n[0].text);return E.jsxs(E.Fragment,{children:[d&&s&&E.jsx(gH,{size:"s",user:s,relationship:l,isRelationshipPending:c}),g?E.jsx("div",{className:he("text-s min-h-xl inline-flex min-w-[120px] items-center font-medium text-gray-500",!e&&"justify-end"),children:g.toUpperCase()}):p?E.jsxs("div",{className:"flex items-center gap-2","data-testid":"followControls",children:[E.jsx(Gn,{size:"s",variant:"secondary",className:"min-w-[100px] px-3",onClick:()=>{s&&(i({username:h,user:s}),a(A0.actions.updateNotification({...t,followResponse:"Rejected"})))},children:"Reject"}),E.jsx(Gn,{size:"s",variant:"primary",className:he("min-w-[100px]",e&&"order-first"),onClick:()=>{s&&(o({username:h,user:s}),a(A0.actions.updateNotification({...t,followResponse:"Accepted"})))},children:"Accept"})]}):null]})},SQe=e=>{const{user:t,isLoading:r}=Lm(),{data:n,isLoading:a,error:o}=FWe(e),i="userId"in e,{data:s,isLoading:l}=UWe({userId:i?e.userId:"",htmlContent:e.htmlContent??!1,canFetch:!!i&&(e.canFetch??!0)});return[i&&s||n,"username"in e&&`@${null==t?void 0:t.username}`===e.username||i&&(null==t?void 0:t.id)===e.userId,r||a||i&&l,!!o]},yH={forever:0,"6h":21600,"12h":43200,"24h":86400,"7 days":604800,"30 days":2592e3},EQe=({selected:e,onSelect:t})=>Object.keys(yH).map((r=>E.jsxs("span",{className:he("p-xxs gap-xxxs flex cursor-pointer rounded-full border border-gray-400 bg-transparent text-sm",{"border-gray-100 bg-gray-100":e===r}),onClick:()=>t(r),children:[e===r&&E.jsx(s2,{size:16}),"forever"===r?"Until I unmute":`For ${r}`]},r))),vH=({user:e,relationship:t,onMute:r,onUnmute:n})=>{const[a,{isLoading:o}]=yWe(),[i,{isLoading:s}]=vWe(),[l,c]=g.useState("forever"),u=e?ho(e):"",[f,d,p]=l9(),h=wQe(t);return{isLoading:o||s,isMuted:h,mute:d,unmute:()=>{e&&(i({userId:e.id}),Lt.success(`${u} is unmuted`,{customIcon:E.jsx(PX,{color:"white"})}),null==n||n())},renderMuteDialog:()=>e?E.jsxs(e1,{open:f,onCloseModal:p,title:`Do you want to mute ${e.username}?`,className:"p-none","data-testid":"mute-dialog",children:[E.jsx("span",{className:"text-sm text-gray-500",children:"Muted users can still follow you and see your content, but you will not see any content from them. They will not know that they have been muted."}),E.jsx("div",{className:"gap-xxxs mt-m flex",children:E.jsx(EQe,{selected:l,onSelect:c})}),E.jsx(qC,{variant:"primary",onClick:()=>{(()=>{if(!e)return;const t=yH[l];a({userId:e.id,...t&&{duration:t}}),Lt.success(`${u} is muted`,{customIcon:E.jsx(CA,{color:"white"})}),p(),null==r||r()})()},isLoading:o,className:"mt-m ml-auto block","data-testid":"submitAction",children:"Mute"})]}):null,isMuteDialogOpened:f}},CQe=e=>e.replace(/(<)/g,"<").replace(/>/g,">"),IQe="data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M12%209V0L0%2012H9C10.6569%2012%2012%2010.6569%2012%209Z'%20fill='white'/%3e%3cpath%20d='M0%203V12L12%200H3C1.34315%200%200%201.34315%200%203Z'%20fill='%23CBD5E1'/%3e%3c/svg%3e",oA=52,AQe=e=>{const[t,r]=g.useState((null==e?void 0:e.length)||0),n=g.useRef(null),a=g.useRef(null);return{inputRef:n,textareaRef:a,charCount:t,setCharCount:r,handleKeyDown:e=>{var t,r;e.key===Hq&&(e.preventDefault(),null==(t=n.current)||t.blur(),null==(r=a.current)||r.blur())},handleTextareaChange:e=>{const t=e.target,n=t.value.length;r(n);const a=RQe(t);setTimeout((()=>{if(t.style.height="52px",!a)return;const e=Math.max(t.scrollHeight,52);t.style.height=`${e}px`}),0)}}},RQe=e=>{if(e instanceof HTMLTextAreaElement){const t=document.createElement("canvas").getContext("2d"),r=window.getComputedStyle(e);if(t){t.font=r.font||"16px sans-serif";const n=parseInt(r.paddingLeft||"0")||0,a=parseInt(r.paddingRight||"0")||0,o=e.clientWidth-n-a;return t.measureText(e.value).width>o}return e.scrollHeight>52}{const t=e.value.includes("\n"),r=e.scrollWidth>e.clientWidth;return t||r}},dj=52,Py=200,TQe=10,PQe=Ke.object({note:Ke.string().max(Py)}),$Qe=({userId:e,note:t="",className:r,resizable:n=!1})=>{const[a]=wWe(),[o]=_We(),i=en(Qi.selectors.selectIsAuthenticated),s=en(Ql.selectors.selectCurrentUser),l=(null==s?void 0:s.id)===e,c=e=>{const t=e.target.value;u(t)},u=async(t="")=>{t?await a({noteUpdate:{userId:e,text:t}}):await o({userId:e})},f=WR({resolver:pW(PQe)}),{inputRef:d,textareaRef:p,charCount:h,setCharCount:g,handleTextareaChange:m,handleKeyDown:y}=AQe(t);if(!l&&i)return E.jsx(bF,{...f,children:E.jsxs("form",{className:he("my-5",r),onKeyDown:y,children:[h>=190&&E.jsxs("div",{className:"mb-xxs text-right text-sm text-gray-400",children:[Py-h," characters left"]}),E.jsx(_F,{control:f.control,name:"note",render:e=>E.jsxs("div",{className:"rounded-m relative flex items-center bg-gray-100 text-gray-700",children:[n?E.jsx("textarea",{...e,ref:p,maxLength:Py,onBlur:c,onChange:m,defaultValue:t,placeholder:"Leave a note (visible only to you)",className:"scrollbar-hide p-s w-full resize-none border-0 bg-transparent text-base leading-5 outline-none [-ms-overflow-style:none] [scrollbar-width:none] focus:border-0 focus-visible:border-0 focus-visible:ring-0 focus-visible:ring-offset-0 disabled:opacity-[1] [&::-webkit-scrollbar]:hidden",style:{height:"52px"}}):E.jsx("input",{...e,ref:d,maxLength:Py,onBlur:c,onChange:e=>{g(e.target.value.length)},defaultValue:t,placeholder:"Leave a note visible only to you",className:"p-s w-full border-0 bg-transparent focus-visible:outline-none disabled:opacity-[1]",style:{height:"52px"}}),E.jsx("img",{src:IQe,alt:"user note",className:"absolute bottom-0 right-0"})]})})]})})},pj=({status:e,iconOnly:t=!1,clasName:r})=>{const n="muted"===e?E.jsx(CA,{size:16}):E.jsx(a7,{size:16}),a="muted"===e?"text-brown outline-brown":"text-red-dark outline-red-dark";return E.jsxs("div",{className:he(a,"flex items-center gap-1 rounded-sm bg-white px-2 py-1 text-sm font-semibold outline",t&&"p-1",r),children:[n,!t&&da.capitalize(e)]})},zQe=({children:e})=>E.jsx("span",{className:"line-clamp-2 block text-ellipsis whitespace-pre-wrap break-words text-left",children:e}),bH=({user:e,status:t,skip:r=!1})=>{const n=en(Ql.selectors.selectCurrentUser),a=en(Qi.selectors.selectIsAuthenticated),o=!r&&a,[i,s]=g.useState(!1),l=e&&!e.local&&e.domain?`@${e.username}@${e.domain}`:void 0,c=(null==e?void 0:e.id)||(null==n?void 0:n.id),u=!(t||!c||!o),f=!(!t||!a||u||!o||l),{data:d,isLoading:p,error:h}=PWe({userNameFull:l},{skip:!l||i}),{data:m,isLoading:y,error:v}=xWe({status:t},{skip:u||!f||i}),{data:b,isLoading:w,error:_}=EWe({userId:c},{skip:f||!u||i}),k=(u?[...b||[],...d||[]]:null)||m,x=y||w||p;return g.useEffect((()=>{(Hy(v)||Hy(_)||Hy(h))&&s(!0)}),[v,_,h]),[k,x,i]},Hl={first:"first",second:"second"},MQe=({user:e,showEmpty:t=!0,className:r,renderModal:n,...a})=>{var o;const[i,s]=bH({user:e}),[l,c]=g.useState({open:!1,tab:Hl.first}),{guardedAction:u,ActionTooltipWrapper:f}=hb(),d=(null==i?void 0:i.length)||(null==(o=e.stats)?void 0:o.followers)||0,p=1===d?"follower":"followers",h=(null==i?void 0:i.slice(0,3))||[];return s?E.jsx(gf,{className:"mx-auto mb-4 h-7 w-[200px]"}):0!==d||t?E.jsxs("div",{"data-testid":"user-followers",children:[l.open&&(null==n?void 0:n({user:e,tab:l.tab,isOpen:!0,onClose:()=>c((e=>({...e,open:!1}))),...a})),E.jsx(f,{children:E.jsxs("div",{onClick:u((()=>{c({tab:Hl.first,open:!0})})),className:he("mb-4 flex cursor-pointer items-center text-base font-medium text-gray-900",r),children:[h.length>0&&E.jsx("ul",{className:"mr-2 flex items-center",children:h.map(((e,t)=>E.jsx("li",{className:he("relative",t>0&&"-ml-2"),children:E.jsx("div",{className:"rounded-full bg-white p-0.5",children:E.jsx(zp,{size:24,name:e.displayName,imgUrl:t1({user:e})})})},e.id)))}),d," ",p]})})]}):null},OQe=({status:e,userId:t,skip:r=!1})=>{const n=en(Qi.selectors.selectIsAuthenticated),a=!!e&&n,[o,i]=g.useState(!1),{data:s,isLoading:l,error:c}=IWe({status:e},{skip:!a||r||o}),{data:u,isLoading:f,error:d}=CWe({userId:t},{skip:a||!t||!n||r||o}),p=s||u,h=l||f;return g.useEffect((()=>{(Hy(c)||Hy(d))&&i(!0)}),[c,d]),{data:p,isLoading:h,isHidden:o}},NQe=({userUrl:e})=>E.jsxs("div",{className:"flex w-full items-center justify-between",children:[E.jsxs("div",{className:"gap-xs flex items-center",children:[E.jsx("div",{className:"flex size-10 items-center justify-center rounded-full border border-gray-200",children:E.jsx(ZZ,{size:20})}),E.jsxs("div",{className:"text-sm",children:[E.jsx("p",{className:"mb-xxxs font-semibold text-gray-900",children:"Some followers may not be visible"}),E.jsx("span",{className:"text-gray-400",children:"You can see more on the original server"})]})]}),E.jsx(Fge,{baseUrl:e,children:E.jsx("a",{href:e,children:E.jsxs(Gn,{variant:"secondary",className:"gap-xxs font-semibold",children:["See more followers ",E.jsx(UZ,{})]})})})]}),DQe=e=>{const{baseUrl:t}=o2.get();return e.local?`${t}/@${e.username}`:`https://${e.domain}/@${e.username}`},ap=e=>e&&!!e.repostOf&&(!!e.text||e.uploads.length>0),Tw=e=>{var t,r;return!(null==(t=null==e?void 0:e.stats)||!t.reposts)||!(null==(r=e.repostedBy)||!r.length)},Zo=(e,t,r=!1,n=e=>!!e)=>{var a,o,i;let s;return(null==t?void 0:t.id)===e&&n(t)||!r&&(null==(a=null==t?void 0:t.originalPost)?void 0:a.id)===e||!r&&(null==(o=null==t?void 0:t.parent)?void 0:o.id)===e?t:(null==(i=null==t?void 0:t.replies)||i.some((t=>(s=Zo(e,t,r,n),!!s))),s)},jQe="feeds-public",gy=e=>e===jQe,wH="replies",Pw=e=>e.startsWith(wH),$w=(e,t)=>`${e}-${t}`,LQe=(e,t)=>{if(e.pinned&&!t.pinned)return-1;if(!e.pinned&&t.pinned)return 1;if(e.pinned&&t.pinned){const r=Array.isArray(e.path)?e.path.length:0,n=Array.isArray(t.path)?t.path.length:0;if(r!==n)return r-n}return 0},uf=(e,t,r,n=!1)=>{e.forEach(((e,a)=>{var o,i;t===(null==(o=e.originalPost)?void 0:o.id)?r(e.originalPost||e,e,a):t===e.id&&r(e,e,a),null!=(i=e.replies)&&i.length&&!n&&uf(e.replies,t,r)}))},VQe=(e,t=3)=>{var r,n;if(!Array.isArray(e)||0===e.length)return e;const a=null==(r=e[0].replies)?void 0:r.find((e=>!e.isHighlightCopy)),o=(null==(n=null==a?void 0:a.path)?void 0:n.length)||0,i=e=>{var r;const n=((null==(r=null==e?void 0:e.path)?void 0:r.length)||0)-o<t,a=Array.isArray(e.replies)?e.replies.map(i):e.replies;return{...e,...n?{isOpen:!0}:{},replies:a}};return e.map(i)},hj=(e,t)=>new Date(t.createdAt).getTime()-new Date(e.createdAt).getTime(),hC="feed",yy="feeds",vy="reposts",mj="following",mC={items:[]},BQe={data:{},deletedPosts:[]},FQe=ur({name:"feeds",initialState:BQe,reducers:{addList:(e,t)=>{const{key:r,posts:n,isNewList:a}=t.payload,o=r.startsWith(`${hC}-`);if(!e.data[r]||a||o){e.data[r]={...mC};const t=o?VQe(n,3):n;e.data[r].items=t}else e.data[r].items.push(...n)},addPost:(e,t)=>{const r=Object.keys(e.data),n=t.payload.ownerId||t.payload.author.id;r.forEach((r=>{var a;if(!gy(r)||"PUBLIC"===t.payload.privacy)if(gy(r)||r===$w(yy,n)||r.startsWith(mj)){if(e.data[r].items.some((e=>e.id===t.payload.id)))return;const n=e.data[r].items.findLastIndex((e=>e.pinned));-1===n?e.data[r].items=[t.payload,...e.data[r].items]:e.data[r].items.splice(n+1,0,t.payload)}else{const o=$w(yy,n);(null==(a=e.data[o])||!a.items.length)&&r.startsWith("feed")&&(e.data[o]={...mC},e.data[o].items=[t.payload])}}))},updatePost:(e,t)=>{const r=Object.keys(e.data);let n=0;r.forEach((r=>{var a;uf(e.data[r].items,t.payload.id,(e=>{var r,a;const o=t.payload,i=(null==(r=null==o?void 0:o.path)?void 0:r.length)>0,s=e.text!==o.text,l={...e,...t.payload,...!t.payload.card&&{card:null},...!(null!=(a=o.settings)&&a.sensitive)&&{summary:""},...i&&{originalPost:null,parent:null},...s&&{translations:null}};e&&(Object.assign(e,l),n=1)}));const o=t.payload;if(0===n&&!o.pinned)if(gy(r)||r.startsWith(yy)||r.startsWith(vy)){const t=[o,...e.data[r].items].sort(hj);e.data[r].items=t}else if(Pw(r)){const t=e.data[r].items.length,n={...o.parent,replies:[{...o,parent:null}]};e.data[r].items=t?[n,...e.data[r].items]:[n]}else{const t=Zo((null==(a=o.path)?void 0:a.at(-1))||"",{id:"root-feed",replies:e.data[r].items});t&&(t.replies=[o,...t.replies||[]])}gy(r)&&"PUBLIC"!==o.privacy&&(e.data[r].items=e.data[r].items.filter((e=>e.id!==o.id))),n=0}))},deletePost:(e,t)=>{const{postId:r,repostOf:n}=t.payload,a=Object.keys(e.data),o=n||r;n&&e.deletedPosts.includes(n)||a.forEach((t=>{const a=Pw(t),i=Zo(r,{id:"root-feed",replies:e.data[t].items}),s=Zo(n||"",{id:"root-feed",replies:e.data[t].items});i&&ap(i)&&e.deletedPosts.push(i.id),a&&(e.data[t].items=e.data[t].items.filter((e=>{var t;return(null==(t=e.replies)?void 0:t[0].id)!==r})));let l=0;const c=(null==i?void 0:i.repostOf)||n;if(c){const a=(e,t)=>{!n&&i&&ap(i)?(i.author.id===(null==t?void 0:t.author.id)&&!t.originalPost&&(l+=1),e&&lo.isNumber(null==e?void 0:e.stats.quotes)&&(1===l&&1===e.stats.quotes&&(e.quoted=!1),e.stats.quotes-=1)):ap(i)?lo.isNumber(e.stats.quotes)&&(e.stats.quotes-=1):lo.isNumber(e.stats.reposts)&&Tw(e)&&(e.stats.reposts-=1,e.stats.reposts||(e.reposted=!1))},u=i||s,f=(null==u?void 0:u.originalPost)&&Tw(null==u?void 0:u.originalPost)||u&&Tw(u);e.data[t].items.forEach((e=>{var t;e.repostOf===o&&!f&&(!ap(e)||(null==(t=e.originalPost)?void 0:t.id)===r)&&e.originalPost&&(e.originalPost.deleted=!0,e.originalPost.text="")})),uf(e.data[t].items,c,a)}const u=e.data[t].items.filter((e=>e.id!==r));e.data[t].items=u}))},likePost:(e,t)=>{const r=Object.keys(e.data),{id:n,count:a,isLiked:o,isIncrement:i}=t.payload;r.forEach((t=>{uf(e.data[t].items,n,(e=>{const t=e.stats.likes||0,r=lo.isNumber(a)?a:i?t+1:t-1;e.liked=o,e.stats.likes=r,e.updatedAt=(new Date).toISOString()}))}))},repost:(e,t)=>{const{userId:r,post:n}=t.payload;Object.keys(e.data).forEach((t=>{if(e.data[t].items.find((e=>{var t;return(null==(t=e.originalPost)?void 0:t.id)===n.id||e.id===n.id})))return;uf(e.data[t].items,n.repostOf,((e,t)=>{var a,o;const i=Number(null==(a=n.originalPost)?void 0:a.stats.quotes)||0,s=Number(null==(o=n.originalPost)?void 0:o.stats.reposts)||0;ap(n)?e.stats.quotes=i:e.stats.reposts=s,(null==t?void 0:t.author.id)===r&&ap(n)?e.quoted=!0:n.author.id===r&&Tw(n.originalPost)&&(e.reposted=!0)})),(gy(t)||t.startsWith(mj)||[$w(yy,n.author.id),$w(vy,n.author.id)].includes(t))&&ap(n)&&e.data[t].items.unshift(n)}))},addComment:(e,t)=>{Object.keys(e.data).forEach((r=>{const n=Pw(r),a=r.startsWith(vy),o=r.startsWith(`${hC}-`);if(Zo(t.payload.id,{id:"root-feed",replies:e.data[r].items}))return;const i=n&&!a?t.payload.conversationId:t.payload.path.at(-1),s=Zo(i,{id:"root-feed",replies:e.data[r].items});if(n){const n=Zo(t.payload.conversationId,e.data[r].items[0]);if(n)e.data[r].items.unshift({...n,replies:[t.payload]});else if(0===e.data[r].items.length&&t.payload.parent){const n={...t.payload,parent:null};e.data[r].items=[{...t.payload.parent,replies:[n]}]}}else s&&(s.replies?(s.replies.push(t.payload),s.updatedAt=(new Date).toISOString()):null!=s&&s.replies||(s.replies=[t.payload],s.updatedAt=(new Date).toISOString()));const l=(e,r)=>{const n=!ap(r)||t.payload.conversationId===(null==r?void 0:r.id);r&&n&&lo.isNumber(r.stats.comments)&&(r.stats.comments+=1)};n||t.payload.path.forEach((t=>{if(o){const n=Zo(t,{id:"root-feed",replies:e.data[r].items});n&&lo.isNumber(n.stats.comments)&&(n.stats.comments+=1,n.updatedAt=(new Date).toISOString())}else uf(e.data[r].items,t,l,!0)}))}))},deleteComment:(e,t)=>{const{commentId:r,skipCounterUpdate:n}=t.payload,a=Object.keys(e.data);e.deletedPosts.includes(r)||(e.deletedPosts.push(r),a.forEach((t=>{var a,o;const i=Pw(t),s=Zo(r,{id:"comment-feed",replies:e.data[t].items});i?e.data[t].items=e.data[t].items.filter((e=>{var t;return(null==(t=e.replies)?void 0:t[0].id)!==r})):s&&((null==(a=s.originalPost)?void 0:a.id)===r?(s.originalPost.text="",s.originalPost.uploads=[],s.originalPost.deleted=!0):(null==(o=s.parent)?void 0:o.id)===r?(s.parent.text="",s.parent.uploads=[],s.parent.deleted=!0):(s.text="",s.uploads=[],s.deleted=!0),s.updatedAt=(new Date).toISOString(),s.path.forEach((r=>{const a=Zo(r,{id:"sub-feed",replies:e.data[t].items});a&&lo.isNumber(a.stats.comments)&&a.stats.comments>0&&!n&&(a.stats.comments-=1,a.updatedAt=(new Date).toISOString())})))})))},toggleNestedComments:(e,t)=>{const{id:r}=t.payload;Object.keys(e.data).forEach((t=>{const n=Zo(r,{id:"comment-feed",replies:e.data[t].items},void 0,(e=>{var t;return!(null==(t=null==e?void 0:e.replies)||!t.length)}));n&&(n.isOpen=!n.isOpen)}))},openCommentInThread:(e,t)=>{const{commentId:r}=t.payload;Object.keys(e.data).forEach((t=>{const n=Zo(r,{id:"comment-feed",replies:e.data[t].items},!0,(e=>{var t;return!(null==(t=null==e?void 0:e.replies)||!t.length)}));n&&n.path.forEach((r=>{const n=Zo(r,{id:"sub-feed",replies:e.data[t].items},!0);n&&(n.isOpen=!0)}))})),setTimeout((()=>{const e=document.getElementById(`reply-feed-${r}`);e&&e.scrollIntoView({behavior:"smooth",block:"center"})}),0)},removePrivatePosts:(e,t)=>{const r=Object.keys(e.data),{id:n}=t.payload;r.forEach((t=>{const r=e.data[t].items.filter((e=>"PRIVATE"!==e.privacy||e.author.id!==n));e.data[t].items=r}))},hideUserPosts:(e,t)=>{const r=Object.keys(e.data),n=t.payload;r.forEach((t=>{const r=e.data[t].items.map((e=>({...e,isHidden:e.author.id===n})));e.data[t].items=r}))},showUserPosts:(e,t)=>{const r=Object.keys(e.data),n=t.payload;r.forEach((t=>{const r=e.data[t].items.map((e=>({...e,isHidden:(!e.isHidden||e.author.id!==n)&&e.isHidden})));e.data[t].items=r}))},clearList:(e,t)=>{const r=t.payload;e.data[r]&&(e.data[r].items=[])},clearAllLists:e=>{Object.keys(e.data).forEach((t=>{e.data[t].items=[]}))},updatePinPost:(e,t)=>{const r=Object.keys(e.data),{postId:n,pinned:a,isComment:o}=t.payload;r.forEach((t=>{var r,i;if(t.startsWith(yy)||t.startsWith(hC)||t.startsWith(vy)){const s=Zo(n,{id:"root-feed",replies:e.data[t].items},!0,o?e=>!(null!=e&&e.isHighlightCopy):void 0);if(s&&(s.pinned=a),o){const n=Zo(null==s?void 0:s.conversationId,{id:"root-feed",replies:e.data[t].items});if(n)if(a){const e={...s,isOpen:!1,isHighlightCopy:!0,replies:[]},t=n.replies||[];s&&e.path.length>1&&t.unshift(e),n.replies=t.sort(LQe)}else(null==(r=null==s?void 0:s.path)?void 0:r.length)&&1===s.path.length||(n.replies=(null==(i=n.replies)?void 0:i.filter((e=>(null==e?void 0:e.id)!==(null==s?void 0:s.id))))||[])}else if(a){const r=e.data[t].items.filter((e=>e.id!==n));s&&(e.data[t].items=[s,...r])}else e.data[t].items=e.data[t].items.sort(hj)}}))},deleteRepost:(e,t)=>{const r=Object.keys(e.data),{postId:n}=t.payload;e.deletedPosts.push(n),r.forEach((t=>{if(t.startsWith(wH)){const r=e=>{var t;const r=null==(t=e.replies)?void 0:t[0];r&&(r.reposted=!1,lo.isNumber(r.stats.reposts)&&(r.stats.reposts-=1))};uf(e.data[t].items,n,r)}else if(t.startsWith(vy)){const r=e=>{const t=e.originalPost;t&&(t.reposted=!1,lo.isNumber(t.stats.reposts)&&(t.stats.reposts-=1))};uf(e.data[t].items,n,r)}else{const r=e=>{e.reposted=!1,lo.isNumber(e.stats.reposts)&&(e.stats.reposts-=1)};uf(e.data[t].items,n,r)}}))}},selectors:{selectFeedState:(e,t)=>e.data[t]?{...e.data[t],items:e.data[t].items.filter((e=>!e.isHidden))}:{...mC}}}).injectInto(Tp),gC={size:20,color:"var(--gray-900)"},UQe=({user:e,relationship:t,isOwnProfile:r})=>{const n=Em(),[a,o,i,s]=S9({user:e,relationship:t}),{isMuted:l,mute:c,unmute:u,renderMuteDialog:f}=vH({user:e,relationship:t,onUnmute:()=>{n(FQe.actions.showUserPosts(e.id))}}),[d]=TWe(),{isDisabled:p,ActionTooltipWrapper:h}=hb();return[[{icon:E.jsx(a7,{...gC}),name:"Remove from followers",handler:()=>{d({username:ho(e)})},isHidden:!_Qe(t)||r,disabled:p},{icon:E.jsx(CA,{...gC}),name:l?"Unmute":"Mute",handler:l?u:c,isHidden:r||a,disabled:p,renderDialog:f},{icon:E.jsx(AX,{...gC,color:"var(--red-dark)"}),name:a?"Unblock":"Block",handler:a?i:o,className:"text-red-dark",isHidden:r,disabled:p,renderDialog:s}],h]},GQe="animate-slide-up bottom-0 left-0 right-0 top-[unset] max-w-full transform-none rounded-b-none rounded-t-lg pb-10 max-md:w-full",qQe=({className:e,childrenClassName:t,renderContent:r,renderToggler:n,defaultOpen:a=!1})=>{const[o,i]=g.useState(a);return g.useEffect((()=>{i(a)}),[a]),E.jsxs(E.Fragment,{children:[n&&n((()=>i((e=>!e))),o),E.jsx(e1,{open:o,showClose:!1,onCloseModal:()=>i(!1),childrenClassName:t,className:he(GQe,e),children:r({isOpen:o,setOpen:i})})]})};function gj(...e){return d7(UC(e))}const yj=({children:e,actions:t,adminActions:r,renderItemWrapper:n})=>{const{ActionTooltipWrapper:a}=hb();return E.jsxs(E.Fragment,{children:[e,t.map((e=>e.isHidden?null:E.jsxs("div",{children:[E.jsx(a,{triggerClassname:"w-full",children:n(e,E.jsx("div",{className:gj("flex min-h-[24px] items-center text-start text-base",{"opacity-50":e.disabled}),children:e.link?E.jsxs("a",{href:e.link,target:"_blank",rel:"noreferrer",className:"gap-xxs [&_svg]:size-xs flex items-center",children:[e.icon,e.name]}):E.jsxs("div",{className:"gap-xxs [&_svg]:size-xxs flex items-center",children:[e.icon,e.name]})}))}),e.isSeparator&&E.jsx("p",{className:"my-xxs border-t border-dashed border-gray-200"},"menu_separator")]},e.name))),!!r.length&&E.jsxs(E.Fragment,{children:[E.jsx("p",{className:"my-xxs border-t border-dashed border-gray-200"},"menu_separator"),E.jsxs(Yv,{children:[E.jsx(Kv,{className:"p-xxs w-full text-left hover:bg-[hsl(var(--accent))] focus-visible:outline-none",children:"Moderate"}),E.jsx(q0,{side:"right",className:"p-xxs min-w-[200px] text-base font-semibold text-gray-700",children:r.map((e=>e.isHidden?null:E.jsxs("div",{children:[E.jsx(dv,{onClick:e.handler,className:gj("h-m cursor-pointer",e.className,e.isSelected&&"font-semibold"),children:e.link?E.jsx("a",{href:e.link,target:"_blank",rel:"noreferrer",children:e.name}):e.name}),e.isSeparator&&E.jsx("p",{className:"my-xxxs border-t border-dashed border-gray-200"},"menu_separator")]},e.name)))})]})]})]})},WQe=({canCheck:e,onOpenChange:t})=>{const r=g.useRef(null),n=g.useRef(null),[a,o]=g.useState(!0),[i,s]=g.useState(!0);return zU("scroll",(()=>{if(r.current){const e=hD(r.current);s(e),!e&&t(!1)}n.current&&o(hD(n.current))})),g.useEffect((()=>{e&&(i||t(!1))}),[i]),[i||a,r,n]},HQe="flex size-10 items-center justify-center border-gray-700 p-0 focus-visible:ring-0 focus-visible:ring-transparent",_H=({align:e="end",actions:t,children:r,adminActions:n=[],mobileBehavior:a="modal",isPortal:o=!0,desktopModalBehavior:i=!1,triggerVariant:s="none",triggerClass:l=HQe,trigger:c,dropdownClassName:u,onOpenChange:f,triggerSize:d="none",sideOffset:p,alignOffset:h})=>{const[m,y]=g.useState(!1),v=[...t,...n].map((e=>{var t;return e.renderDialog?E.jsx("div",{className:"empty:hidden",children:null==(t=e.renderDialog)?void 0:t.call(e)},e.name):null})),b=MU(),w="modal"===a&&b,_=e=>{null==f||f(e),y(e)},[k,x,A]=WQe({canCheck:m&&!w,onOpenChange:_});return g.useEffect((()=>{k||y(!1)}),[k]),E.jsxs(E.Fragment,{children:[v,w?E.jsx(qQe,{childrenClassName:"flex flex-col p-xxs gap-xxxs",renderToggler:e=>E.jsx(Gn,{onClick:e,size:d,variant:s,className:he("size-m flex items-center justify-center border-gray-700 p-0 focus-visible:ring-0 focus-visible:ring-transparent",l),children:E.jsx($P,{})}),renderContent:({setOpen:e})=>E.jsx(yj,{actions:t,adminActions:n,renderItemWrapper:(t,r)=>E.jsx("div",{onClick:()=>{var r;t.disabled||(null==(r=t.handler)||r.call(t),e(!1))},className:he("mb-xxs p-xxs min-h-m flex cursor-pointer items-center text-sm font-semibold text-gray-700 last:mb-0",t.className),children:E.jsx(vm,{theme:"dark",tooltipText:t.tooltipText||"",size:"small",align:"start",triggerClassname:"w-full",children:r})}),children:r})}):E.jsxs(Yv,{open:m,modal:i,onOpenChange:_,children:[E.jsx(Kv,{asChild:!0,ref:A,"data-testid":"actionsDropdown_menu_trigger",className:"focus:outline-none",children:E.jsx(Gn,{size:d,variant:s,className:he(l),children:c||E.jsx($P,{color:m?"var(--blue_100)":"var(--gray-500)"})})}),E.jsx(q0,{align:e,sideOffset:p,alignOffset:h,isPortal:o,ref:x,"data-testid":"actionsDropdownMenu",avoidCollisions:!0,collisionPadding:8,sticky:"always",className:he("p-xxs min-w-[200px] text-base font-semibold text-gray-700",u),children:E.jsx(yj,{actions:t,adminActions:n,renderItemWrapper:(e,t)=>E.jsx(vm,{theme:"dark",tooltipText:e.tooltipText||"",size:"small",triggerClassname:"w-full",children:E.jsx(dv,{onClick:e.handler,disabled:e.disabled,className:he("p-xxs cursor-pointer text-base font-medium",e.className),children:t})})})})]})]})},QQe=e=>{const t=x9(e.user.id),[r]=UQe({...e,isOwnProfile:t});return t?null:E.jsx(E.Fragment,{children:E.jsxs("div",{className:"flex items-center gap-1",children:[E.jsx(gH,{...e,size:e.size||"s"}),E.jsx(_H,{actions:r,mobileBehavior:"dropdown",triggerVariant:"tertiary",triggerClass:"flex h-auto items-center justify-center border-gray-700 p-[6px] focus-visible:ring-0 focus-visible:ring-transparent"})]})})},by=e=>"username"in e,vj=({list:e,onClose:t,className:r,...n})=>{const{relationship:a,isLoading:o}=k9({userId:null==e?void 0:e.map((e=>by(e)?e.id:e.memberId))});return E.jsx("ul",{className:he("no-scrollbar overflow-y-auto overflow-x-hidden",r),"data-testid":"f_list",children:null==e?void 0:e.map((e=>{const r=by(e)?e.id:e.memberId,i=by(e)?e.displayName:e.userDisplayName,s=a[r],l=ho({username:by(e)?e.username:e.userName,domain:by(e)?e.domain:e.userDomain||""});return E.jsxs("li",{className:"mb-3 flex min-w-0 max-w-full items-center justify-between gap-2.5",children:[E.jsx(Wi,{to:"/:username",onClick:t,className:"min-w-0",props:{username:l},children:E.jsxs("div",{className:"flex",children:[E.jsx(zp,{size:40,name:i,imgUrl:t1({user:e,type:"avatar"})}),E.jsx("div",{className:"ml-2 min-w-0 text-gray-700",children:E.jsxs("div",{className:"cursor-pointer",children:[E.jsx("div",{className:"truncate text-base font-semibold",children:i}),E.jsx("div",{className:"truncate text-base font-medium",children:l})]})})]})}),E.jsx(QQe,{user:e,size:"m",relationship:s,isRelationshipPending:o,...n})]},r)}))})},YQe=()=>E.jsx("div",{className:"flex h-full items-center justify-center",children:E.jsx(vf,{className:"size-m animate-spin text-gray-400"})}),bj=({count:e=15,className:t})=>E.jsx("div",{"data-testid":"list-loader",className:he("gap-m ml-auto mr-auto flex max-w-[560px] flex-col",t),children:Array.from({length:e}).map(((e,t)=>E.jsxs("div",{className:"flex gap-2.5",children:[E.jsx(gf,{className:"size-m rounded-full"}),E.jsxs("div",{className:"flex flex-1 flex-col gap-2.5",children:[E.jsx(gf,{className:"h-xxxs w-full"}),E.jsx(gf,{className:"h-xxxs w-[116px]"})]})]},t)))}),KQe=e=>({label:"first"===e?"Followers":"Following",counter:0}),wj=(e,t)=>{var r,n;const a=KQe(e);return`${(null==(r=null==t?void 0:t[e])?void 0:r.label)||a.label} (${(null==(n=null==t?void 0:t[e])?void 0:n.counter)||a.counter})`},XQe=({activeTab:e,onTabChange:t,showLists:r=!0,firstList:n,secondList:a,user:o,isLoading:i,isOpen:s,onClose:l,tabs:c,searchQuery:u,onSearchQueryChange:f,listClassName:d,dialogClassName:p,hiddenListMessage:h,renderFooter:g,title:m=(o?`Connections @${o.username}`:void 0),...y})=>{const v=WR();return E.jsx(e1,{open:s,onCloseModal:l,title:m,className:he("content-baseline",p),childrenClassName:"p-none min-h-[500px] overflow-hidden max-h-[calc(90vh-65px)]",titleClassName:"!border-none",renderFooter:g,children:i?E.jsx(YQe,{}):E.jsxs(Jge,{className:"no-scrollbar h-full overflow-scroll",defaultValue:e,onValueChange:t,children:[E.jsx(t0e,{className:"!mt-0",items:[{value:Hl.first,label:wj("first",c)},{value:Hl.second,label:wj("second",c)}]}),r?E.jsxs("div",{children:[E.jsx("div",{className:"my-m mx-s relative flex",children:E.jsxs(PB,{...v,children:[E.jsx(Y0,{autoFocus:!1,placeholder:"Search",value:u,className:"flex-1 pl-11",onChange:e=>f(e.target.value)}),E.jsx(NZ,{className:"left-s absolute top-3.5 size-5 stroke-gray-300"})]})}),E.jsx(_I,{value:Hl.first,className:"px-s overflow-scroll [&::-webkit-scrollbar]:hidden",children:i?E.jsx(bj,{count:10,className:"mt-none gap-xs overflow-hidden"}):E.jsx(vj,{onClose:l,...y,list:n||[],className:he(d)})}),E.jsx(_I,{value:Hl.second,className:"px-s overflow-scroll [&::-webkit-scrollbar]:hidden",children:i?E.jsx(bj,{count:8,className:"mt-none gap-xs overflow-hidden"}):E.jsx(vj,{onClose:l,...y,list:a||[],className:he(d)})})]}):E.jsx("p",{className:"py-xxl px-m text-center text-sm font-medium text-gray-500",children:h})]})})},ZQe=({tab:e=Hl.first})=>{const[t,r]=g.useState(e),[n,a]=g.useState("");return{activeTab:t,setActiveTab:r,searchQuery:n,setSearchQuery:a}},JQe=({tab:e=Hl.first,user:t,isOpen:r,onClose:n})=>{var a,o;const{activeTab:i,setActiveTab:s,searchQuery:l,setSearchQuery:c}=ZQe({tab:e}),u=x9(t.id),f=!t.local,{data:d,isLoading:p,isHidden:h}=OQe({userId:t.id,skip:!r}),[g,m,y]=bH({user:t,skip:!r}),v=u||!h&&!y,b=m||p,{data:w}=SA({q:l,filter:["users"],followers:i===Hl.first,following:i===Hl.second},{skip:!l}),_=l?null==w?void 0:w.users:g,k=l?null==w?void 0:w.users:d;return E.jsx(XQe,{activeTab:i,user:t,onTabChange:e=>s(e),showLists:v,firstList:_||[],secondList:k||[],isLoading:b,isOpen:r,onClose:n,searchQuery:l,onSearchQueryChange:c,tabs:{first:{label:"Followers",counter:(null==g?void 0:g.length)||(null==(a=t.stats)?void 0:a.followers)||0},second:{label:"Following",counter:(null==d?void 0:d.length)||(null==(o=t.stats)?void 0:o.following)||0}},renderFooter:()=>f?E.jsx(NQe,{userUrl:DQe(t)}):null,listClassName:he(f&&"max-h-[360px] overflow-visible"),hiddenListMessage:"The Followers and Following lists can not be displayed due to the user's privacy configuration"})},eYe=({user:e,className:t,isOwnProfile:r,onFollow:n,onUnfollow:a,hideFollowButton:o=!1})=>{const i=en(J2.selectors.selectEmojis),{follow:s,unfollow:l,renderGuestFollowModal:c}=hH({user:e,onFollow:n,onUnfollow:a}),u=ho(e),{relationship:f,isLoading:d}=k9({userId:e.id}),{isDisabled:p,ActionTooltipWrapper:h}=hb(),{isMuted:g}=vH({user:e,relationship:f}),[m]=S9({user:e,relationship:f});return E.jsx("div",{className:he("z-[6] w-[360px] rounded-lg bg-white p-5 text-base shadow-[0px_4px_6px_0px_rgba(0,0,0,0.09)] outline outline-gray-200",t),"data-testid":"infoPopupContent",onClick:e=>{e.preventDefault(),e.stopPropagation()},children:E.jsxs("div",{children:[c(),E.jsx("div",{className:"mb-4",children:E.jsxs("div",{className:"flex justify-between",children:[E.jsx("div",{className:"max-w-[calc(100%-80px)]",children:E.jsxs(Wi,{to:"/:username",props:{username:u},className:"block",children:[E.jsxs("div",{className:"mb-1 flex items-center gap-2",children:[E.jsx("h2",{className:"truncate text-lg font-semibold text-gray-900",dangerouslySetInnerHTML:{__html:DI(e.displayName,i)}}),E.jsx(E.Fragment,{children:m?E.jsx(pj,{status:"blocked",iconOnly:!0}):g?E.jsx(pj,{status:"muted",iconOnly:!0}):null})]}),E.jsx(zQe,{children:u})]})}),E.jsx(zp,{className:"ml-2 shrink-0",size:48,name:e.displayName,imgUrl:t1({user:e})})]})}),e.summary&&E.jsx("div",{"data-testid":"user-summary",className:"my-3 line-clamp-2 overflow-hidden text-ellipsis leading-6 text-gray-900 empty:hidden",dangerouslySetInnerHTML:{__html:CQe(DI(e.summary||"",i))}}),E.jsx("div",{className:"my-3",children:E.jsx(MQe,{user:e,showEmpty:!1,renderModal:({user:e,tab:t,isOpen:r,onClose:n,...a})=>E.jsx(JQe,{user:e,tab:t,isOpen:r,onClose:n,...a})})}),E.jsx($Qe,{userId:e.id,note:f.note,className:"my-3"}),!r&&!o&&E.jsx("div",{className:"mt-[12px]",children:E.jsx(h,{triggerClassname:"w-full",children:E.jsx(mH,{user:e,relationship:f,follow:()=>{s()},unfollow:()=>{l()},disabled:p,isRelationshipPending:d})})})]})})},tYe=({className:e,canShow:t=!0,...r})=>{const[n,a]=g.useState(!1),o=t&&n;return E.jsxs(HF,{openDelay:1e3,open:n,onOpenChange:a,children:[E.jsx(QF,{"data-testid":"infoPopupWrapper",className:he("max-w-full cursor-default",e),children:r.children}),o&&E.jsx(nYe,{...r})]})},nYe=e=>{const[t,r,n]=SQe({userId:"userId"in e?e.userId:void 0,allowDeleted:"allowDeleted"in e?e.allowDeleted:void 0,username:"username"in e?e.username:void 0});return!t||n?null:E.jsx(cT,{side:"bottom",align:"start",className:"w-[366px] border-0 bg-transparent p-0 shadow-none outline-none",children:E.jsx(eYe,{user:t,isOwnProfile:r,...e})})},rYe=(e,t=!1)=>({displayName:t?14:28,userName:t?e?14:6:e?25:10}),zw=(e="",t)=>e.length>t?e.slice(0,t)+"...":e,aYe=e=>{const t=e.split(/(?=@)/);return 2===t.length?[t[0],t[1]]:[]},oYe=({user:e,maxShortenedInfo:t})=>{const r=e.local,n=rYe(r,t),a=ho(e),o=e.displayName.length<=n.displayName?e.displayName:zw(e.displayName,n.displayName),i=aYe(a);return{displayName:o,userName:a.length<=n.userName?a:r?zw(a,n.userName):`${zw(i[0],n.userName)}${zw(i[1],n.userName)}`}},sYe=({type:e,post:t})=>{var r,n;return"LIKE"===e&&null!=(r=null==t?void 0:t.path)&&r.length||"COMMENT"===e&&(null==t?void 0:t.path)&&t.path.length>1||"REPOST"===e&&(null==(n=null==t?void 0:t.originalPost)?void 0:n.path.length)?"reply":"post"},iYe=e=>{var t;const r=sYe(e);switch(e.type){case"COMMENT":return E.jsxs("span",{children:["Replied to your ",r]});case"FOLLOW":return E.jsx("span",{children:"Started following you"});case"FOLLOW_REQUEST":return E.jsx("span",{children:"Requested following you"});case"LIKE":return E.jsxs("span",{children:["liked your ",r]});case"MENTION":return E.jsx("span",{children:"Mentioned you"});case"EVENT_INVITE":return E.jsxs("span",{children:["Invited you to ",E.jsx(cYe,{notification:e})]});case"EVENT_JOIN":return E.jsx("span",{children:"Joined an event"});case"EVENT_CANCEL":return E.jsx("span",{children:"Canceled an event"});case"EVENT_UPDATE":return E.jsx("span",{children:"Updated an event"});case"REPOST":return null!=(t=e.post)&&t.text?E.jsxs("span",{children:["Quoted your ",r]}):E.jsxs("span",{children:["Reposted your ",r]});case"POLL_VOTE":return E.jsx("span",{children:"Voted on your poll"});default:return null}},cYe=({notification:e})=>{var t,r,n,a;const o=null==(t=e.event)?void 0:t.name,i=null==(r=e.event)?void 0:r.id,s=null!=(n=e.event)&&n.organizer?ho(null==(a=e.event)?void 0:a.organizer):null;return o&&i&&s?E.jsx(Wi,{to:"/:username/events/:eventId",className:"text-blue_120 hover:underline",props:{eventId:i,username:s},children:da.capitalize(o)}):null},lYe=({notification:e})=>{const t=iYe(e);return t?E.jsx("div",{className:"empty:hidden",children:t}):null},uYe=1e3,kH=6e4,C9=60*kH,Sk=24*C9,xH=7*Sk,fYe=29*Sk,dYe=e=>e<C9?"MINUTES":e<Sk?"HOURS":e<xH?"DAYS":e<fYe?"WEEKS":"EXACT_DATE",_j=e=>{const t=new Date,r=e.toLocaleString("en-US",{month:"short",timeZone:"UTC"}),n=e.getUTCDate(),a=e.getUTCFullYear();return a===t.getUTCFullYear()?`${r} ${n}`:`${r} ${n}, ${a}`},pYe=e=>{const t=Date.now(),r=new Date(e).getTime(),n=Math.max(0,t-r);switch(dYe(n)){case"MINUTES":return`${Math.floor(n/kH)}m`;case"HOURS":return`${Math.floor(n/C9)}h`;case"DAYS":return`${Math.floor(n/Sk)}d`;case"WEEKS":return`${Math.floor(n/xH)}w`;default:return _j(new Date(e))}},hYe="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='20'%20height='20'%20rx='10'%20fill='%23D577FF'/%3e%3cg%20clip-path='url(%23clip0_11263_28632)'%3e%3cpath%20d='M8%204.5V6.5M12%204.5V6.5M5.5%208.5H14.5M6.5%205.5H13.5C14.0523%205.5%2014.5%205.94772%2014.5%206.5V13.5C14.5%2014.0523%2014.0523%2014.5%2013.5%2014.5H6.5C5.94772%2014.5%205.5%2014.0523%205.5%2013.5V6.5C5.5%205.94772%205.94772%205.5%206.5%205.5Z'%20stroke='%23FAFAFA'%20stroke-width='1.3'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_11263_28632'%3e%3crect%20width='12'%20height='12'%20fill='white'%20transform='translate(4%203.5)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",mYe="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='20'%20height='20'%20rx='10'%20fill='%23262626'/%3e%3cg%20clip-path='url(%23clip0_11263_28633)'%3e%3cpath%20d='M5.5%2014C5.49996%2013.2301%205.72207%2012.4766%206.13967%2011.8299C6.55728%2011.1832%207.15264%2010.6707%207.8543%2010.354C8.55596%2010.0373%209.33412%209.92973%2010.0954%2010.0443C10.8566%2010.1589%2011.5687%2010.4907%2012.146%2011M14%2011.5V14.5M15.5%2013H12.5M12%207.5C12%208.88071%2010.8807%2010%209.5%2010C8.11929%2010%207%208.88071%207%207.5C7%206.11929%208.11929%205%209.5%205C10.8807%205%2012%206.11929%2012%207.5Z'%20stroke='%23FAFAFA'%20stroke-width='1.3'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_11263_28633'%3e%3crect%20width='12'%20height='12'%20fill='white'%20transform='translate(4.5%203.5)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",gYe="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='20'%20height='20'%20rx='10'%20fill='%23EE3D3D'/%3e%3cpath%20d='M13.5%2011.5C14.245%2010.77%2015%209.895%2015%208.75C15%208.02065%2014.7103%207.32118%2014.1945%206.80546C13.6788%206.28973%2012.9793%206%2012.25%206C11.37%206%2010.75%206.25%2010%207C9.25%206.25%208.63%206%207.75%206C7.02065%206%206.32118%206.28973%205.80546%206.80546C5.28973%207.32118%205%208.02065%205%208.75C5%209.9%205.75%2010.775%206.5%2011.5L10%2015L13.5%2011.5Z'%20stroke='%23FAFAFA'%20stroke-width='1.3'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",yYe="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='20'%20height='20'%20rx='10'%20fill='%234285F4'/%3e%3cg%20clip-path='url(%23clip0_11263_28630)'%3e%3cpath%20d='M12%208V10.5C12%2010.8978%2012.158%2011.2794%2012.4393%2011.5607C12.7206%2011.842%2013.1022%2012%2013.5%2012C13.8978%2012%2014.2794%2011.842%2014.5607%2011.5607C14.842%2011.2794%2015%2010.8978%2015%2010.5V10C15%208.87366%2014.6197%207.7803%2013.9207%206.89709C13.2217%206.01387%2012.245%205.39254%2011.1488%205.13376C10.0526%204.87498%208.90107%204.99391%207.88089%205.47128C6.86071%205.94865%206.03159%206.7565%205.52787%207.76394C5.02415%208.77137%204.87534%209.91937%205.10556%2011.0219C5.33577%2012.1245%205.93151%2013.1171%206.79627%2013.8388C7.66102%2014.5605%208.74413%2014.9691%209.87009%2014.9983C10.9961%2015.0276%2012.0989%2014.6758%2013%2014M12%2010C12%2011.1046%2011.1046%2012%2010%2012C8.89543%2012%208%2011.1046%208%2010C8%208.89543%208.89543%208%2010%208C11.1046%208%2012%208.89543%2012%2010Z'%20stroke='%23FAFAFA'%20stroke-width='1.3'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_11263_28630'%3e%3crect%20width='12'%20height='12'%20fill='white'%20transform='translate(4%204)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",vYe="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='20'%20height='20'%20rx='10'%20fill='%2328B236'/%3e%3cg%20clip-path='url(%23clip0_11263_28627)'%3e%3cpath%20d='M12.5%205L14.5%207M14.5%207L12.5%209M14.5%207H7.5C6.96957%207%206.46086%207.21071%206.08579%207.58579C5.71071%207.96086%205.5%208.46957%205.5%209V9.5M7.5%2015L5.5%2013M5.5%2013L7.5%2011M5.5%2013H12.5C13.0304%2013%2013.5391%2012.7893%2013.9142%2012.4142C14.2893%2012.0391%2014.5%2011.5304%2014.5%2011V10.5'%20stroke='%23FAFAFA'%20stroke-width='1.3'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_11263_28627'%3e%3crect%20width='12'%20height='12'%20fill='white'%20transform='translate(4%204)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",bYe="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='20'%20height='20'%20rx='10'%20fill='%238E54D8'/%3e%3cpath%20d='M15%2011.5C15%2011.7652%2014.8946%2012.0196%2014.7071%2012.2071C14.5196%2012.3946%2014.2652%2012.5%2014%2012.5H8L6%2014.5V6.5C6%206.23478%206.10536%205.98043%206.29289%205.79289C6.48043%205.60536%206.73478%205.5%207%205.5H14C14.2652%205.5%2014.5196%205.60536%2014.7071%205.79289C14.8946%205.98043%2015%206.23478%2015%206.5V11.5Z'%20stroke='%23FAFAFA'%20stroke-width='1.3'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",wYe="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='20'%20height='20'%20rx='10'%20fill='%23F87373'/%3e%3cpath%20d='M13%2014C13%2012.9391%2012.5786%2011.9217%2011.8284%2011.1716C11.0783%2010.4214%2010.0609%2010%209%2010M9%2010C7.93913%2010%206.92172%2010.4214%206.17157%2011.1716C5.42143%2011.9217%205%2012.9391%205%2014M9%2010C10.3807%2010%2011.5%208.88071%2011.5%207.5C11.5%206.11929%2010.3807%205%209%205C7.61929%205%206.5%206.11929%206.5%207.5C6.5%208.88071%207.61929%2010%209%2010ZM15%2013.5001C15%2011.8151%2014%2010.2501%2013%209.5001C13.3287%209.25348%2013.5916%208.92964%2013.7653%208.55723C13.939%208.18482%2014.0183%207.77533%2013.996%207.365C13.9738%206.95466%2013.8507%206.55614%2013.6378%206.2047C13.4248%205.85325%2013.1285%205.55973%2012.775%205.3501'%20stroke='%23FAFAFA'%20stroke-width='1.3'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",_Ye="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='20'%20height='20'%20rx='10'%20fill='%23F47F1F'/%3e%3cg%20clip-path='url(%23clip0_11325_41225)'%3e%3cpath%20d='M11%206H14.5M11%208.5H14.5M11%2011.5H14.5M11%2014H14.5M6%205.5H8.5C8.77614%205.5%209%205.72386%209%206V8.5C9%208.77614%208.77614%209%208.5%209H6C5.72386%209%205.5%208.77614%205.5%208.5V6C5.5%205.72386%205.72386%205.5%206%205.5ZM6%2011H8.5C8.77614%2011%209%2011.2239%209%2011.5V14C9%2014.2761%208.77614%2014.5%208.5%2014.5H6C5.72386%2014.5%205.5%2014.2761%205.5%2014V11.5C5.5%2011.2239%205.72386%2011%206%2011Z'%20stroke='%23FAFAFA'%20stroke-width='1.3'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_11325_41225'%3e%3crect%20width='12'%20height='12'%20fill='white'%20transform='translate(4%204)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",kYe=e=>{switch(e.type){case"COMMENT":return bYe;case"FOLLOW":case"FOLLOW_REQUEST":return mYe;case"LIKE":return gYe;case"MENTION":return yYe;case"REPOST":return vYe;case"EVENT_INVITE":case"EVENT_JOIN":case"EVENT_CANCEL":case"EVENT_UPDATE":return hYe;case"GROUP_INVITE":return wYe;case"POLL":case"LIST_POST_CREATE":case"POST_UPDATE":case"POLL_VOTE":return _Ye}};var pf=(e=>(e.CURRENT_USER="CURRENT_USER",e.USER="USER",e.MY_GROUP="MY_GROUP",e.DISCOVER="DISCOVER",e.NOTIFICATIONS="NOTIFICATIONS",e))(pf||{});function X_(e,t){return e.findIndex((e=>e.id===t))}function SH(e,t){return e.startTime<t.startTime?-1:e.startTime>t.startTime?1:e.id<t.id?-1:e.id>t.id?1:0}const xYe=e=>`${e.startTime}|${e.id}`;function EH(e,t){return da.sortedIndexBy(xYe,t,e)}function kj(e,t,r){if(-1!==X_(e.items,t.id))return;if(0===e.items.length)return void e.items.push(t);const n=SH(t,e.items.at(-1))>0;if(e.items.length%r==0&&n)return void(e.enableNextPageFetch=!0);const a=EH(e.items,t);e.items.splice(a,0,t),(e.items.length-1)%r==0&&(e.items.pop(),e.enableNextPageFetch=!0)}function xj(e,t,r){const{id:n,patch:a,override:o}=t,i=X_(e.items,n);if(-1===i)return;const s=e.items.length,l=e.items[i],c=o?a:da.merge(l,a);if(1===s)return void(e.items[i]=c);if(l.startTime===c.startTime)return void(e.items[i]=c);e.items.splice(i,1);if(SH(c,e.items.at(-1))>0&&s%r==0)return void(e.enableNextPageFetch=!0);const u=EH(e.items,c);e.items.splice(u,0,c)}const SYe={configs:{scope:null,scopeProps:null,queryArgs:null},items:[],filters:null,enableNextPageFetch:!1},Mw=25,$y=ur({name:"events",initialState:SYe,reducers:{setConfigs:(e,t)=>{e.configs=t.payload,e.filters=null,e.items=[]},resetConfigs:e=>{e.configs={scope:null,scopeProps:null,queryArgs:null},e.filters=null,e.items=[]},setFilters:(e,t)=>{e.filters=t.payload},toggleFilters:(e,t)=>{const{filterKey:r}=t.payload;e.filters={...e.filters,[r]:!lo.get(e.filters,r)}},setEnableNextPageFetch:(e,t)=>{e.enableNextPageFetch=t.payload},addEvents:(e,t)=>{const{scope:r,events:n,isNewList:a}=t.payload;e.configs.scope===r&&(a?e.items=n:e.items.push(...n))},addEvent:(e,t)=>{const{event:r}=t.payload;kj(e,r,25)},updateEvent:(e,t)=>{xj(e,t.payload,25)},syncEvent:(e,t)=>{const{event:r}=t.payload;-1===X_(e.items,r.id)?kj(e,r,25):xj(e,{id:r.id,patch:r,override:!0},25)},deleteEvent:(e,t)=>{const{eventId:r}=t.payload,n=X_(e.items,r);-1!==n&&e.items.splice(n,1)}},selectors:{selectConfigs:e=>e.configs,selectScope:e=>e.configs.scope,selectItems:e=>e.items,selectFilters:e=>e.filters,selectEnableNextPageFetch:e=>e.enableNextPageFetch}}).injectInto(Tp),EYe=(e,t)=>{kT().dispatch(CH.util.updateQueryData("getApiV1EventsByEventId",{eventId:e},(r=>{if(e===(null==r?void 0:r.id)){const e="function"==typeof t?t(r):t;return da.merge(r,e)}})))},CH=lr.enhanceEndpoints({endpoints:{getApiV1Events:{forceRefetch:()=>!0,async onQueryStarted(e,{dispatch:t,getState:r,queryFulfilled:n}){const a=r().events.configs.scope;try{const r=await n;a&&t($y.actions.addEvents({scope:a,events:r.data,isNewList:0===e.offset}))}catch(e){Lt.error(`Failed to fetch events ${wr(e)}`)}}},getApiV1EventsMy:{forceRefetch:()=>!0,async onQueryStarted(e,{dispatch:t,getState:r,queryFulfilled:n}){const a=r().events.configs.scope;try{const r=await n;a&&t($y.actions.addEvents({scope:a,events:r.data,isNewList:0===e.offset}))}catch(e){Lt.error(`Failed to fetch events ${wr(e)}`)}}},getApiV1EventsFollowing:{forceRefetch:()=>!0,async onQueryStarted(e,{dispatch:t,queryFulfilled:r}){try{const n=await r;t($y.actions.addEvents({scope:pf.DISCOVER,events:n.data,isNewList:0===e.offset}))}catch(e){Lt.error(`Failed to fetch events ${wr(e)}`)}}},getApiV1EventsByEventId:{providesTags:(e,t,{eventId:r})=>[{type:"Event",id:r}],extraOptions:{maxRetries:1},serializeQueryArgs:({endpointName:e,queryArgs:t})=>({endpointName:e,eventId:t.eventId}),async onQueryStarted(e,{queryFulfilled:t}){await mt(t)}},postApiV1Events:{async onQueryStarted(e,{queryFulfilled:t}){await mt(t,"Event created")}},putApiV1EventsByEventId:{async onQueryStarted(e,{queryFulfilled:t}){await mt(t,"Event updated")}},deleteApiV1EventsByEventId:{async onQueryStarted(e,{queryFulfilled:t}){await mt(t,"Event deleted")}},postApiV1EventsByEventIdCancel:{async onQueryStarted(e,{queryFulfilled:t}){await mt(t,"Event cancelled")}},postApiV1EventsByEventIdAccept:{async onQueryStarted(e,{queryFulfilled:t}){await mt(t)}},postApiV1EventsByEventIdReject:{async onQueryStarted(e,{queryFulfilled:t}){await mt(t)}},postApiV1EventsByEventIdMaybe:{async onQueryStarted(e,{queryFulfilled:t}){await mt(t)}},postApiV1EventsByEventIdJoin:{async onQueryStarted(e,{queryFulfilled:t}){await mt(t)}},postApiV1EventsByEventIdInterested:{async onQueryStarted(e,{queryFulfilled:t}){await mt(t)}},deleteApiV1EventsByEventIdJoinOrInterested:{async onQueryStarted(e,{queryFulfilled:t}){await mt(t)}},postApiV1EventsByEventIdTranslate:{async onQueryStarted(e,{dispatch:t,queryFulfilled:r}){const n=await mt(r),a=null==n?void 0:n.data;if(a){const r={translation:a};t($y.actions.updateEvent({id:e.eventId,patch:r})),EYe(e.eventId,r)}}},getApiV1EventsByEventIdAttendees:{providesTags:(e,t,{eventId:r})=>[{type:"EventAttendees",id:r}],async onQueryStarted(e,{queryFulfilled:t}){await mt(t)}},getApiV1EventsByEventIdMutual:{providesTags:(e,t,{eventId:r})=>[{type:"EventMutualAttendees",id:r}],async onQueryStarted(e,{queryFulfilled:t}){await mt(t)}},getApiV1EventsSettings:{async onQueryStarted(e,{queryFulfilled:t}){await mt(t)}},postApiV1EventsSettingsUpdate:{async onQueryStarted(e,{dispatch:t,queryFulfilled:r}){try{const n=await r;t(lr.util.updateQueryData("getApiV1EventsSettings",lo.omit(e,"updateEventsSettings"),(e=>{Object.assign(e,da.merge(e,n.data))})))}catch(e){Lt.error(`Failed to update settings ${wr(e)}`)}}},postApiV1EventsSettingsRegeneratePrivateId:{async onQueryStarted(e,{dispatch:t,queryFulfilled:r}){try{const n=await r;t(lr.util.updateQueryData("getApiV1EventsSettings",e,(e=>{var t;e.exportPrivateCalendarUniqueId=null==(t=null==n?void 0:n.data)?void 0:t.slice(1,-1)})))}catch(e){Lt.error(`Failed to regenerate URL ${wr(e)}`)}}}}}),{useLazyGetApiV1EventsQuery:Sj,useLazyGetApiV1EventsMyQuery:Ej,useLazyGetApiV1EventsFollowingQuery:CYe,useGetApiV1EventsByEventIdQuery:sit,usePostApiV1EventsMutation:iit,usePutApiV1EventsByEventIdMutation:cit,useDeleteApiV1EventsByEventIdMutation:lit,usePostApiV1EventsByEventIdCancelMutation:uit,usePostApiV1EventsByEventIdAcceptMutation:IH,usePostApiV1EventsByEventIdRejectMutation:AH,usePostApiV1EventsByEventIdMaybeMutation:RH,usePostApiV1EventsByEventIdJoinMutation:IYe,usePostApiV1EventsByEventIdInterestedMutation:AYe,useDeleteApiV1EventsByEventIdJoinOrInterestedMutation:RYe,usePostApiV1EventsByEventIdTranslateMutation:TYe,useGetApiV1EventsByEventIdAttendeesQuery:PYe,useGetApiV1EventsByEventIdMutualQuery:$Ye,useGetApiV1EventsSettingsQuery:fit,usePostApiV1EventsSettingsUpdateMutation:dit,usePostApiV1EventsSettingsRegeneratePrivateIdMutation:pit}=CH,zYe=Ki("flex items-center py-xxs px-xs rounded-m text-sm font-medium gap-xxxs",{variants:{color:{red:"bg-red_100 text-white",default:"bg-white text-gray-900"}},defaultVariants:{color:"default"}}),MYe=({color:e,className:t,children:r})=>E.jsx("span",{className:he(zYe({color:e}),t),children:r}),I9=Object.freeze({PUBLIC:{key:"PUBLIC",title:"Public",description:"Anyone can attend",icon:iZ},UNLISTED:{key:"UNLISTED",title:"Unlisted",description:"Only followers can attend",icon:bZ},DIRECT:{key:"DIRECT",title:"Invite-only",description:"Only invited attendees can attend",icon:kZ}}),OYe=Object.freeze(Object.keys(I9)),NYe=Object.freeze(Object.values(I9)),DYe=()=>E.jsx("svg",{className:"size-[16px] text-gray-400",viewBox:"0 0 24 24",children:E.jsx("circle",{cx:"12",cy:"12",r:"9",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"butt",strokeLinejoin:"miter",strokeDasharray:"3.5 3.5"})}),jYe={JOINED:{color:"--green_100",icon:tv,label:"Going"},JOINED_TENTATIVELY:{color:"--yellow_100",icon:IA,label:"Maybe going"},REJECTED:{color:"--red-dark",icon:nv,label:"Not going"},INVITED:{color:"--gray-400",icon:DYe,label:"Not responded"}},Cj={joins:{label:"Going",icon:LC},interests:{label:"Interested",icon:n7}};function LYe(e){if(!e)throw new Error("Missing uri");const t=new URL(e),r=t.pathname.split("/").filter(Boolean);if(0===r.length)throw new Error("No username found");return{domain:t.hostname,username:r.at(-1)}}function VYe(e,{delay:t}={}){const r=g.useRef(e);g.useLayoutEffect((()=>{r.current=e}),[e]),g.useEffect((()=>{if("number"!=typeof t)return;const e=setInterval((()=>{r.current()}),t);return()=>{clearInterval(e)}}),[t])}const Ij=(e,t)=>{const r=1e3*(60*(new Date).getTimezoneOffset()+t);return new Date(e.getTime()+r)};function Ow(e,t){return new Intl.DateTimeFormat("en-US",t).format(e)}function Aj(e){return new Intl.DateTimeFormat("en-US",{hour:"numeric",minute:"numeric"}).format(e)}function BYe(e){const t=e/3600;return`GMT${t>=0?"+":"-"}${Math.abs(Math.trunc(t))}`}function Rj(e,t){const[r,n]=t.split(":").map(Number),a=new Date(e);return a.setHours(r,n,0,0),a}function yC(e){const t=new Date(e),r=new Date,n=t.getTime()-r.getTime();if(n<=0)return;const a=Math.ceil(n/6e4),o=Math.floor(a/1440),i=Math.floor(a%1440/60),s=a%60;return o>=4||o>=1&&0===i?`${o}d`:o>=1?`${o}d ${i}h`:i>=1&&0===s?`${i}h`:i>=1?`${i}h ${s}m`:`${s}m`}function FYe(){const e=new Date;return e.setDate(e.getDate()+1),e.setHours(0,0,0,0),e}const Tj=da.memoize((({startDate:e,endDate:t,monthFormat:r="short"})=>{const n=new Date,a=new Intl.DateTimeFormat("en-US",{year:"numeric"}).format(n),o=Ow(e,{year:"numeric"}),i=Ow(e,{day:"numeric",month:r,...a!==o&&{year:"numeric"}}),s=Aj(e);if(!t)return{startDateStr:i,startTimeStr:s,endDateStr:void 0,endTimeStr:void 0};const l=Ow(t,{year:"numeric"}),c=Ow(t,{day:"numeric",month:r,...a!==l&&{year:"numeric"}});return{startDateStr:i,startTimeStr:s,endDateStr:i!==c?c:void 0,endTimeStr:Aj(t)}})),UYe=da.memoize((({startTime:e,endTime:t,timeZoneOffsetSeconds:r,monthFormat:n="short"})=>{const a=r!==60*-(new Date).getTimezoneOffset(),o=a?BYe(r):void 0,i=new Date(e),s=t?new Date(t):null;let l;return a&&(l={gmtStr:o,...Tj({startDate:Ij(i,r),endDate:s&&Ij(s,r),monthFormat:n})}),[Tj({startDate:i,endDate:s,monthFormat:n}),l]})),GYe=e=>g.useMemo((()=>UYe(e)),[e]),qYe=({startTime:e,enabled:t})=>{const[r,n]=g.useState(yC(e));return g.useEffect((()=>{n(yC(e))}),[e]),VYe((()=>{0===(new Date).getUTCSeconds()&&n(yC(e))}),{delay:t&&r?1e3:null}),r},WYe=({event:e,withActiveTimer:t,openEventDialog:r,openCancelDialog:n})=>{const{user:a}=Lm(),[o,{isLoading:i}]=IH(),[s,{isLoading:l}]=AH(),[c,{isLoading:u}]=RH(),[f,{isLoading:d}]=IYe(),[p,{isLoading:h}]=AYe(),[g,{isLoading:m}]=RYe(),{id:y,organizer:v,privacy:b,status:w,startTime:_,attendeeStatus:k}=e,x=(null==a?void 0:a.id)===v.id,A="PUBLIC"===b,S="DIRECT"===b,C="CANCELLED"===w,{icon:z,title:I}=I9[b],j=qYe({startTime:_,enabled:t}),P=!j,T=!x&&S&&!C&&!P,R=!x&&A&&!C&&!P;let N=[],O=[];if(x&&(N=[{name:"Edit",icon:E.jsx(TZ,{}),handler:()=>r({event:e}),isHidden:C||P},{name:"Cancel",icon:E.jsx(WZ,{}),handler:()=>n({event:e}),isHidden:C||P},{name:"Copy as new",icon:E.jsx(nZ,{}),handler:()=>r({event:e,copyAsNew:!0})}].filter((e=>!e.isHidden))),T){const e=i||l||u;O=[{name:"Yes",value:"JOINED",icon:tv,isSelected:"JOINED"===k,handler:()=>{"JOINED"!==k&&o({eventId:y})},disabled:e},{name:"No",value:"REJECTED",icon:nv,isSelected:"REJECTED"===k,handler:()=>{"REJECTED"!==k&&s({eventId:y})},disabled:e},{name:"Maybe",value:"JOINED_TENTATIVELY",icon:IA,isSelected:"JOINED_TENTATIVELY"===k,handler:()=>{"JOINED_TENTATIVELY"!==k&&c({eventId:y})},disabled:e}]}if(R){const e=d||h||m,t={JOINED:"Not going",JOINED_TENTATIVELY:"Not interested"};O=[{name:"Interested",value:"JOINED_TENTATIVELY",icon:n7,isSelected:"JOINED_TENTATIVELY"===k,handler:()=>{"JOINED_TENTATIVELY"!==k&&p({eventId:y})},disabled:e},{name:"Going",value:"JOINED",icon:tv,isSelected:"JOINED"===k,handler:()=>{"JOINED"!==k&&f({eventId:y})},disabled:e}],k&&O.push({name:t[k],icon:nv,handler:()=>{k&&g({eventId:y})},disabled:e})}return{isOrganizer:x,isInviteOnly:S,isPublic:A,isCancelled:C,startingIn:j,isInPast:P,organizerActions:N,attendeeActions:O,coverBadges:E.jsx("div",{className:"absolute bottom-xs left-xs",children:S&&E.jsxs(MYe,{children:[E.jsx(z,{size:16})," ",I]})})}},HYe=({className:e,isShowingTranslation:t,isLoading:r,onTranslate:n,onShowOriginal:a})=>{const o=xT();return E.jsx("div",{className:he("text-base text-gray-500",e),children:t?E.jsxs("div",{className:"flex content-center items-center gap-[2px]",children:[E.jsx("button",{onClick:a,"data-prevent":"true",className:"hover:text-gray-700",children:"See the original"}),E.jsx(r_,{size:14}),E.jsx("button",{"aria-label":"Settings","data-prevent":"true","data-testid":"settings-button",className:"hover:text-gray-700",onClick:()=>{o("/settings/languages")},children:E.jsx(jZ,{size:18,className:"pointer-events-none"})})]}):E.jsx("button",{"data-prevent":"true",onClick:()=>{n()},children:r?"Translating...":"Translate"})})},QYe=e=>{const[t,r]=g.useState(!1),{preferredLanguage:n,checkIfTranslatable:a}=dH(),o=null==e?void 0:e.lang,i=null==e?void 0:e.translation,s=a(o),[l,{isLoading:c}]=TYe();g.useEffect((()=>{i||r(!1)}),[i]);return{name:t&&(null==i?void 0:i.name)||e.name,descriptionHtml:t&&(null==i?void 0:i.descriptionHtml)||e.descriptionHtml,TranslationControls:s&&E.jsx(HYe,{isShowingTranslation:t,isLoading:c,onTranslate:async()=>{if(i)r(!0);else try{await l({eventId:e.id,lang:n}).unwrap()&&r(!0)}catch{Aa.error("Failed to translate event")}},onShowOriginal:()=>r(!1)})}},YYe=g.createContext({}),KYe=()=>{const e=g.useContext(YYe);if(!e)throw new Error("useEventsContext must be used within an EventsContextProvider");return e},mb="/:username/events",A9="/g/:groupname/events",XYe=mb,ZYe=`${mb}/settings`,JYe=`${mb}/discover`,eKe=`${mb}/notifications`,tKe=`${mb}/:eventId`,nKe=A9,rKe=`${A9}/settings`,aKe=`${A9}/:eventId`,Pj={user:{event:tKe,list:XYe,settings:ZYe,discover:JYe,notifications:eKe},group:{event:aKe,list:nKe,settings:rKe}},oKe=()=>{const{scope:e,scopeProps:t}=en($y.selectors.selectConfigs),{user:r}=Lm(),n=r?ho(r):"";return g.useCallback((r=>{const{to:a,useFromScope:o,routeProps:i}=r;if(null!=o&&o.includes("group")&&e===pf.MY_GROUP)return k5(Pj.group[a],{groupname:t.group.groupName,...i&&{...lo.omit(i,"username")}});let s=n;return null!=o&&o.includes("user")&&e===pf.USER&&(s=`@${t.username}`),k5(Pj.user[a],{username:s,...i&&{...lo.omit(i,"groupname")}})}),[e,t,n])};function sKe(e,t){let r,n="";try{if(e)null!=e&&e.displayName?(n=e.displayName,r=ho(e).toLowerCase()):n=e.username.toLowerCase();else{const e=LYe(t);n=e.username,r=`@${e.username}@${e.domain}`.toLowerCase()}return{name:n,fullUsername:r}}catch{return{name:"Unknown user"}}}const sA=({uri:e,user:t,status:r,size:n,isAvatar:a})=>{const{user:o}=Lm(),i=en(J2.selectors.selectEmojis),{name:s,fullUsername:l}=g.useMemo((()=>sKe(t,e)),[t,e]),{icon:c,color:u,label:f}=r?jYe[r]:{},d=E.jsx(zp,{size:n,name:DI(s,i),imgUrl:t1({user:t,type:"avatar"})});return a?d:E.jsxs("div",{className:"flex flex-1 items-center gap-xs overflow-hidden",children:[E.jsx(vm,{theme:"dark",size:"small",triggerClassname:"cursor-pointer",tooltipText:f||"",triggerProps:{asChild:!0},children:E.jsxs("div",{className:"relative",children:[d,c&&E.jsx("div",{className:"absolute bottom-none right-none rounded-full bg-white [transform:translate(12%,12%)]",children:E.jsx(c,{size:16,fill:`var(${u})`,color:"var(--base_white_100)",className:"[&>circle]:stroke-0"})})]})}),E.jsxs("div",{className:"flex flex-col items-start gap-xxxs overflow-hidden text-base",children:[E.jsxs("p",{className:"max-w-full overflow-hidden text-ellipsis font-medium text-gray-900",children:[s," ",(null==o?void 0:o.id)===(null==t?void 0:t.id)?"(You)":""]}),l&&E.jsx("p",{className:"max-w-full overflow-hidden text-ellipsis whitespace-nowrap font-normal text-gray-500",children:l})]})]})},iKe=(e,t)=>{const r=g.useRef(t);g.useEffect((()=>{r.current=t}),[t]);zU(null!==document.ontouchstart?"mousedown":"touchstart",(({target:t})=>{!e.current||e.current.contains(t)||r.current(t)}),document.body)};function cKe({value:e,inputValue:t,onChange:r,onBlur:n,onInputChange:a=lo.noop,name:o,icon:i,placeholder:s="Search...",options:l=[],minChars:c=3,debounceMs:u=300,disabled:f,isLoading:d=!1,getOptionKey:p,getOptionLabel:h,renderOption:m,className:y="",inputClassName:v="",disableClearable:b,...w},_){const k=g.useRef(null),[x,A]=g.useState(!1),[S,C]=g.useState(!1),z=g.useMemo((()=>t||(e?h(e):"")),[e,t,h]),[I,j]=g.useState(z);iKe(k,(function(){A(!1),j(z)})),g.useEffect((()=>{j(z)}),[z]);const P=g.useMemo((()=>Nhe(u)(a)),[u,a]);function T(){j(""),A(!1),r&&r(null)}return E.jsxs(hR,{className:he("relative h-auto overflow-visible",y),shouldFilter:!1,ref:k,children:[E.jsxs("div",{children:[E.jsx(Y0,{ref:_,"data-testid":`search-${o}`,value:I,disabled:f,placeholder:s,className:he(v,!!i&&"pl-11"),onChange:e=>{const t=e.target.value;j(t),t.length>=c?(A(!0),P(t)):""===t&&(b||T())},onFocus:()=>C(!0),onBlur:e=>{null==n||n(e),C(!1)},...w}),E.jsx(zUe,{icon:i,disabled:f,isFocused:S,isFilled:!!e}),!b&&(e||t)&&E.jsx(Gn,{variant:"none",size:"none",type:"button",className:"px-xs absolute right-0 top-1/2 h-full -translate-y-1/2 text-gray-500 hover:text-gray-700",onClick:()=>T(),"data-testid":"autocomplete-clear-button",children:E.jsx(jv,{className:"size-5 rounded-full bg-white p-[2px]"})})]}),E.jsx(mR,{className:he("z-100 p-xxs rounded-m absolute top-full max-h-48 w-full border bg-white",{hidden:!x}),children:x&&E.jsxs(E.Fragment,{children:[E.jsx(ZL,{children:d?E.jsx(vf,{size:20,className:"mx-auto flex-shrink-0 animate-spin"}):I&&"No results found"}),!d&&(null==l?void 0:l.map((e=>E.jsx(gR,{className:"!rounded-m max-w-full cursor-pointer",onSelect:()=>(e=>{const t=h(e);j(t),A(!1),r&&r(e)})(e),value:p(e),children:m?m(e):h(e)},p(e)))))]})})]})}const lKe=g.forwardRef(cKe),uKe=(e,t)=>{if(!t||t.length<3)return e;const r=e.toLowerCase().indexOf(t.trim().toLowerCase());if(-1===r)return e;const n=e.substring(0,r),a=e.substring(r,r+t.length),o=e.substring(r+t.length);return E.jsxs(E.Fragment,{children:[n,E.jsx("span",{className:"bg-amber-300",children:a}),o]})},fKe=g.forwardRef((({value:e,onChange:t,name:r,...n},a)=>{const[o,i]=g.useState((null==e?void 0:e.formatted)||(null==e?void 0:e.name)||""),{isEnabled:s,isSettingsReady:l,preferredLanguage:c}=dH(),{data:u=[],isLoading:f,isFetching:d}=cX({text:o,...s&&{lang:null==c?void 0:c.toUpperCase()}},{skip:!o||o.length<3||s&&!l});return E.jsxs(Jv,{className:"mt-none space-y-xxs",children:[E.jsx(B2,{children:"Location"}),E.jsx(JR,{children:E.jsx(lKe,{ref:a,name:r,value:e||void 0,onChange:e=>{t(e)},onInputChange:e=>{i(e)},placeholder:"Add event location","data-testid":"address-field",icon:E.jsx(J8,{size:20}),options:u,isLoading:f||d,getOptionKey:e=>e.placeId+e.formatted,getOptionLabel:e=>e.formatted,renderOption:e=>E.jsx("div",{className:"p-xxs",children:E.jsx("span",{className:"text-sm font-medium",children:uKe(e.formatted,o)})}),...n})}),E.jsx(eb,{})]})}));fKe.displayName="AddressField";const dKe=g.forwardRef((({isEdit:e,onChange:t,...r},n)=>E.jsxs(Jv,{className:"mt-none space-y-xxs",children:[E.jsx(B2,{children:"Who can join?"}),E.jsx(vm,{theme:"dark",size:"small",triggerClassname:"w-full",tooltipText:e?"Event visibility can not be changed":"",triggerProps:{asChild:!0},children:E.jsx("div",{children:E.jsxs(eT,{onValueChange:t||lo.noop,...r,children:[E.jsx(tT,{ref:n,className:"w-full text-base",children:E.jsx(EF,{placeholder:"Select visibility"})}),E.jsx(nT,{children:NYe.map((({icon:e,...t})=>E.jsx(xF,{value:t.key,children:E.jsxs("div",{className:"flex items-center gap-xxs px-xxs",children:[E.jsx(e,{size:20}),E.jsxs("div",{className:"flex flex-col items-start",children:[E.jsx("span",{className:"font-medium text-gray-900",children:t.title}),E.jsx("span",{className:" text-gray-500",children:t.description})]})]})},t.key)))})]})})}),E.jsx(eb,{})]})));dKe.displayName="PrivacyField";const pKe=(e,t)=>{const r=g.useRef(!1);g.useEffect((()=>{r.current?e():r.current=!0}),t)},hKe=(e,t,r)=>{const n=g.useRef(e);n.current=e;const a=g.useRef(lo.debounce(((...e)=>n.current(...e)),t,r));return g.useEffect((()=>()=>{a.current.cancel()}),[]),a.current},mKe=(e,t)=>{const[r,n]=g.useState(e),a=hKe(n,t);return pKe((()=>{a(e)}),[e]),r},$j=({attendees:e,loading:t,disabled:r,onRemove:n,loadingAttendeeId:a,hideStatusIcons:o,className:i})=>{const s=!r&&!!n;return t?E.jsx(vf,{className:"m-auto animate-spin",size:"24"}):E.jsx(E.Fragment,{children:e.length?E.jsx("div",{className:he("flex w-full flex-col gap-xs",i),children:e.map((e=>E.jsx("div",{className:"flex items-center gap-xxs overflow-hidden",children:e.user?E.jsxs(E.Fragment,{children:[E.jsx(sA,{user:e.user,status:o?void 0:e.status}),e.user.id===a?E.jsx(vf,{size:16,className:"flex-shrink-0 animate-spin"}):s&&E.jsx(nv,{className:"flex-shrink-0 cursor-pointer",size:16,onPointerDown:e=>e.stopPropagation(),onClick:t=>{t.stopPropagation(),n(e.user)}})]}):E.jsx(sA,{uri:e.uri,status:o?void 0:e.status})},e.uri)))}):E.jsx("span",{className:"text-base font-normal text-muted-foreground",children:r?"No attendees":"Select attendees"})})},zj="!h-auto min-h-xxxl w-full [&>div]:max-w-full",TH=g.forwardRef((({readOnly:e,isEdit:t,eventId:r,onChange:n,className:a,hasAttendees:o,...i},s)=>{const l=g.useRef(null),[c,u]=g.useState(""),f=mKe(c,300),[d,p]=g.useState([]),h=g.useMemo((()=>d.reduce(((e,t)=>null!=t&&t.user?[...e,t.user.id]:e),[])),[d]),{user:m}=Lm(),{data:y,isLoading:v,isFetching:b}=SA({q:f,filter:["users"]},{skip:!f}),w=v||b,_=(null==y?void 0:y.users)||[],{data:k,isLoading:x}=PYe({eventId:r||""},{skip:!(e||r&&o)}),A=x,[S,{isLoading:C,originalArgs:z}]=dX(),[I,{isLoading:j,originalArgs:P}]=fX(),T=g.useMemo((()=>C?null==z?void 0:z.userId:j?null==P?void 0:P.userId:void 0),[C,j,null==z?void 0:z.userId,null==P?void 0:P.userId]);g.useEffect((()=>{!function(){if(k&&(p(k),n)){const e=k.filter((e=>!!e.user)).map((e=>e.user.id));n(e)}}()}),[k]);const R=async e=>{const a=h.includes(e.id);t&&(a?await I({eventId:r,userId:e.id}):S({eventId:r,userId:e.id}));const o=a?d.filter((t=>{var r;return(null==(r=null==t?void 0:t.user)?void 0:r.id)!==e.id})):[...d,{uri:e.uri,user:e,status:"INVITED"}];if(p(o),!t){const e=o.map((e=>e.user.id));null==n||n(e)}};return e?E.jsx("div",{className:he("flex items-center justify-between",zj,a),children:E.jsx($j,{attendees:d,loading:A,disabled:!0})}):E.jsxs(eT,{...i,onOpenChange:e=>{e&&l.current&&setTimeout((()=>{var e;null==(e=l.current)||e.focus()}),0)},children:[E.jsx(tT,{ref:s,className:he(zj,a),children:E.jsx($j,{attendees:d,loading:A,disabled:null==i?void 0:i.disabled,onRemove:e=>{R(e)},loadingAttendeeId:T,hideStatusIcons:!t,className:"p-xs"})}),E.jsxs(nT,{className:"h-[350px] p-none",children:[E.jsx(yF,{className:"px-none",children:E.jsx("div",{className:"flex items-center gap-2",children:E.jsx(Y0,{ref:l,placeholder:"Search...",value:c,onChange:e=>u(e.target.value)})})}),E.jsx(SF,{className:"flex-1",children:w?E.jsx("div",{className:"flex h-full items-center justify-center",children:E.jsx(vf,{size:20,className:"animate-spin"})}):E.jsxs(E.Fragment,{children:[!(null!=_&&_.length)&&c&&E.jsx("div",{className:"flex h-full items-center justify-center",children:E.jsx("span",{className:"text-sm",children:"No users found"})}),_.map((e=>{if(e.id===(null==m?void 0:m.id))return null;const t=h.includes(e.id);return E.jsx(gF,{value:e.id,isSelected:t,isLoading:e.id===T,onSelect:()=>{R(e)},className:he({"pointer-events-none":T}),children:E.jsx(sA,{user:e})},e.id)}))]})}),E.jsx(vF,{className:"flex justify-end",children:E.jsxs("span",{className:"text-sm text-gray-600",children:[d.length," selected"]})})]})]})}));TH.displayName="AttendeesField";const PH=({src:e,alt:t,ratio:r=1,className:n,children:a,...o})=>E.jsxs("div",{className:he("width-full relative",n),style:{paddingBottom:100/r+"%"},...o,children:[E.jsx("div",{className:"inset-none absolute rounded-[inherit]",children:e&&E.jsx("img",{className:"h-full w-full rounded-[inherit] object-cover",src:e,alt:t})}),a]}),$H=g.forwardRef((({accept:e,children:t,className:r,onDelete:n,onChange:a,disabled:o},i)=>{const s=null!=t&&t.toString().includes("Cover")?"changeCover":"changeAvatar",l={variant:"secondary",size:"s",...o?{disabled:!0}:{as:"label"}};return E.jsxs("div",{"data-testid":s,className:he("my-xxs flex cursor-pointer items-center gap-xxs md:my-none",r),children:[E.jsxs(Gn,{...l,className:"cursor-pointer",children:[t,E.jsx(vv,{ref:i,accept:e,onChange:a})]}),n&&E.jsx(Gn,{type:"button","data-testid":"delete",variant:"secondary",size:"icon_m",className:"rounded-m",onClick:n,disabled:o,children:E.jsx(r7,{size:20})})]})}));$H.displayName="ChangeEventImg";const gKe=e=>{var t,r;return{preview:(null==(r=null==(t=null==e?void 0:e.files)?void 0:t[0])?void 0:r.uri)||void 0,uploadId:null==e?void 0:e.uploadId}},yKe=g.forwardRef((({value:e,onChange:t},r)=>{const[n,a]=g.useState((()=>gKe(e))),[o,i]=g.useState(!1),s=async([e])=>{const r=n.preview;i(!0),a((t=>({...t,preview:e.objectUrl})));try{const r=(async e=>{const t=await d({media:e,tag:Qq.post});if(!t)throw new Error("Upload failed");return t})(e);t(r);const n=await r;t(n),a((e=>({...e,uploadId:n})))}catch(e){a((e=>({...e,preview:r}))),Aa.error("Error uploading image:",e)}finally{i(!1)}},{sizes:l,preview:c,acceptList:u,isModalOpen:f,uploadFile:d,handleSave:p,handleClose:h,handleUpload:m,handleFileChange:y}=YBe((e=>{s(e)})),v=!!n.preview;return E.jsxs(E.Fragment,{children:[E.jsxs(Jv,{className:"mt-none space-y-xxs",children:[E.jsxs(PH,{src:n.preview,"data-testid":"event-image-preview",className:he("rounded-xl",{"opacity-50":o}),children:[!v&&E.jsx("svg",{className:"pointer-events-none absolute inset-0 size-full text-gray-300",children:E.jsx("rect",{x:"1%",y:"1%",width:"98%",height:"98%",rx:"20",ry:"20",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeDasharray:"8 8"})}),E.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center gap-s",children:[!v&&E.jsx(Z8,{size:40,className:"text-gray-700"}),E.jsxs($H,{ref:r,accept:u,disabled:o,onChange:e=>{m(e)},...v&&{onDelete:()=>(a({preview:"",uploadId:void 0}),void t(null))},children:[v?"Change":"Upload"," image"]})]}),o&&E.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:E.jsx(vf,{size:24,className:"animate-spin"})})]}),E.jsx(eb,{})]}),E.jsx(mFe,{title:"Crop image",sizes:l,open:f,accept:u,preview:c,onSave:p,onChange:e=>{y(e)},onClose:h,aspect:1,children:"Change cover"})]})}));yKe.displayName="EventImageField";const vKe=["CONFIRMED","CANCELLED"],zH="Pick a date",Mj=/^\d{2}:\d{2}$/,Xw="Pick a time",Oj=512,Nj=5e3,MH=Ke.object({name:Ke.string().min(1,{message:"Event name is required"}).max(Oj,{message:"Event name must be at most 512 characters"}),description:Ke.string().max(Nj,{message:"Description must be at most 5000 characters"}).nullable().optional(),startDate:Ke.preprocess((e=>e||void 0),Ke.date({required_error:zH})),startTime:Ke.preprocess((e=>e||void 0),Ke.string({required_error:Xw}).regex(Mj,{message:Xw})),endDate:Ke.date().nullable(),endTime:Ke.string().regex(Mj,{message:Xw}).nullable(),_includeEndDate:Ke.boolean(),ianaTimeZone:Ke.string().min(1,{message:"Time zone must be selected"}),url:Ke.string().url().or(Ke.literal("")).nullable().optional(),imageId:Ke.union([Ke.string(),Ke.promise(Ke.string())]).nullable().optional(),address:Ke.object({formatted:Ke.string(),name:Ke.string().nullable().optional(),country:Ke.string().nullable().optional(),countryCode:Ke.string().nullable().optional(),region:Ke.string().nullable().optional(),regionCode:Ke.string().nullable().optional(),subRegion:Ke.string().nullable().optional(),locality:Ke.string().nullable().optional(),street:Ke.string().nullable().optional(),postalCode:Ke.string().nullable().optional(),houseNumber:Ke.string().nullable().optional(),longitude:Ke.number().nullable().optional(),latitude:Ke.number().nullable().optional(),timeZone:Ke.string().nullable().optional(),plusCode:Ke.string().nullable().optional(),serviceId:Ke.string().nullable().optional(),placeId:Ke.string().nullable().optional()}).nullable().optional()}),OH=(e,t)=>{const r=Date.now(),n=Rj(e.startDate,e.startTime).getTime();if((isNaN(n)||n<=r)&&(t.addIssue({code:Ke.ZodIssueCode.custom,path:["startDate"],message:"Must be in the future"}),t.addIssue({code:Ke.ZodIssueCode.custom,path:["startTime"],message:""})),e._includeEndDate)if(e.endDate)if(e.endTime){const r=Rj(e.endDate,e.endTime).getTime();(isNaN(r)||r<=n)&&(t.addIssue({code:Ke.ZodIssueCode.custom,path:["endDate"],message:"End time must be later than start time"}),t.addIssue({code:Ke.ZodIssueCode.custom,path:["endTime"],message:""}))}else t.addIssue({code:Ke.ZodIssueCode.custom,path:["endTime"],message:Xw});else t.addIssue({code:Ke.ZodIssueCode.custom,path:["endDate"],message:zH})};MH.extend({groupId:Ke.string().optional(),status:Ke.enum(vKe,{required_error:"Status is required",invalid_type_error:"Invalid status selected"}),privacy:Ke.enum(OYe,{required_error:"Privacy setting is required",invalid_type_error:"Invalid privacy choice"}),invitees:Ke.array(Ke.string()).optional()}).superRefine(OH),MH.superRefine(OH),FYe(),Intl.DateTimeFormat().resolvedOptions().timeZone;const bKe=({address:e})=>{const t=(null==e?void 0:e.formatted)||(null==e?void 0:e.name)||"Unnamed address";return null!=e&&e.latitude&&null!=e&&e.longitude?E.jsx(Wi,{to:`https://www.google.com/maps/place/${e.latitude},${e.longitude}`,target:"_blank",rel:"noopener noreferrer",className:"hover:underline",children:t}):E.jsx("span",{children:t})},Dj=({startDateStr:e,startTimeStr:t,endDateStr:r,endTimeStr:n,gmtStr:a})=>E.jsxs("span",{className:"[&_svg]:inline [&_svg]:align-sub",children:[a&&E.jsx(E.Fragment,{children:"Time at location "}),E.jsxs(E.Fragment,{children:[e,E.jsx(r_,{size:16}),t]}),n&&E.jsxs(E.Fragment,{children:[E.jsx(e7,{size:16,className:"mx-xxxs"}),r,r&&E.jsx(r_,{size:16}),n]}),a&&E.jsxs(E.Fragment,{children:[" (",a,")"]})]}),NH=({className:e,...t})=>{const[r,n]=GYe(t);return E.jsxs("span",{className:e,children:[E.jsx(Dj,{...r}),n&&E.jsx(vm,{theme:"dark",size:"small",tooltipText:E.jsx(Dj,{...n}),triggerClassname:"inline ml-xxxs align-sub",side:"bottom",children:E.jsx(UX,{size:16})})]})};NH.displayName="DateTimeDisplay";const wKe=(e,t)=>{const[r,n]=g.useState(void 0);return g.useLayoutEffect((()=>{const{current:t}=e;t&&(()=>{if(!t)return;const e=t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth;n(e)})()}),[t,e]),r},_Ke="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUgAAAFICAYAAAAyFGczAABSw0lEQVR4Ae29Z3vkOpImGmAyJZVUdarOmZ7ent1r/v/vuZ/2GdM9u9s93cfUKSuXmcRFwJAgGAGATKOUFG89qiRhAobAi4BXf/nbVw0aBij/q6NnyJgdA7oQjxq/c/ylbkN+qAp7Kq6Ue8WEy4VDfROokFGDOfFTlTJK7mtl5NxwYcJMOdR7jdtDl3+uHFFx4Pznyuic9EEUF87/K6z/bXiYoNbsGFDM8xy/c/ypPd5VRdhqQbi18V/yTZbGr2S39FvVutknzNo059weuvyrijCP4b/GrdR/iwYEAoFAQEIIUiAQCBgIQQoEAgEDIUiBQCBgIAQpEAgEDIQgBQKBgEGrTjZ3LxAIBM8LokEKBAIBAyFIgUAgYCAEKRAIBAyEIAUCgYBBK3M0AoFAQEM0SIFAIGAgBCkQCAQMhCAFAoGAQStDkAKBQEBDNEiBQCBgIAQpEAgEDIQgBQKBgIEQpEAgEDAQghQIBAIGQpACgUDAQLYaCgQCAQPRIAUCgYCBLBQXCAQCBqJBCgQCAQMhSIFAIGAgBCkQCAQMhCAFAoGAQQuyzkcgEAhIiAYpEAgEDIQgBQKBgIEQpEAgEDCQheICgUDAQDRIgUAgYDAlSEql5MxUxl1JjsrIyqm1qiIeJT+xmZoRDhT81OIQ/ud8k9pvusQ+9x1rcOwuzKHkL8nD2N0+8Zjrv+bb1Zb7nNkrqP/trAyBCvOlmVTjt1buXD/PkSRzMvb9pnPt1Ux/sKf7uTgHkpzrdl//ag83Uv97c+liCwQCAQMhSIFAIGAgBCkQCAQMhCAFAoGAgRCkQCAQMBCCFAgEAgayk0YgEAgYiAYpEAgEDIQgBQKBgIEQpEAgEDAQghQIBAIG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FAwKCVBWqCp8echcoCwenQCj0Knh5SCl8jnkOzeLydNKWtwwKB4FXjOTSLxyNIbj86AL1VqGb7UCyTM0v3vkPmHSrlpG4A5sc/t79+TnzT/fWxu9RtLi5pOLV5D5BPO/Xdc997n7iUzl/IhcXlHwB9lgFA/TdP0y2KwrPF8fdic3vP5+4vn+O3FNaSfew5ssyZlWRT/mrf98nD1C1O19U26TXhzj2zIZcfc+JRik/8POc8Bc79nDMVBM8Ox5vFXlIwDlmYDinrNQyRyTDg+eM5ke0Lqf/NYo1jrhsFZf/7aDAlWftm2Nx8mqMRLY3bHA2KMqe0rBp/qdXc9C5xs7DCqacilQXhqpzWeyxI/c/i/wfq9UNPlIcNFQAAAABJRU5ErkJggg==",kKe=({src:e,children:t,className:r,...n})=>E.jsx(PH,{src:e||_Ke,alt:"Event cover","data-testid":"event-cover",className:he(r,"bg-gray-900_10 [&_img]:[mask-image:linear-gradient(to_bottom,black_70%,transparent_120%)]"),...n,children:t}),vC=({icon:e,name:t,isSelected:r})=>E.jsxs(E.Fragment,{children:[e&&E.jsx(e,{className:he("size-xxs flex-shrink-0",r&&"[&:has(circle)_path]:text-gray-100 [&_circle]:text-gray-700"),fill:r?"var(--gray-700)":"transparent"}),t]}),xKe=({attendeeStatus:e,actions:t})=>{if(null==t||!t.length)return null;const r=t.find((e=>e.isSelected));return e&&"INVITED"!==e?E.jsx("div",{className:"grid grid-cols-[1fr_1fr_48px] gap-xs","data-testid":"attendee-actions-dropdown",children:E.jsxs(Yv,{children:[E.jsx(Kv,{className:"\n [&>svg]:flex-shrink-0 [&>svg]:transform [&>svg]:transition-transform [&>svg]:duration-200\n [&[data-state=open]>svg:last-child]:rotate-180\n ",asChild:!0,children:r&&E.jsxs(Gn,{variant:"secondary",disabled:r.disabled,"data-testid":"dropdown-trigger",children:[E.jsx(vC,{...r}),E.jsx(i2,{className:"-mx-xxxs",size:18})]})}),E.jsx(q0,{className:"min-w-[240px]",children:E.jsx(hue,{value:null==r?void 0:r.value,children:t.map((e=>E.jsx(CB,{value:e.value||"",onSelect:e.handler,disabled:e.disabled,className:"cursor-pointer","data-testid":`dropdown-item-${e.name.toLowerCase()}`,children:E.jsx(vC,{...e})},e.name)))})})]})}):E.jsx("div",{className:he("grid gap-xs",{"grid-cols-3":"INVITED"===e,"grid-cols-[1fr_1fr_48px]":!e}),"data-testid":"attendee-actions-grid",children:t.map((e=>E.jsx(Gn,{size:"m",className:"min-w-0",variant:"secondary",onClick:e.handler,disabled:(null==e?void 0:e.disabled)||!1,"data-testid":`action-button-${e.name.toLowerCase()}`,children:E.jsx(vC,{...e})},e.name)))})},SKe=({actions:e})=>{if(null==e||!e.length)return null;const t=e.slice(0,2),r=e.slice(2);return E.jsxs("div",{className:"grid grid-cols-[1fr_1fr_48px] gap-xs","data-testid":"organizer-actions",children:[t.map((e=>E.jsxs(Gn,{size:"m",variant:"secondary",onClick:e.handler,disabled:(null==e?void 0:e.disabled)||!1,children:[e.icon,e.name]},e.name))),!(null==r||!r.length)&&E.jsx(_H,{actions:r,mobileBehavior:"modal",triggerVariant:"secondary",triggerClass:"rounded-m px-xs"})]})},Hh=({icon:e,children:t,testId:r})=>E.jsxs("div",{"data-testid":r,className:"flex items-center gap-xxs text-gray-500",children:[e&&g.cloneElement(e,{size:20,className:"flex-shrink-0"}),E.jsx("div",{className:"overflow-hidden overflow-ellipsis whitespace-nowrap text-base",children:t})]}),EKe=g.memo((e=>{const t=oKe(),r=KYe(),n=g.useRef(null),a=wKe(n),{id:o,startTime:i,endTime:s,timeZoneOffsetSeconds:l,organizer:c,url:u,address:f,stats:d,cover:p,attendeeStatus:h}=e,{isOrganizer:m,isInviteOnly:y,isPublic:v,isCancelled:b,organizerActions:w,attendeeActions:_,coverBadges:k}=WYe({event:e,...r}),x=ho(c),{name:A,TranslationControls:S}=QYe(e);return E.jsx("div",{className:"space-y-xs border-b py-l",children:E.jsxs("div",{className:"flex items-start space-x-xl",children:[E.jsxs("div",{className:"flex-1 space-y-xxs overflow-hidden",children:[E.jsx(NH,{className:"text-sm font-medium text-gray-500",startTime:i,endTime:s,timeZoneOffsetSeconds:l}),E.jsx(Hh,{children:E.jsx(vm,{theme:"dark",size:"small",tooltipText:a?A:"",triggerProps:{asChild:!0},className:"max-w-80 whitespace-normal break-words",side:"bottom",children:E.jsx("h5",{ref:n,className:he("overflow-hidden text-ellipsis whitespace-nowrap text-lg font-semibold text-gray-900 hover:text-blue_100",b&&"line-through"),children:E.jsx(Wi,{to:t({to:"event",useFromScope:["group"],routeProps:{eventId:o,username:x}}),children:A})})})}),S,b&&E.jsx(Hh,{icon:E.jsx(c2,{color:"var(--red-dark)"}),testId:"event-cancelled",children:E.jsx("span",{className:"text-red-dark",children:"This event has been cancelled"})}),E.jsx(Hh,{icon:E.jsx(zp,{name:c.displayName||"",imgUrl:t1({user:c,type:"avatar"})}),testId:"event-organizer",children:E.jsxs(Wi,{to:"/:username",props:{username:x},className:"hover:underline",children:["By ",c.displayName||""," ",m&&"(You)"]})}),u&&E.jsx(Hh,{icon:E.jsx(eJ,{}),testId:"event-url",children:E.jsx(Wi,{to:u,target:"_blank",className:"hover:underline",children:u})}),f&&E.jsx(Hh,{icon:E.jsx(J8,{}),testId:"event-address",children:E.jsx(bKe,{address:f})}),y&&E.jsxs(HF,{children:[E.jsx(Hh,{icon:E.jsx(LC,{}),testId:"event-attendees-invite-only",children:E.jsx(QF,{className:"cursor-pointer",children:E.jsx("span",{className:"hover:underline",children:"Attendees"})})}),E.jsx(ape,{children:E.jsx(cT,{align:"start",className:"relative max-h-80 w-[400px] overflow-auto p-s",children:E.jsx(TH,{eventId:null==e?void 0:e.id,readOnly:!0})})})]}),v&&E.jsx(Hh,{icon:E.jsx(LC,{}),testId:"event-stats-public",children:E.jsxs("span",{className:"inline-flex",children:[(null==d?void 0:d.joins)||0," ",Cj.joins.label,E.jsx(r_,{className:"size-xxs"}),(null==d?void 0:d.interests)||0," ",Cj.interests.label]})}),!(null==w||!w.length)&&E.jsx("div",{className:"pt-xs",children:E.jsx(SKe,{actions:w})}),!(null==_||!_.length)&&E.jsx("div",{className:"pt-xs",children:E.jsx(xKe,{attendeeStatus:h,actions:_})})]}),E.jsx("div",{className:"flex-shrink-0",children:E.jsx(kKe,{className:"w-[164px] rounded-lg",src:null==p?void 0:p.files[0].uri,children:k})})]})})}));function CKe(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}EKe.displayName="EventCard",pf.CURRENT_USER,pf.USER,pf.MY_GROUP,pf.DISCOVER,pf.NOTIFICATIONS;var jj,Zw={exports:{}},IKe=Zw.exports;function AKe(){return jj||(jj=1,e=IKe,t=function(){var e=[],t=[],r={},n={},a={};function o(e){return"string"==typeof e?new RegExp("^"+e+"$","i"):e}function i(e,t){return e===t?t:e===e.toLowerCase()?t.toLowerCase():e===e.toUpperCase()?t.toUpperCase():e[0]===e[0].toUpperCase()?t.charAt(0).toUpperCase()+t.substr(1).toLowerCase():t.toLowerCase()}function s(e,t){return e.replace(t[0],(function(r,n){var a=function(e,t){return e.replace(/\$(\d{1,2})/g,(function(e,r){return t[r]||""}))}(t[1],arguments);return i(""===r?e[n-1]:r,a)}))}function l(e,t,n){if(!e.length||r.hasOwnProperty(e))return t;for(var a=n.length;a--;){var o=n[a];if(o[0].test(t))return s(t,o)}return t}function c(e,t,r){return function(n){var a=n.toLowerCase();return t.hasOwnProperty(a)?i(n,a):e.hasOwnProperty(a)?i(n,e[a]):l(a,n,r)}}function u(e,t,r,n){return function(n){var a=n.toLowerCase();return!!t.hasOwnProperty(a)||!e.hasOwnProperty(a)&&l(a,a,r)===a}}function f(e,t,r){return(r?t+" ":"")+(1===t?f.singular(e):f.plural(e))}return f.plural=c(a,n,e),f.isPlural=u(a,n,e),f.singular=c(n,a,t),f.isSingular=u(n,a,t),f.addPluralRule=function(t,r){e.push([o(t),r])},f.addSingularRule=function(e,r){t.push([o(e),r])},f.addUncountableRule=function(e){"string"!=typeof e?(f.addPluralRule(e,"$0"),f.addSingularRule(e,"$0")):r[e.toLowerCase()]=!0},f.addIrregularRule=function(e,t){t=t.toLowerCase(),e=e.toLowerCase(),a[e]=t,n[t]=e},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach((function(e){return f.addIrregularRule(e[0],e[1])})),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach((function(e){return f.addPluralRule(e[0],e[1])})),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach((function(e){return f.addSingularRule(e[0],e[1])})),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(f.addUncountableRule),f},"function"==typeof CKe?Zw.exports=t():e.pluralize=t()),Zw.exports;var e,t}var RKe=AKe();const Lj=Qc(RKe),bC=4,TKe=({count:e=5,size:t=24})=>E.jsx("div",{"data-testid":"users-preview-skeleton",style:{width:e*(t-4)+4,height:t},className:"relative flex flex-col",children:Array.from({length:e}).map(((e,r)=>E.jsx(gf,{style:{left:r*(t-4),width:t,height:t},className:"absolute top-0 rounded-full"},r)))}),Vj=40,Bj=5,wC=2,PKe=g.memo((({eventId:e})=>{const{isLoading:t,data:r}=$Ye({eventId:e}),n=r||[],a=(null==n?void 0:n.slice(0,5))||[],o=(null==n?void 0:n.length)||0;return E.jsx("div",{className:"space-y-s",children:t?E.jsxs(E.Fragment,{children:[E.jsx("div",{className:"py-xxxs",children:E.jsx(TKe,{count:5,size:40})}),E.jsxs("div",{children:[E.jsx(gf,{className:"mb-xs h-5 w-1/2"}),E.jsx(gf,{className:"h-10 w-full"})]})]}):!!o&&E.jsxs(E.Fragment,{children:[E.jsx(mQe,{users:a,avatarSize:40}),E.jsxs("div",{children:[E.jsx("span",{className:"mb-xxxs block text-base font-semibold",children:Lj("mutual friend",o,!0)}),E.jsx("span",{children:E.jsxs("span",{children:[n.slice(0,2).map((({displayName:e})=>e)).join(", "),o>2&&` and ${Lj("other",o-2,!0)}`," interested in this event"]})})]})]})})}));PKe.displayName="MutualAttendees";const $Ke=({notification:e})=>{var t,r;const n=Em(),[a]=IH(),[o]=AH(),[i]=RH(),s=e.eventResponse||(null==(r=null==(t=e.meta)?void 0:t.actionsTaken)?void 0:r[0].text),l=s?`You said: ${s}`:"",c=t=>{n(A0.actions.updateNotification({...e,eventResponse:t}))};return E.jsx("div",{className:"gap-xs flex items-center",children:s?E.jsx("span",{className:"text-s font-medium uppercase text-gray-500",children:l}):E.jsxs(E.Fragment,{children:[E.jsxs(Gn,{size:"s",className:"min-w-0",variant:"secondary",onClick:()=>{try{if(!e.activityId)return;a({eventId:e.activityId}).unwrap(),c("Yes")}catch(e){Aa.error(`Error accepting event: ${JSON.stringify(e)}`)}},children:[E.jsx(tv,{size:16})," Yes"]}),E.jsxs(Gn,{size:"s",className:"min-w-0",variant:"secondary",onClick:()=>{if(e.activityId)try{i({eventId:e.activityId}).unwrap(),c("Maybe")}catch(e){Aa.error(`Error maybe event: ${JSON.stringify(e)}`)}},children:[E.jsx(IA,{size:16})," Maybe"]}),E.jsxs(Gn,{size:"s",className:"min-w-0",variant:"secondary",onClick:()=>{if(e.activityId)try{o({eventId:e.activityId}).unwrap(),c("No")}catch(e){Aa.error(`Error rejecting event: ${JSON.stringify(e)}`)}},children:[E.jsx(nv,{size:16})," No"]})]})})},Fj=({notification:e,isPopup:t})=>{const{isEventRelated:r,isFollowingRelated:n}=E9(e);switch(!0){case r:return E.jsx($Ke,{notification:e});case n:return E.jsx(xQe,{notification:e,isPopup:t});default:return null}},hit=({notification:e,isPopup:t=!1})=>{var r,n,a,o,i;const s=en(Dc.selectors.selectSupportedExtensions).IMAGE,l=e.fromUser,c=null!=l&&l.avatar?cD({upload:l.avatar,imgExtension:s}):null,u=l?ho(l):"",{isQuote:f,isReply:d,isLike:p,isFollowRequest:h,isUnread:g}=E9(e),m=(f||d)&&null!=(r=e.post)&&r.originalPost?null==(n=e.post)?void 0:n.originalPost.text:"",y=f||p?e.post:(null==(a=e.post)?void 0:a.originalPost)||e.post,v=null==y?void 0:y.uploads[0],b=v?cD({upload:v,imgExtension:s}):null,w=!(null!=l&&l.domain),_=!(null==(o=e.post)||!o.uploads.length),k=l?oYe({user:l,maxShortenedInfo:h||_&&!w}):{displayName:"",userName:""},x=(null==b?void 0:b.uri)&&y,A=!(null==(i=e.post)||!i.summary||!e.post.settings.sensitive),[S]=T0e();return E.jsx("div",{className:"py-xs px-xs rounded-m w-full text-sm hover:bg-gray-100",children:E.jsxs("div",{className:"gap-s flex w-full min-w-0 items-start",children:[l&&E.jsxs("div",{className:"relative shrink-0",children:[E.jsx(zp,{size:40,name:l.displayName||"",imgUrl:(null==c?void 0:c.uri)||""}),E.jsx("img",{src:kYe(e),className:"size-xxs -right-xxs absolute bottom-0.5",alt:e.type})]}),E.jsxs("div",{className:"gap-xs flex min-w-0 grow items-center",children:[E.jsxs("div",{className:"min-w-0 flex-1 overflow-hidden",children:[l&&E.jsx(Wi,{to:"/:username",props:{username:u},className:"block min-w-0",children:E.jsx(tYe,{canShow:!t,username:u,children:E.jsxs("div",{className:"gap-xxxs mb-xxxs flex min-w-0 cursor-pointer items-center text-sm","data-testid":"notificationAuthor",children:[E.jsx("div",{className:"shrink-0 whitespace-nowrap font-semibold text-gray-900",children:k.displayName}),E.jsx("div",{className:"min-w-0 overflow-hidden text-ellipsis whitespace-nowrap font-medium text-gray-500",children:k.userName})]})})}),E.jsxs("div",{className:"gap-xxxs mb-xxxs flex min-w-0 items-center",children:[E.jsx("div",{className:"shrink-0 whitespace-nowrap text-sm font-semibold text-gray-900","data-testid":"notificationTitle",children:E.jsx(lYe,{notification:e})}),E.jsx("div",{className:"min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-gray-500",children:m})]}),y&&E.jsx(Wi,{to:"/:username/posts/:postId",props:{postId:y.id,username:ho(y.author)},className:"mb-xxxs block min-w-0",children:E.jsx("div",{className:he("notificationBody mt-1 overflow-hidden text-ellipsis whitespace-nowrap text-gray-900"),"data-testid":"mentionedFeed",dangerouslySetInnerHTML:{__html:y.text}})}),E.jsx("div",{className:"my-xxxs",children:t&&E.jsx(Fj,{notification:e,isPopup:!0})}),E.jsxs("div",{className:"gap-xxxs inline-flex cursor-pointer items-center text-gray-500 outline-none",onClick:()=>{(async()=>{try{await S({id:e.id,status:g?"READ":"UNREAD"}).unwrap()}catch(e){console.error("Mark notification error: ",e)}})()},children:[E.jsx("div",{"data-testid":"status-indicator",className:he("size-2 rounded-full",g?"bg-blue_100":"border border-gray-300")}),pYe(e.createdAt)]})]}),E.jsxs("div",{className:"relative shrink-0 empty:hidden",children:[x&&E.jsxs(Wi,{to:"/:username/posts/:postId",props:{postId:y.id,username:ho(y.author)},children:[A&&E.jsx("div",{className:"absolute z-[1] size-full backdrop-blur-[5px]"}),E.jsx("img",{className:"border-gray-900_20 block size-12 shrink-0 rounded-[6px] border",src:b.uri,alt:""})]}),!t&&E.jsx(Fj,{notification:e,isPopup:!1})]})]})]})})},zKe=e=>"NOTIFICATION_UNDO"===e.type,MKe=20,mit=({limit:e=20})=>{const[t,r]=g.useState(1),n=Em(),a=en(Qi.selectors.selectIsAuthenticated),o=en(Ql.selectors.selectCurrentUser),i=en(A0.selectors.selectNotificationsOwner),{refetch:s,isUninitialized:l,isLoading:c,isFetching:u,isSuccess:f}=R0e({limit:e,offset:(t-1)*e},{skip:!a});return g.useEffect((()=>{i&&o&&i!==o.id&&(l||c||u||!f||(n(P8()),s()))}),[null==o?void 0:o.id,i]),{loadMore:()=>r((e=>e+1)),isLoading:c}},git=({status:e})=>{const t=en(Qi.selectors.selectIsAuthenticated),{refetch:r,isUninitialized:n,isFetching:a,isSuccess:o}=P0e({...e&&{status:e}},{skip:!t});sH({onChange:()=>{!t||n||a||!o||r()}})},Uj="notification",yit=()=>{const e=Em(),t=en(A0.selectors.selectNotifications),{user:r}=Lm(),n=`${Uj}#${null==r?void 0:r.id}`,a=en((e=>zWe.selectors.selectLastUpdateFor(e,{subscriptionName:n,mode:"equals"})));g.useEffect((()=>{if(null!=r&&r.id)return e(w8({id:n,topics:[Uj]})),()=>{e(_8(n))}}),[null==r?void 0:r.id]),g.useEffect((()=>{null!=a&&a.data&&(zKe(a)?e($8(a.data)):"LIKE"===(null==a?void 0:a.data.type)&&null!=t&&t.find((e=>{var t,r;return e.activityId===(null==a?void 0:a.data.activityId)&&(null==(t=e.fromUser)?void 0:t.id)===(null==(r=a.data.fromUser)?void 0:r.id)}))||null!=t&&t.find((e=>e.id===a.data.id))||e(C8(a.data)))}),[null==a?void 0:a.data,!1])};export{Pst as CustomToastContainer,xQe as Following,hit as NotificationBody,oYe as cutUserInfo,zKe as isUndoNotification,A0e as notificationsApi,A0 as notificationsSlice,$st as notify,mit as useFetchNotifications,P0e as useGetApiV1NotificationsCountQuery,R0e as useGetApiV1NotificationsQuery,git as useGetNotificationsCount,yit as useNotifications,T0e as usePostApiV1NotificationsByIdMarkMutation,Tst as usePostApiV1NotificationsMarkAllMutation};
|
|
125
|
+
*/!function(){function e(e,t,r){var n=this;void 0===r&&(r={}),this._listeners={error:[],message:[],open:[],close:[]},this._retryCount=-1,this._shouldReconnect=!0,this._connectLock=!1,this._binaryType="blob",this._closeCalled=!1,this._messageQueue=[],this.onclose=null,this.onerror=null,this.onmessage=null,this.onopen=null,this._handleOpen=function(e){n._debug("open event");var t=n._options.minUptime,r=void 0===t?qh.minUptime:t;clearTimeout(n._connectTimeout),n._uptimeTimeout=setTimeout((function(){return n._acceptOpen()}),r),n._ws.binaryType=n._binaryType,n._messageQueue.forEach((function(e){return n._ws.send(e)})),n._messageQueue=[],n.onopen&&n.onopen(e),n._listeners.open.forEach((function(t){return n._callEventListener(e,t)}))},this._handleMessage=function(e){n._debug("message event"),n.onmessage&&n.onmessage(e),n._listeners.message.forEach((function(t){return n._callEventListener(e,t)}))},this._handleError=function(e){n._debug("error event",e.message),n._disconnect(void 0,"TIMEOUT"===e.message?"timeout":void 0),n.onerror&&n.onerror(e),n._debug("exec error listeners"),n._listeners.error.forEach((function(t){return n._callEventListener(e,t)})),n._connect()},this._handleClose=function(e){n._debug("close event"),n._clearTimeouts(),n._shouldReconnect&&n._connect(),n.onclose&&n.onclose(e),n._listeners.close.forEach((function(t){return n._callEventListener(e,t)}))},this._url=e,this._protocols=t,this._options=r,this._options.startClosed&&(this._shouldReconnect=!1),this._connect()}Object.defineProperty(e,"CONNECTING",{get:function(){return 0},enumerable:!0,configurable:!0}),Object.defineProperty(e,"OPEN",{get:function(){return 1},enumerable:!0,configurable:!0}),Object.defineProperty(e,"CLOSING",{get:function(){return 2},enumerable:!0,configurable:!0}),Object.defineProperty(e,"CLOSED",{get:function(){return 3},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"CONNECTING",{get:function(){return e.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"OPEN",{get:function(){return e.OPEN},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"CLOSING",{get:function(){return e.CLOSING},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"CLOSED",{get:function(){return e.CLOSED},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"binaryType",{get:function(){return this._ws?this._ws.binaryType:this._binaryType},set:function(e){this._binaryType=e,this._ws&&(this._ws.binaryType=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"retryCount",{get:function(){return Math.max(this._retryCount,0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bufferedAmount",{get:function(){return this._messageQueue.reduce((function(e,t){return"string"==typeof t?e+=t.length:t instanceof Blob?e+=t.size:e+=t.byteLength,e}),0)+(this._ws?this._ws.bufferedAmount:0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"extensions",{get:function(){return this._ws?this._ws.extensions:""},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"protocol",{get:function(){return this._ws?this._ws.protocol:""},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"readyState",{get:function(){return this._ws?this._ws.readyState:this._options.startClosed?e.CLOSED:e.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this._ws?this._ws.url:""},enumerable:!0,configurable:!0}),e.prototype.close=function(e,t){void 0===e&&(e=1e3),this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),this._ws?this._ws.readyState!==this.CLOSED?this._ws.close(e,t):this._debug("close: already closed"):this._debug("close enqueued: no ws instance")},e.prototype.reconnect=function(e,t){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,this._ws&&this._ws.readyState!==this.CLOSED?(this._disconnect(e,t),this._connect()):this._connect()},e.prototype.send=function(e){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",e),this._ws.send(e);else{var t=this._options.maxEnqueuedMessages,r=void 0===t?qh.maxEnqueuedMessages:t;this._messageQueue.length<r&&(this._debug("enqueue",e),this._messageQueue.push(e))}},e.prototype.addEventListener=function(e,t){this._listeners[e]&&this._listeners[e].push(t)},e.prototype.dispatchEvent=function(e){var t,r,n=this._listeners[e.type];if(n)try{for(var a=MWe(n),o=a.next();!o.done;o=a.next()){var i=o.value;this._callEventListener(e,i)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}return!0},e.prototype.removeEventListener=function(e,t){this._listeners[e]&&(this._listeners[e]=this._listeners[e].filter((function(e){return e!==t})))},e.prototype._debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._options.debug&&console.log.apply(console,NWe(["RWS>"],e))},e.prototype._getNextDelay=function(){var e=this._options,t=e.reconnectionDelayGrowFactor,r=void 0===t?qh.reconnectionDelayGrowFactor:t,n=e.minReconnectionDelay,a=void 0===n?qh.minReconnectionDelay:n,o=e.maxReconnectionDelay,i=void 0===o?qh.maxReconnectionDelay:o,s=0;return this._retryCount>0&&((s=a*Math.pow(r,this._retryCount-1))>i&&(s=i)),this._debug("next delay",s),s},e.prototype._wait=function(){var e=this;return new Promise((function(t){setTimeout(t,e._getNextDelay())}))},e.prototype._getNextUrl=function(e){if("string"==typeof e)return Promise.resolve(e);if("function"==typeof e){var t=e();if("string"==typeof t)return Promise.resolve(t);if(t.then)return t}throw Error("Invalid URL")},e.prototype._connect=function(){var e=this;if(!this._connectLock&&this._shouldReconnect){this._connectLock=!0;var t=this._options,r=t.maxRetries,n=void 0===r?qh.maxRetries:r,a=t.connectionTimeout,o=void 0===a?qh.connectionTimeout:a,i=t.WebSocket,s=void 0===i?LWe():i;if(this._retryCount>=n)return void this._debug("max retries reached",this._retryCount,">=",n);if(this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),!VWe(s))throw Error("No valid WebSocket class provided");this._wait().then((function(){return e._getNextUrl(e._url)})).then((function(t){e._closeCalled||(e._debug("connect",{url:t,protocols:e._protocols}),e._ws=e._protocols?new s(t,e._protocols):new s(t),e._ws.binaryType=e._binaryType,e._connectLock=!1,e._addListeners(),e._connectTimeout=setTimeout((function(){return e._handleTimeout()}),o))}))}},e.prototype._handleTimeout=function(){this._debug("timeout event"),this._handleError(new DWe(Error("TIMEOUT"),this))},e.prototype._disconnect=function(e,t){if(void 0===e&&(e=1e3),this._clearTimeouts(),this._ws){this._removeListeners();try{this._ws.close(e,t),this._handleClose(new jWe(e,t,this))}catch{}}},e.prototype._acceptOpen=function(){this._debug("accept open"),this._retryCount=0},e.prototype._callEventListener=function(e,t){"handleEvent"in t?t.handleEvent(e):t(e)},e.prototype._removeListeners=function(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))},e.prototype._addListeners=function(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))},e.prototype._clearTimeouts=function(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)}}();const BWe=(e="")=>e.startsWith("@")?null==e?void 0:e.replace("@",""):e,FWe=({username:e,canFetch:t=!0,htmlContent:r=!0})=>{const n=BWe(e),{data:a,error:o,isLoading:i}=gWe({username:n,full:!0,htmlContent:r},{skip:!n||!t});return{data:a,error:o,isLoading:i}},Lm=()=>{const e=en(Ql.selectors.selectCurrentUser),t=en(Qi.selectors.selectIsAuthenticated);return{user:e,isLoading:en(Ql.selectors.selectPending),isLogged:t,error:en(Ql.selectors.selectError)}},UWe=({userId:e="",canFetch:t=!0,htmlContent:r=!0})=>{const{data:n,error:a,isLoading:o,isFetching:i}=SWe({userId:e,full:!0,htmlContent:r},{skip:!e||!t});return{data:n,error:a,isLoading:o,isFetching:i}},sH=({onChange:e})=>{const{user:t}=Lm(),r=null==t?void 0:t.id,n=g.useRef(r);g.useEffect((()=>{n.current?r!==n.current&&(e(),n.current=r):n.current=r}),[r,n.current])},YD=["following","followed","blocked","muted","note","blocked_by"],KD=({userId:e,currentUserId:t})=>{const r="string"==typeof e,n=r?[e]:(null==e?void 0:e.filter((e=>e!==t)))||[],a=e===t;return{isSingleUser:r,canFetch:!(!n.length||a||!t),safeTargets:n}},k9=({userId:e,skip:t})=>{const r=en(Ql.selectors.selectCurrentUser),n=null==r?void 0:r.id,{canFetch:a,isSingleUser:o,safeTargets:i}=KD({userId:e,currentUserId:n}),{data:s,isLoading:l}=bWe({targets:i,filter:YD},{skip:!a||t}),[c]=kWe(),u=({userId:e})=>{const{canFetch:t,safeTargets:r}=KD({userId:e,currentUserId:n});t&&c({targets:r,filter:YD})};return sH({onChange:()=>{u({userId:i})}}),{relationship:(o?null==s?void 0:s[e]:s)||{},isLoading:l,updateRelations:u}},GWe=g.forwardRef((({accept:e,children:t,className:r,hasPreview:n,onChange:a,onDelete:o,disabled:i,imgType:s,disableDelete:l,isButtonWrapper:c=!0},u)=>{const f="cover"===s?"changeCover":"changeAvatar",[d,p]=g.useState(!1),h=e=>{a(e),p(!1)};return E.jsx("div",{"data-testid":f,className:he("my-2 flex cursor-pointer items-center gap-2 md:my-0",r),children:n?E.jsxs(Yv,{open:d,onOpenChange:e=>{p(e)},children:[E.jsx(Kv,{children:E.jsx(XD,{disabled:i,isWrapper:c,children:t||`Edit ${s}`})}),E.jsxs(q0,{align:"cover"===s?"end":"start",className:he({"mt-xxxs":"photo"===s}),children:[E.jsx("label",{className:"block w-full items-center",children:E.jsxs(dv,{onSelect:e=>{e.preventDefault()},className:"cursor-pointer",children:[E.jsx(Z8,{size:20})," Upload ",s,E.jsx(vv,{ref:u,accept:e,onChange:h})]})}),E.jsxs(dv,{onClick:()=>{null==o||o()},disabled:l,className:"text-red-dark cursor-pointer",children:[E.jsx(r7,{size:20}),"Remove ",s]})]})]}):E.jsxs(XD,{isLabel:!0,disabled:i,isWrapper:c,children:[t||`Add ${s}`,E.jsx(vv,{ref:u,accept:e,onChange:h})]})})})),XD=({children:e,disabled:t,isLabel:r,isWrapper:n})=>{if(!n)return E.jsx("label",{children:e});const a={variant:"secondary",size:"s",...t?{disabled:!0}:{as:r?"label":"button"}};return E.jsx(Gn,{...a,className:"cursor-pointer",children:e})};function qWe(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function WWe(e){return"nodeType"in e}function HWe(e){var t,r;return e?qWe(e)?e:WWe(e)&&null!=(t=null==(r=e.ownerDocument)?void 0:r.defaultView)?t:window:window}var ZD;GWe.displayName="ChangeImgButton",function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"}(ZD||(ZD={}));const QWe=Object.freeze({x:0,y:0});function YWe(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function KWe(e,t,r){const n=YWe(t);if(!n)return e;const{scaleX:a,scaleY:o,x:i,y:s}=n,l=e.left-i-(1-a)*parseFloat(r),c=e.top-s-(1-o)*parseFloat(r.slice(r.indexOf(" ")+1)),u=a?e.width/a:e.width,f=o?e.height/o:e.height;return{width:u,height:f,top:c,right:l+u,bottom:c+f,left:l}}const XWe={ignoreTransform:!1};function iH(e,t){void 0===t&&(t=XWe);let r=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:n}=HWe(e).getComputedStyle(e);t&&(r=KWe(r,t,n))}const{top:n,left:a,width:o,height:i,bottom:s,right:l}=r;return{top:n,left:a,width:o,height:i,bottom:s,right:l}}function JD(e){return iH(e,{ignoreTransform:!0})}var p0,ej,Ui,tj,nj,rj,rA,aA,aj;!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(p0||(p0={})),function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(ej||(ej={})),function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"}(Ui||(Ui={})),Ui.Space,Ui.Enter,Ui.Esc,Ui.Space,Ui.Enter,Ui.Tab,function(e){e[e.RightClick=2]="RightClick"}(tj||(tj={})),function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(nj||(nj={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(rj||(rj={})),p0.Backward,p0.Forward,p0.Backward,p0.Forward,function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(rA||(rA={})),(aA||(aA={})).Optimized="optimized",rA.WhileDragging,aA.Optimized,function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(aj||(aj={})),Ui.Down,Ui.Right,Ui.Up,Ui.Left,N0("user");var oj,Kw={exports:{}},ZWe=Kw.exports;function JWe(){return oj||(oj=1,Kw.exports=function(e,t,r){t.prototype.isToday=function(){var e="YYYY-MM-DD",t=r();return this.format(e)===t.format(e)}}),Kw.exports}var eHe=JWe();const cH=Qc(eHe);function Q_(e){return(Q_="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 Sm(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function ss(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function ru(e){ss(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===Q_(e)&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):(("string"==typeof e||"[object String]"===t)&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function tHe(e,t){ss(2,arguments);var r=ru(e).getTime(),n=Sm(t);return new Date(r+n)}pG.extend(cH);var nHe={};function xk(){return nHe}function rHe(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function aHe(e){return ss(1,arguments),e instanceof Date||"object"===Q_(e)&&"[object Date]"===Object.prototype.toString.call(e)}function oHe(e){if(ss(1,arguments),!aHe(e)&&"number"!=typeof e)return!1;var t=ru(e);return!isNaN(Number(t))}function sHe(e,t){return ss(2,arguments),tHe(e,-Sm(t))}var iHe=864e5;function cHe(e){ss(1,arguments);var t=ru(e),r=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var n=r-t.getTime();return Math.floor(n/iHe)+1}function Y_(e){ss(1,arguments);var t=ru(e),r=t.getUTCDay(),n=(r<1?7:0)+r-1;return t.setUTCDate(t.getUTCDate()-n),t.setUTCHours(0,0,0,0),t}function lH(e){ss(1,arguments);var t=ru(e),r=t.getUTCFullYear(),n=new Date(0);n.setUTCFullYear(r+1,0,4),n.setUTCHours(0,0,0,0);var a=Y_(n),o=new Date(0);o.setUTCFullYear(r,0,4),o.setUTCHours(0,0,0,0);var i=Y_(o);return t.getTime()>=a.getTime()?r+1:t.getTime()>=i.getTime()?r:r-1}function lHe(e){ss(1,arguments);var t=lH(e),r=new Date(0);return r.setUTCFullYear(t,0,4),r.setUTCHours(0,0,0,0),Y_(r)}var uHe=6048e5;function fHe(e){ss(1,arguments);var t=ru(e),r=Y_(t).getTime()-lHe(t).getTime();return Math.round(r/uHe)+1}function K_(e,t){var r,n,a,o,i,s,l,c;ss(1,arguments);var u=xk(),f=Sm(null!==(r=null!==(n=null!==(a=null!==(o=null==t?void 0:t.weekStartsOn)&&void 0!==o?o:null==t||null===(i=t.locale)||void 0===i||null===(s=i.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==a?a:u.weekStartsOn)&&void 0!==n?n:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==r?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=ru(e),p=d.getUTCDay(),h=(p<f?7:0)+p-f;return d.setUTCDate(d.getUTCDate()-h),d.setUTCHours(0,0,0,0),d}function uH(e,t){var r,n,a,o,i,s,l,c;ss(1,arguments);var u=ru(e),f=u.getUTCFullYear(),d=xk(),p=Sm(null!==(r=null!==(n=null!==(a=null!==(o=null==t?void 0:t.firstWeekContainsDate)&&void 0!==o?o:null==t||null===(i=t.locale)||void 0===i||null===(s=i.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==a?a:d.firstWeekContainsDate)&&void 0!==n?n:null===(l=d.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==r?r:1);if(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var h=new Date(0);h.setUTCFullYear(f+1,0,p),h.setUTCHours(0,0,0,0);var g=K_(h,t),m=new Date(0);m.setUTCFullYear(f,0,p),m.setUTCHours(0,0,0,0);var y=K_(m,t);return u.getTime()>=g.getTime()?f+1:u.getTime()>=y.getTime()?f:f-1}function dHe(e,t){var r,n,a,o,i,s,l,c;ss(1,arguments);var u=xk(),f=Sm(null!==(r=null!==(n=null!==(a=null!==(o=null==t?void 0:t.firstWeekContainsDate)&&void 0!==o?o:null==t||null===(i=t.locale)||void 0===i||null===(s=i.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==a?a:u.firstWeekContainsDate)&&void 0!==n?n:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==r?r:1),d=uH(e,t),p=new Date(0);return p.setUTCFullYear(d,0,f),p.setUTCHours(0,0,0,0),K_(p,t)}var pHe=6048e5;function hHe(e,t){ss(1,arguments);var r=ru(e),n=K_(r,t).getTime()-dHe(r,t).getTime();return Math.round(n/pHe)+1}function Ln(e,t){for(var r=e<0?"-":"",n=Math.abs(e).toString();n.length<t;)n="0"+n;return r+n}var rp={y:function(e,t){var r=e.getUTCFullYear(),n=r>0?r:1-r;return Ln("yy"===t?n%100:n,t.length)},M:function(e,t){var r=e.getUTCMonth();return"M"===t?String(r+1):Ln(r+1,2)},d:function(e,t){return Ln(e.getUTCDate(),t.length)},a:function(e,t){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];default:return"am"===r?"a.m.":"p.m."}},h:function(e,t){return Ln(e.getUTCHours()%12||12,t.length)},H:function(e,t){return Ln(e.getUTCHours(),t.length)},m:function(e,t){return Ln(e.getUTCMinutes(),t.length)},s:function(e,t){return Ln(e.getUTCSeconds(),t.length)},S:function(e,t){var r=t.length,n=e.getUTCMilliseconds();return Ln(Math.floor(n*Math.pow(10,r-3)),t.length)}},i0={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},mHe={G:function(e,t,r){var n=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if("yo"===t){var n=e.getUTCFullYear(),a=n>0?n:1-n;return r.ordinalNumber(a,{unit:"year"})}return rp.y(e,t)},Y:function(e,t,r,n){var a=uH(e,n),o=a>0?a:1-a;return"YY"===t?Ln(o%100,2):"Yo"===t?r.ordinalNumber(o,{unit:"year"}):Ln(o,t.length)},R:function(e,t){return Ln(lH(e),t.length)},u:function(e,t){return Ln(e.getUTCFullYear(),t.length)},Q:function(e,t,r){var n=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return Ln(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){var n=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return Ln(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){var n=e.getUTCMonth();switch(t){case"M":case"MM":return rp.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){var n=e.getUTCMonth();switch(t){case"L":return String(n+1);case"LL":return Ln(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){var a=hHe(e,n);return"wo"===t?r.ordinalNumber(a,{unit:"week"}):Ln(a,t.length)},I:function(e,t,r){var n=fHe(e);return"Io"===t?r.ordinalNumber(n,{unit:"week"}):Ln(n,t.length)},d:function(e,t,r){return"do"===t?r.ordinalNumber(e.getUTCDate(),{unit:"date"}):rp.d(e,t)},D:function(e,t,r){var n=cHe(e);return"Do"===t?r.ordinalNumber(n,{unit:"dayOfYear"}):Ln(n,t.length)},E:function(e,t,r){var n=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){var a=e.getUTCDay(),o=(a-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return Ln(o,2);case"eo":return r.ordinalNumber(o,{unit:"day"});case"eee":return r.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(a,{width:"short",context:"formatting"});default:return r.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){var a=e.getUTCDay(),o=(a-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return Ln(o,t.length);case"co":return r.ordinalNumber(o,{unit:"day"});case"ccc":return r.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(a,{width:"narrow",context:"standalone"});case"cccccc":return r.day(a,{width:"short",context:"standalone"});default:return r.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,r){var n=e.getUTCDay(),a=0===n?7:n;switch(t){case"i":return String(a);case"ii":return Ln(a,t.length);case"io":return r.ordinalNumber(a,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,r){var n,a=e.getUTCHours();switch(n=12===a?i0.noon:0===a?i0.midnight:a/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(e,t,r){var n,a=e.getUTCHours();switch(n=a>=17?i0.evening:a>=12?i0.afternoon:a>=4?i0.morning:i0.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(e,t,r){if("ho"===t){var n=e.getUTCHours()%12;return 0===n&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return rp.h(e,t)},H:function(e,t,r){return"Ho"===t?r.ordinalNumber(e.getUTCHours(),{unit:"hour"}):rp.H(e,t)},K:function(e,t,r){var n=e.getUTCHours()%12;return"Ko"===t?r.ordinalNumber(n,{unit:"hour"}):Ln(n,t.length)},k:function(e,t,r){var n=e.getUTCHours();return 0===n&&(n=24),"ko"===t?r.ordinalNumber(n,{unit:"hour"}):Ln(n,t.length)},m:function(e,t,r){return"mo"===t?r.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):rp.m(e,t)},s:function(e,t,r){return"so"===t?r.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):rp.s(e,t)},S:function(e,t){return rp.S(e,t)},X:function(e,t,r,n){var a=(n._originalDate||e).getTimezoneOffset();if(0===a)return"Z";switch(t){case"X":return ij(a);case"XXXX":case"XX":return Xh(a);default:return Xh(a,":")}},x:function(e,t,r,n){var a=(n._originalDate||e).getTimezoneOffset();switch(t){case"x":return ij(a);case"xxxx":case"xx":return Xh(a);default:return Xh(a,":")}},O:function(e,t,r,n){var a=(n._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+sj(a,":");default:return"GMT"+Xh(a,":")}},z:function(e,t,r,n){var a=(n._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+sj(a,":");default:return"GMT"+Xh(a,":")}},t:function(e,t,r,n){var a=n._originalDate||e;return Ln(Math.floor(a.getTime()/1e3),t.length)},T:function(e,t,r,n){return Ln((n._originalDate||e).getTime(),t.length)}};function sj(e,t){var r=e>0?"-":"+",n=Math.abs(e),a=Math.floor(n/60),o=n%60;if(0===o)return r+String(a);var i=t;return r+String(a)+i+Ln(o,2)}function ij(e,t){return e%60==0?(e>0?"-":"+")+Ln(Math.abs(e)/60,2):Xh(e,t)}function Xh(e,t){var r=t||"",n=e>0?"-":"+",a=Math.abs(e);return n+Ln(Math.floor(a/60),2)+r+Ln(a%60,2)}var cj=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},fH=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},gHe=function(e,t){var r,n=e.match(/(P+)(p+)?/)||[],a=n[1],o=n[2];if(!o)return cj(e,t);switch(a){case"P":r=t.dateTime({width:"short"});break;case"PP":r=t.dateTime({width:"medium"});break;case"PPP":r=t.dateTime({width:"long"});break;default:r=t.dateTime({width:"full"})}return r.replace("{{date}}",cj(a,t)).replace("{{time}}",fH(o,t))},yHe={p:fH,P:gHe},vHe=["D","DD"],bHe=["YY","YYYY"];function wHe(e){return-1!==vHe.indexOf(e)}function _He(e){return-1!==bHe.indexOf(e)}function lj(e,t,r){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var kHe={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},xHe=function(e,t,r){var n,a=kHe[e];return n="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",t.toString()),null!=r&&r.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function pC(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}var SHe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},EHe={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},CHe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},IHe={date:pC({formats:SHe,defaultWidth:"full"}),time:pC({formats:EHe,defaultWidth:"full"}),dateTime:pC({formats:CHe,defaultWidth:"full"})},AHe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},RHe=function(e,t,r,n){return AHe[e]};function hy(e){return function(t,r){var n;if("formatting"===(null!=r&&r.context?String(r.context):"standalone")&&e.formattingValues){var a=e.defaultFormattingWidth||e.defaultWidth,o=null!=r&&r.width?String(r.width):a;n=e.formattingValues[o]||e.formattingValues[a]}else{var i=e.defaultWidth,s=null!=r&&r.width?String(r.width):e.defaultWidth;n=e.values[s]||e.values[i]}return n[e.argumentCallback?e.argumentCallback(t):t]}}var THe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},PHe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},$He={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},zHe={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},MHe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},OHe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},NHe=function(e,t){var r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},DHe={ordinalNumber:NHe,era:hy({values:THe,defaultWidth:"wide"}),quarter:hy({values:PHe,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:hy({values:$He,defaultWidth:"wide"}),day:hy({values:zHe,defaultWidth:"wide"}),dayPeriod:hy({values:MHe,defaultWidth:"wide",formattingValues:OHe,defaultFormattingWidth:"wide"})};function my(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.width,a=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],o=t.match(a);if(!o)return null;var i,s=o[0],l=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?LHe(l,(function(e){return e.test(s)})):jHe(l,(function(e){return e.test(s)}));return i=e.valueCallback?e.valueCallback(c):c,{value:i=r.valueCallback?r.valueCallback(i):i,rest:t.slice(s.length)}}}function jHe(e,t){for(var r in e)if(e.hasOwnProperty(r)&&t(e[r]))return r}function LHe(e,t){for(var r=0;r<e.length;r++)if(t(e[r]))return r}function VHe(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.match(e.matchPattern);if(!n)return null;var a=n[0],o=t.match(e.parsePattern);if(!o)return null;var i=e.valueCallback?e.valueCallback(o[0]):o[0];return{value:i=r.valueCallback?r.valueCallback(i):i,rest:t.slice(a.length)}}}var BHe=/^(\d+)(th|st|nd|rd)?/i,FHe=/\d+/i,UHe={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},GHe={any:[/^b/i,/^(a|c)/i]},qHe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},WHe={any:[/1/i,/2/i,/3/i,/4/i]},HHe={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},QHe={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},YHe={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},KHe={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},XHe={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},ZHe={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},JHe={ordinalNumber:VHe({matchPattern:BHe,parsePattern:FHe,valueCallback:function(e){return parseInt(e,10)}}),era:my({matchPatterns:UHe,defaultMatchWidth:"wide",parsePatterns:GHe,defaultParseWidth:"any"}),quarter:my({matchPatterns:qHe,defaultMatchWidth:"wide",parsePatterns:WHe,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:my({matchPatterns:HHe,defaultMatchWidth:"wide",parsePatterns:QHe,defaultParseWidth:"any"}),day:my({matchPatterns:YHe,defaultMatchWidth:"wide",parsePatterns:KHe,defaultParseWidth:"any"}),dayPeriod:my({matchPatterns:XHe,defaultMatchWidth:"any",parsePatterns:ZHe,defaultParseWidth:"any"})},eQe={code:"en-US",formatDistance:xHe,formatLong:IHe,formatRelative:RHe,localize:DHe,match:JHe,options:{weekStartsOn:0,firstWeekContainsDate:1}},tQe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,nQe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,rQe=/^'([^]*?)'?$/,aQe=/''/g,oQe=/[a-zA-Z]/;function Wh(e,t,r){var n,a,o,i,s,l,c,u,f,d,p;ss(2,arguments);var h=String(t),g=xk(),m=null!==(n=g.locale)&&void 0!==n?n:eQe,y=Sm(null!==(a=null!==(o=null!==(i=void 0)&&void 0!==i?i:g.firstWeekContainsDate)&&void 0!==o?o:null===(s=g.locale)||void 0===s||null===(l=s.options)||void 0===l?void 0:l.firstWeekContainsDate)&&void 0!==a?a:1);if(!(y>=1&&y<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var v=Sm(null!==(c=null!==(u=null!==(f=void 0)&&void 0!==f?f:g.weekStartsOn)&&void 0!==u?u:null===(d=g.locale)||void 0===d||null===(p=d.options)||void 0===p?void 0:p.weekStartsOn)&&void 0!==c?c:0);if(!(v>=0&&v<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!m.localize)throw new RangeError("locale must contain localize property");if(!m.formatLong)throw new RangeError("locale must contain formatLong property");var b=ru(e);if(!oHe(b))throw new RangeError("Invalid time value");var w=sHe(b,rHe(b)),_={firstWeekContainsDate:y,weekStartsOn:v,locale:m,_originalDate:b};return h.match(nQe).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,yHe[t])(e,m.formatLong):e})).join("").match(tQe).map((function(r){if("''"===r)return"'";var n=r[0];if("'"===n)return sQe(r);var a=mHe[n];if(a)return _He(r)&&lj(r,t,String(e)),wHe(r)&&lj(r,t,String(e)),a(w,r,m.localize,_);if(n.match(oQe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+n+"`");return r})).join("")}function sQe(e){var t=e.match(rQe);return t?t[1].replace(aQe,"'"):e}const iQe=(e,t,r)=>{if("single"===e)return t?Wh(t,"PPP"):r;if("range"===e){const e=t;return null!=e&&e.from?e.to?`${Wh(e.from,"MMM dd")} - ${Wh(e.to,"MMM dd, yyyy")}`:Wh(e.from,"PPP"):r}if("multiple"===e){const e=t;return e&&0!==e.length?1===e.length?Wh(e[0],"PPP"):2===e.length?`${Wh(e[0],"MMM dd")}, ${Wh(e[1],"MMM dd")}`:`${e.length} dates selected`:r}return r},cQe=g.forwardRef((({value:e,placeholder:t,className:r,icon:n,...a},o)=>{const i=iQe(e?Array.isArray(e)?"multiple":"object"==typeof e&&"from"in e?"range":"single":"single",e,t);return E.jsxs(Gn,{ref:o,variant:"secondary",className:he("rounded-m py-l w-[280px] justify-between border border-gray-200 bg-white text-left font-normal text-gray-900",r),...a,children:[E.jsxs("span",{className:"gap-xxs flex items-center",children:[n||E.jsx(zX,{size:16}),i]}),E.jsx(i2,{size:16,className:"ml-xxs"})]})}));cQe.displayName="DatePickerTrigger",pG.extend(cH);const lQe=(e,t,r)=>{let n=e;for(let e=0;e<t.length-1;e++){const r=t[e];r in n||(n[r]={}),n=n[r]}n[t[t.length-1]]=r},uQe=e=>{if(!e)return;const t={};for(const r in e){const n=r.split("."),a=e[r];void 0!==a&&lQe(t,n,a)}return t},fQe=["user.follow","user.privacy","user.translation","user.discoverFeed","user.notifications.prefs","user.notifications.policy"],dQe=()=>{const{data:e,...t}=EFe({keys:fQe});return{settings:uQe(e),flatSettings:e,...t}},dH=()=>{var e,t;const r=en(Dc.selectors.selectSettings),{settings:n,isLoading:a}=dQe(),{preferredLanguage:o,excludedLanguages:i}=(null==(e=null==n?void 0:n.user)?void 0:e.translation)||{},s=(null==(t=null==r?void 0:r[S_.translation])?void 0:t.enabled)||!1,l=!a&&!!n,c=g.useCallback((e=>{if(!s||!l)return!1;const t=[...i||[],o].map((e=>null==e?void 0:e.toLowerCase()));return!!e&&!t.includes(e.toLowerCase())}),[s,l,o,i]);return{isEnabled:s,isSettingsReady:l,preferredLanguage:o,checkIfTranslatable:c}},pQe="DELETE";Ke.object({value:Ke.string().refine((e=>e.trim()===pQe),{message:"Value is not correct"})});const hQe={view:"default",transitView:null,isProfileFormDirty:!1};ur({name:"manageUsers",initialState:hQe,reducers:{changeView:(e,{payload:t})=>{e.isProfileFormDirty?e.transitView=t:(e.view=t,e.transitView=null)},resetTransitView:e=>{e.transitView=null},changeProfileFormDirty:(e,{payload:t})=>{e.isProfileFormDirty=t}},selectors:{selectView:e=>e.view,selectTransitView:e=>e.transitView,selectIsProfileFormDirty:e=>e.isProfileFormDirty}}).injectInto(Tp);const hb=e=>{const t=en(Ql.selectors.selectCurrentUser),r=en(Qi.selectors.selectIsAuthenticated),n="SUSPENDED"===(null==t?void 0:t.state),a=n;return{isDisabled:a,guardedAction:(e=()=>{})=>()=>{r?r&&!n&&e():WUe()},ActionTooltipWrapper:({children:e,triggerClassname:r})=>a?E.jsx(vm,{theme:"dark",tooltipText:`${ho(t)} is suspended`,size:"default",triggerClassname:r,children:E.jsx("div",{className:"!pointer-events-auto w-full",children:e})}):E.jsx(E.Fragment,{children:e})}},x9=e=>{const t=en(Ql.selectors.selectCurrentUser);return(null==t?void 0:t.id)===e},pH=32,uj=({user:e,avatarSize:t})=>{var r;const n=(null==(r=OI({size:t||32,upload:e.avatar}))?void 0:r.uri)||"";return E.jsx(zp,{size:t,name:e.displayName,imgUrl:n})},mQe=({users:e,className:t,avatarSize:r=32,borderWidth:n=4,isUserPreviewLink:a=!0})=>{const o=r+2*n;return E.jsx("div",{className:he("relative flex items-center",t),style:{left:-n,height:o,width:e.length*(r-n)+n},children:null==e?void 0:e.map(((e,t)=>E.jsx("div",{"data-testid":"user-avatar",className:"absolute rounded-full border-white",style:{borderWidth:n,width:o,height:o,top:0*t,left:t*(r-n),zIndex:t+1},children:a?E.jsx(Wi,{to:"/:username",props:{username:ho(e)},children:E.jsx(uj,{user:e,avatarSize:r})}):E.jsx(uj,{user:e,avatarSize:r})},e.id)))})},gQe=e=>!(null!=e&&e.following)||"REJECTED"===(null==e?void 0:e.following),fj=e=>"ACCEPTED"===(null==e?void 0:e.following),yQe=e=>gQe(e)&&"ACCEPTED"===(null==e?void 0:e.followed),vQe=e=>"PENDING"===(null==e?void 0:e.following),bQe=e=>!(null==e||!e.blocked),wQe=e=>{var t;return!(null==(t=null==e?void 0:e.muted)||!t.state)},_Qe=e=>"ACCEPTED"===(null==e?void 0:e.followed),hH=({user:e,onFollow:t,onUnfollow:r,unsubscribe:n})=>{const[a,o]=g.useState(!1),i=en(Qi.selectors.selectIsAuthenticated),[s]=AWe(),[l]=RWe(),c=null==e?void 0:e.domain,u={user:e,username:ho(e),...c&&{domain:c}};return{follow:async()=>{i?await s(u):o(!0),null==t||t()},unfollow:async()=>{await l({mutual:n,...u}),null==r||r()},renderGuestFollowModal:()=>a?E.jsx(pWe,{user:e,open:a,onCloseModal:()=>o(!1)}):null}},kQe=({delay:e=0,defaultHover:t=!1,dependProps:r=[],leaveDelay:n=0}={})=>{const a=g.useRef(null),[o,i]=g.useState(t),s=g.useRef(null),l=g.useRef(null),c=()=>{s.current&&clearTimeout(s.current),s.current=setTimeout((()=>{i(!0)}),e),l.current&&clearTimeout(l.current)},u=()=>{l.current&&clearTimeout(l.current),l.current=setTimeout((()=>{i(!1)}),n),s.current&&clearTimeout(s.current)};return g.useEffect((()=>()=>{s.current&&clearTimeout(s.current),l.current&&clearTimeout(l.current)}),[]),g.useEffect((()=>{const e=a.current;if(e)return e.addEventListener("mouseenter",c),e.addEventListener("mouseleave",u),()=>{e.removeEventListener("mouseenter",c),e.removeEventListener("mouseleave",u)}}),[a.current,...r]),[a,o,i]},S9=({user:e,relationship:t})=>{const[r,{isLoading:n}]=uX(),[a]=lX(),[o,i,s]=l9(),l=bQe(t);return[l,i,async()=>{try{await a({userId:e.id}).unwrap(),Lt.success(`${e.username} is unblocked`)}catch(e){Lt.error(`${wr(e)}`)}},()=>E.jsx(Jq,{open:o,title:`Do you want to block ${e.username}?`,onClose:s,"data-testid":"block-dialog",leftButton:{title:"Cancel",isLoading:!1,variant:"secondary",onClick:s},rightButton:{title:"Block",variant:"red_primary",isLoading:n,onClick:()=>{(async()=>{try{await r({userId:e.id}).unwrap(),Lt.success(`${e.username} is blocked`),s()}catch(e){Lt.error(`${wr(e)}`)}})()}},children:"Blocked users will not be able to follow you or see your content, and you will not see any content from them. They will also be aware that they have been blocked."}),o]},mH=({size:e,user:t,follow:r,unfollow:n,disabled:a,relationship:o,isRelationshipPending:i,className:s,followButtonText:l,unfollowButtonText:c})=>{const[u,,f]=S9({user:t,relationship:o}),d=yQe(o)?"Follow back":l||"Follow",p=c||"Unfollow",h=vQe(o),g=fj(o),[m,y]=kQe(),v=h&&!y||g;if(!i)return E.jsx(Gn,{ref:m,"data-testid":"followBtn",onClick:u?f:g||h?n:r,size:e,className:he("rounded-m px-xs w-[100%] min-w-[130px] md:max-w-[300px] lg:max-w-full",!fj&&"bg-gray-700",s),variant:u?"secondary_danger":v?"secondary":"primary",disabled:a,children:u?"Unblock":h?y?"Cancel follow request":"Follow Pending":g?p:d})},gH=({user:e,size:t="m",disabled:r,className:n,relationship:a,isRelationshipPending:o,onFollow:i,onUnfollow:s,followButtonText:l,unfollowButtonText:c})=>{const{follow:u,unfollow:f,renderGuestFollowModal:d}=hH({user:e,onFollow:i,onUnfollow:s}),p=x9(e.id),{isDisabled:h,ActionTooltipWrapper:g}=hb();return p||o?null:E.jsxs("div",{"data-testid":"followControl",children:[d(),E.jsx(g,{triggerClassname:he("l"===t&&"w-full"),children:E.jsx(mH,{user:e,size:t,disabled:r,className:n,follow:()=>{u()},unfollow:()=>{f()},disabled:h,relationship:a,isRelationshipPending:!1,followButtonText:l,unfollowButtonText:c})})]})},E9=e=>{var t;const r="REPOST"===e.type&&(null==(t=e.post)?void 0:t.text),n="COMMENT"===e.type,a="LIKE"===e.type,o="FOLLOW_REQUEST"===e.type,i="UNREAD"===e.status,s="FOLLOW"===e.type,l=s||o;return{isLike:a,isQuote:r,isReply:n,isUnread:i,isFollow:s,isEventRelated:"EVENT_INVITE"===e.type||"EVENT_JOIN"===e.type||"EVENT_CANCEL"===e.type||"EVENT_UPDATE"===e.type,isFollowRequest:o,isFollowingRelated:l}},xQe=({isPopup:e,notification:t})=>{var r,n;const a=Em(),[o]=mX(),[i]=gX(),s=t.fromUser,{relationship:l,isLoading:c}=k9({userId:null==s?void 0:s.id}),{isFollow:u,isFollowRequest:f}=E9(t),d=!(!s||!u),p=!(!s||!f),h=s?ho(s):"",g=t.followResponse||(null==(n=null==(r=t.meta)?void 0:r.actionsTaken)?void 0:n[0].text);return E.jsxs(E.Fragment,{children:[d&&s&&E.jsx(gH,{size:"s",user:s,relationship:l,isRelationshipPending:c}),g?E.jsx("div",{className:he("text-s min-h-xl inline-flex min-w-[120px] items-center font-medium text-gray-500",!e&&"justify-end"),children:g.toUpperCase()}):p?E.jsxs("div",{className:"flex items-center gap-2","data-testid":"followControls",children:[E.jsx(Gn,{size:"s",variant:"secondary",className:"min-w-[100px] px-3",onClick:()=>{s&&(i({username:h,user:s}),a(A0.actions.updateNotification({...t,followResponse:"Rejected"})))},children:"Reject"}),E.jsx(Gn,{size:"s",variant:"primary",className:he("min-w-[100px]",e&&"order-first"),onClick:()=>{s&&(o({username:h,user:s}),a(A0.actions.updateNotification({...t,followResponse:"Accepted"})))},children:"Accept"})]}):null]})},SQe=e=>{const{user:t,isLoading:r}=Lm(),{data:n,isLoading:a,error:o}=FWe(e),i="userId"in e,{data:s,isLoading:l}=UWe({userId:i?e.userId:"",htmlContent:e.htmlContent??!1,canFetch:!!i&&(e.canFetch??!0)});return[i&&s||n,"username"in e&&`@${null==t?void 0:t.username}`===e.username||i&&(null==t?void 0:t.id)===e.userId,r||a||i&&l,!!o]},yH={forever:0,"6h":21600,"12h":43200,"24h":86400,"7 days":604800,"30 days":2592e3},EQe=({selected:e,onSelect:t})=>Object.keys(yH).map((r=>E.jsxs("span",{className:he("p-xxs gap-xxxs flex cursor-pointer rounded-full border border-gray-400 bg-transparent text-sm",{"border-gray-100 bg-gray-100":e===r}),onClick:()=>t(r),children:[e===r&&E.jsx(s2,{size:16}),"forever"===r?"Until I unmute":`For ${r}`]},r))),vH=({user:e,relationship:t,onMute:r,onUnmute:n})=>{const[a,{isLoading:o}]=yWe(),[i,{isLoading:s}]=vWe(),[l,c]=g.useState("forever"),u=e?ho(e):"",[f,d,p]=l9(),h=wQe(t);return{isLoading:o||s,isMuted:h,mute:d,unmute:()=>{e&&(i({userId:e.id}),Lt.success(`${u} is unmuted`,{customIcon:E.jsx(PX,{color:"white"})}),null==n||n())},renderMuteDialog:()=>e?E.jsxs(e1,{open:f,onCloseModal:p,title:`Do you want to mute ${e.username}?`,className:"p-none","data-testid":"mute-dialog",children:[E.jsx("span",{className:"text-sm text-gray-500",children:"Muted users can still follow you and see your content, but you will not see any content from them. They will not know that they have been muted."}),E.jsx("div",{className:"gap-xxxs mt-m flex",children:E.jsx(EQe,{selected:l,onSelect:c})}),E.jsx(qC,{variant:"primary",onClick:()=>{(()=>{if(!e)return;const t=yH[l];a({userId:e.id,...t&&{duration:t}}),Lt.success(`${u} is muted`,{customIcon:E.jsx(CA,{color:"white"})}),p(),null==r||r()})()},isLoading:o,className:"mt-m ml-auto block","data-testid":"submitAction",children:"Mute"})]}):null,isMuteDialogOpened:f}},CQe=e=>e.replace(/(<)/g,"<").replace(/>/g,">"),IQe="data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M12%209V0L0%2012H9C10.6569%2012%2012%2010.6569%2012%209Z'%20fill='white'/%3e%3cpath%20d='M0%203V12L12%200H3C1.34315%200%200%201.34315%200%203Z'%20fill='%23CBD5E1'/%3e%3c/svg%3e",oA=52,AQe=e=>{const[t,r]=g.useState((null==e?void 0:e.length)||0),n=g.useRef(null),a=g.useRef(null);return{inputRef:n,textareaRef:a,charCount:t,setCharCount:r,handleKeyDown:e=>{var t,r;e.key===Hq&&(e.preventDefault(),null==(t=n.current)||t.blur(),null==(r=a.current)||r.blur())},handleTextareaChange:e=>{const t=e.target,n=t.value.length;r(n);const a=RQe(t);setTimeout((()=>{if(t.style.height="52px",!a)return;const e=Math.max(t.scrollHeight,52);t.style.height=`${e}px`}),0)}}},RQe=e=>{if(e instanceof HTMLTextAreaElement){const t=document.createElement("canvas").getContext("2d"),r=window.getComputedStyle(e);if(t){t.font=r.font||"16px sans-serif";const n=parseInt(r.paddingLeft||"0")||0,a=parseInt(r.paddingRight||"0")||0,o=e.clientWidth-n-a;return t.measureText(e.value).width>o}return e.scrollHeight>52}{const t=e.value.includes("\n"),r=e.scrollWidth>e.clientWidth;return t||r}},dj=52,Py=200,TQe=10,PQe=Ke.object({note:Ke.string().max(Py)}),$Qe=({userId:e,note:t="",className:r,resizable:n=!1})=>{const[a]=wWe(),[o]=_We(),i=en(Qi.selectors.selectIsAuthenticated),s=en(Ql.selectors.selectCurrentUser),l=(null==s?void 0:s.id)===e,c=e=>{const t=e.target.value;u(t)},u=async(t="")=>{t?await a({noteUpdate:{userId:e,text:t}}):await o({userId:e})},f=WR({resolver:pW(PQe)}),{inputRef:d,textareaRef:p,charCount:h,setCharCount:g,handleTextareaChange:m,handleKeyDown:y}=AQe(t);if(!l&&i)return E.jsx(bF,{...f,children:E.jsxs("form",{className:he("my-5",r),onKeyDown:y,children:[h>=190&&E.jsxs("div",{className:"mb-xxs text-right text-sm text-gray-400",children:[Py-h," characters left"]}),E.jsx(_F,{control:f.control,name:"note",render:e=>E.jsxs("div",{className:"rounded-m relative flex items-center bg-gray-100 text-gray-700",children:[n?E.jsx("textarea",{...e,ref:p,maxLength:Py,onBlur:c,onChange:m,defaultValue:t,placeholder:"Leave a note (visible only to you)",className:"scrollbar-hide p-s w-full resize-none border-0 bg-transparent text-base leading-5 outline-none [-ms-overflow-style:none] [scrollbar-width:none] focus:border-0 focus-visible:border-0 focus-visible:ring-0 focus-visible:ring-offset-0 disabled:opacity-[1] [&::-webkit-scrollbar]:hidden",style:{height:"52px"}}):E.jsx("input",{...e,ref:d,maxLength:Py,onBlur:c,onChange:e=>{g(e.target.value.length)},defaultValue:t,placeholder:"Leave a note visible only to you",className:"p-s w-full border-0 bg-transparent focus-visible:outline-none disabled:opacity-[1]",style:{height:"52px"}}),E.jsx("img",{src:IQe,alt:"user note",className:"absolute bottom-0 right-0"})]})})]})})},pj=({status:e,iconOnly:t=!1,clasName:r})=>{const n="muted"===e?E.jsx(CA,{size:16}):E.jsx(a7,{size:16}),a="muted"===e?"text-brown outline-brown":"text-red-dark outline-red-dark";return E.jsxs("div",{className:he(a,"flex items-center gap-1 rounded-sm bg-white px-2 py-1 text-sm font-semibold outline",t&&"p-1",r),children:[n,!t&&da.capitalize(e)]})},zQe=({children:e})=>E.jsx("span",{className:"line-clamp-2 block text-ellipsis whitespace-pre-wrap break-words text-left",children:e}),bH=({user:e,status:t,skip:r=!1})=>{const n=en(Ql.selectors.selectCurrentUser),a=en(Qi.selectors.selectIsAuthenticated),o=!r&&a,[i,s]=g.useState(!1),l=e&&!e.local&&e.domain?`@${e.username}@${e.domain}`:void 0,c=(null==e?void 0:e.id)||(null==n?void 0:n.id),u=!(t||!c||!o),f=!(!t||!a||u||!o||l),{data:d,isLoading:p,error:h}=PWe({userNameFull:l},{skip:!l||i}),{data:m,isLoading:y,error:v}=xWe({status:t},{skip:u||!f||i}),{data:b,isLoading:w,error:_}=EWe({userId:c},{skip:f||!u||i}),k=(u?[...b||[],...d||[]]:null)||m,x=y||w||p;return g.useEffect((()=>{(Hy(v)||Hy(_)||Hy(h))&&s(!0)}),[v,_,h]),[k,x,i]},Hl={first:"first",second:"second"},MQe=({user:e,showEmpty:t=!0,className:r,renderModal:n,...a})=>{var o;const[i,s]=bH({user:e}),[l,c]=g.useState({open:!1,tab:Hl.first}),{guardedAction:u,ActionTooltipWrapper:f}=hb(),d=(null==i?void 0:i.length)||(null==(o=e.stats)?void 0:o.followers)||0,p=1===d?"follower":"followers",h=(null==i?void 0:i.slice(0,3))||[];return s?E.jsx(gf,{className:"mx-auto mb-4 h-7 w-[200px]"}):0!==d||t?E.jsxs("div",{"data-testid":"user-followers",children:[l.open&&(null==n?void 0:n({user:e,tab:l.tab,isOpen:!0,onClose:()=>c((e=>({...e,open:!1}))),...a})),E.jsx(f,{children:E.jsxs("div",{onClick:u((()=>{c({tab:Hl.first,open:!0})})),className:he("mb-4 flex cursor-pointer items-center text-base font-medium text-gray-900",r),children:[h.length>0&&E.jsx("ul",{className:"mr-2 flex items-center",children:h.map(((e,t)=>E.jsx("li",{className:he("relative",t>0&&"-ml-2"),children:E.jsx("div",{className:"rounded-full bg-white p-0.5",children:E.jsx(zp,{size:24,name:e.displayName,imgUrl:t1({user:e})})})},e.id)))}),d," ",p]})})]}):null},OQe=({status:e,userId:t,skip:r=!1})=>{const n=en(Qi.selectors.selectIsAuthenticated),a=!!e&&n,[o,i]=g.useState(!1),{data:s,isLoading:l,error:c}=IWe({status:e},{skip:!a||r||o}),{data:u,isLoading:f,error:d}=CWe({userId:t},{skip:a||!t||!n||r||o}),p=s||u,h=l||f;return g.useEffect((()=>{(Hy(c)||Hy(d))&&i(!0)}),[c,d]),{data:p,isLoading:h,isHidden:o}},NQe=({userUrl:e})=>E.jsxs("div",{className:"flex w-full items-center justify-between",children:[E.jsxs("div",{className:"gap-xs flex items-center",children:[E.jsx("div",{className:"flex size-10 items-center justify-center rounded-full border border-gray-200",children:E.jsx(ZZ,{size:20})}),E.jsxs("div",{className:"text-sm",children:[E.jsx("p",{className:"mb-xxxs font-semibold text-gray-900",children:"Some followers may not be visible"}),E.jsx("span",{className:"text-gray-400",children:"You can see more on the original server"})]})]}),E.jsx(Fge,{baseUrl:e,children:E.jsx("a",{href:e,children:E.jsxs(Gn,{variant:"secondary",className:"gap-xxs font-semibold",children:["See more followers ",E.jsx(UZ,{})]})})})]}),DQe=e=>{const{baseUrl:t}=o2.get();return e.local?`${t}/@${e.username}`:`https://${e.domain}/@${e.username}`},ap=e=>e&&!!e.repostOf&&(!!e.text||e.uploads.length>0),Tw=e=>{var t,r;return!(null==(t=null==e?void 0:e.stats)||!t.reposts)||!(null==(r=e.repostedBy)||!r.length)},Zo=(e,t,r=!1,n=e=>!!e)=>{var a,o,i;let s;return(null==t?void 0:t.id)===e&&n(t)||!r&&(null==(a=null==t?void 0:t.originalPost)?void 0:a.id)===e||!r&&(null==(o=null==t?void 0:t.parent)?void 0:o.id)===e?t:(null==(i=null==t?void 0:t.replies)||i.some((t=>(s=Zo(e,t,r,n),!!s))),s)},jQe="feeds-public",gy=e=>e===jQe,wH="replies",Pw=e=>e.startsWith(wH),$w=(e,t)=>`${e}-${t}`,LQe=(e,t)=>{if(e.pinned&&!t.pinned)return-1;if(!e.pinned&&t.pinned)return 1;if(e.pinned&&t.pinned){const r=Array.isArray(e.path)?e.path.length:0,n=Array.isArray(t.path)?t.path.length:0;if(r!==n)return r-n}return 0},uf=(e,t,r,n=!1)=>{e.forEach(((e,a)=>{var o,i;t===(null==(o=e.originalPost)?void 0:o.id)?r(e.originalPost||e,e,a):t===e.id&&r(e,e,a),null!=(i=e.replies)&&i.length&&!n&&uf(e.replies,t,r)}))},VQe=(e,t=3)=>{var r,n;if(!Array.isArray(e)||0===e.length)return e;const a=null==(r=e[0].replies)?void 0:r.find((e=>!e.isHighlightCopy)),o=(null==(n=null==a?void 0:a.path)?void 0:n.length)||0,i=e=>{var r;const n=((null==(r=null==e?void 0:e.path)?void 0:r.length)||0)-o<t,a=Array.isArray(e.replies)?e.replies.map(i):e.replies;return{...e,...n?{isOpen:!0}:{},replies:a}};return e.map(i)},hj=(e,t)=>new Date(t.createdAt).getTime()-new Date(e.createdAt).getTime(),hC="feed",yy="feeds",vy="reposts",mj="following",mC={items:[]},BQe={data:{},deletedPosts:[]},FQe=ur({name:"feeds",initialState:BQe,reducers:{addList:(e,t)=>{const{key:r,posts:n,isNewList:a}=t.payload,o=r.startsWith(`${hC}-`);if(!e.data[r]||a||o){e.data[r]={...mC};const t=o?VQe(n,3):n;e.data[r].items=t}else e.data[r].items.push(...n)},addPost:(e,t)=>{const r=Object.keys(e.data),n=t.payload.ownerId||t.payload.author.id;r.forEach((r=>{var a;if(!gy(r)||"PUBLIC"===t.payload.privacy)if(gy(r)||r===$w(yy,n)||r.startsWith(mj)){if(e.data[r].items.some((e=>e.id===t.payload.id)))return;const n=e.data[r].items.findLastIndex((e=>e.pinned));-1===n?e.data[r].items=[t.payload,...e.data[r].items]:e.data[r].items.splice(n+1,0,t.payload)}else{const o=$w(yy,n);(null==(a=e.data[o])||!a.items.length)&&r.startsWith("feed")&&(e.data[o]={...mC},e.data[o].items=[t.payload])}}))},updatePost:(e,t)=>{const r=Object.keys(e.data);let n=0;r.forEach((r=>{var a;uf(e.data[r].items,t.payload.id,(e=>{var r,a;const o=t.payload,i=(null==(r=null==o?void 0:o.path)?void 0:r.length)>0,s=e.text!==o.text,l={...e,...t.payload,...!t.payload.card&&{card:null},...!(null!=(a=o.settings)&&a.sensitive)&&{summary:""},...i&&{originalPost:null,parent:null},...s&&{translations:null}};e&&(Object.assign(e,l),n=1)}));const o=t.payload;if(0===n&&!o.pinned)if(gy(r)||r.startsWith(yy)||r.startsWith(vy)){const t=[o,...e.data[r].items].sort(hj);e.data[r].items=t}else if(Pw(r)){const t=e.data[r].items.length,n={...o.parent,replies:[{...o,parent:null}]};e.data[r].items=t?[n,...e.data[r].items]:[n]}else{const t=Zo((null==(a=o.path)?void 0:a.at(-1))||"",{id:"root-feed",replies:e.data[r].items});t&&(t.replies=[o,...t.replies||[]])}gy(r)&&"PUBLIC"!==o.privacy&&(e.data[r].items=e.data[r].items.filter((e=>e.id!==o.id))),n=0}))},deletePost:(e,t)=>{const{postId:r,repostOf:n}=t.payload,a=Object.keys(e.data),o=n||r;n&&e.deletedPosts.includes(n)||a.forEach((t=>{const a=Pw(t),i=Zo(r,{id:"root-feed",replies:e.data[t].items}),s=Zo(n||"",{id:"root-feed",replies:e.data[t].items});i&&ap(i)&&e.deletedPosts.push(i.id),a&&(e.data[t].items=e.data[t].items.filter((e=>{var t;return(null==(t=e.replies)?void 0:t[0].id)!==r})));let l=0;const c=(null==i?void 0:i.repostOf)||n;if(c){const a=(e,t)=>{!n&&i&&ap(i)?(i.author.id===(null==t?void 0:t.author.id)&&!t.originalPost&&(l+=1),e&&lo.isNumber(null==e?void 0:e.stats.quotes)&&(1===l&&1===e.stats.quotes&&(e.quoted=!1),e.stats.quotes-=1)):ap(i)?lo.isNumber(e.stats.quotes)&&(e.stats.quotes-=1):lo.isNumber(e.stats.reposts)&&Tw(e)&&(e.stats.reposts-=1,e.stats.reposts||(e.reposted=!1))},u=i||s,f=(null==u?void 0:u.originalPost)&&Tw(null==u?void 0:u.originalPost)||u&&Tw(u);e.data[t].items.forEach((e=>{var t;e.repostOf===o&&!f&&(!ap(e)||(null==(t=e.originalPost)?void 0:t.id)===r)&&e.originalPost&&(e.originalPost.deleted=!0,e.originalPost.text="")})),uf(e.data[t].items,c,a)}const u=e.data[t].items.filter((e=>e.id!==r));e.data[t].items=u}))},likePost:(e,t)=>{const r=Object.keys(e.data),{id:n,count:a,isLiked:o,isIncrement:i}=t.payload;r.forEach((t=>{uf(e.data[t].items,n,(e=>{const t=e.stats.likes||0,r=lo.isNumber(a)?a:i?t+1:t-1;e.liked=o,e.stats.likes=r,e.updatedAt=(new Date).toISOString()}))}))},repost:(e,t)=>{const{userId:r,post:n}=t.payload;Object.keys(e.data).forEach((t=>{if(e.data[t].items.find((e=>{var t;return(null==(t=e.originalPost)?void 0:t.id)===n.id||e.id===n.id})))return;uf(e.data[t].items,n.repostOf,((e,t)=>{var a,o;const i=Number(null==(a=n.originalPost)?void 0:a.stats.quotes)||0,s=Number(null==(o=n.originalPost)?void 0:o.stats.reposts)||0;ap(n)?e.stats.quotes=i:e.stats.reposts=s,(null==t?void 0:t.author.id)===r&&ap(n)?e.quoted=!0:n.author.id===r&&Tw(n.originalPost)&&(e.reposted=!0)})),(gy(t)||t.startsWith(mj)||[$w(yy,n.author.id),$w(vy,n.author.id)].includes(t))&&ap(n)&&e.data[t].items.unshift(n)}))},addComment:(e,t)=>{Object.keys(e.data).forEach((r=>{const n=Pw(r),a=r.startsWith(vy),o=r.startsWith(`${hC}-`);if(Zo(t.payload.id,{id:"root-feed",replies:e.data[r].items}))return;const i=n&&!a?t.payload.conversationId:t.payload.path.at(-1),s=Zo(i,{id:"root-feed",replies:e.data[r].items});if(n){const n=Zo(t.payload.conversationId,e.data[r].items[0]);if(n)e.data[r].items.unshift({...n,replies:[t.payload]});else if(0===e.data[r].items.length&&t.payload.parent){const n={...t.payload,parent:null};e.data[r].items=[{...t.payload.parent,replies:[n]}]}}else s&&(s.replies?(s.replies.push(t.payload),s.updatedAt=(new Date).toISOString()):null!=s&&s.replies||(s.replies=[t.payload],s.updatedAt=(new Date).toISOString()));const l=(e,r)=>{const n=!ap(r)||t.payload.conversationId===(null==r?void 0:r.id);r&&n&&lo.isNumber(r.stats.comments)&&(r.stats.comments+=1)};n||t.payload.path.forEach((t=>{if(o){const n=Zo(t,{id:"root-feed",replies:e.data[r].items});n&&lo.isNumber(n.stats.comments)&&(n.stats.comments+=1,n.updatedAt=(new Date).toISOString())}else uf(e.data[r].items,t,l,!0)}))}))},deleteComment:(e,t)=>{const{commentId:r,skipCounterUpdate:n}=t.payload,a=Object.keys(e.data);e.deletedPosts.includes(r)||(e.deletedPosts.push(r),a.forEach((t=>{var a,o;const i=Pw(t),s=Zo(r,{id:"comment-feed",replies:e.data[t].items});i?e.data[t].items=e.data[t].items.filter((e=>{var t;return(null==(t=e.replies)?void 0:t[0].id)!==r})):s&&((null==(a=s.originalPost)?void 0:a.id)===r?(s.originalPost.text="",s.originalPost.uploads=[],s.originalPost.deleted=!0):(null==(o=s.parent)?void 0:o.id)===r?(s.parent.text="",s.parent.uploads=[],s.parent.deleted=!0):(s.text="",s.uploads=[],s.deleted=!0),s.updatedAt=(new Date).toISOString(),s.path.forEach((r=>{const a=Zo(r,{id:"sub-feed",replies:e.data[t].items});a&&lo.isNumber(a.stats.comments)&&a.stats.comments>0&&!n&&(a.stats.comments-=1,a.updatedAt=(new Date).toISOString())})))})))},toggleNestedComments:(e,t)=>{const{id:r}=t.payload;Object.keys(e.data).forEach((t=>{const n=Zo(r,{id:"comment-feed",replies:e.data[t].items},void 0,(e=>{var t;return!(null==(t=null==e?void 0:e.replies)||!t.length)}));n&&(n.isOpen=!n.isOpen)}))},openCommentInThread:(e,t)=>{const{commentId:r}=t.payload;Object.keys(e.data).forEach((t=>{const n=Zo(r,{id:"comment-feed",replies:e.data[t].items},!0,(e=>{var t;return!(null==(t=null==e?void 0:e.replies)||!t.length)}));n&&n.path.forEach((r=>{const n=Zo(r,{id:"sub-feed",replies:e.data[t].items},!0,(e=>{var t;return!(null==(t=null==e?void 0:e.replies)||!t.length)}));n&&(n.isOpen=!0)}))}))},removePrivatePosts:(e,t)=>{const r=Object.keys(e.data),{id:n}=t.payload;r.forEach((t=>{const r=e.data[t].items.filter((e=>"PRIVATE"!==e.privacy||e.author.id!==n));e.data[t].items=r}))},hideUserPosts:(e,t)=>{const r=Object.keys(e.data),n=t.payload;r.forEach((t=>{const r=e.data[t].items.map((e=>({...e,isHidden:e.author.id===n})));e.data[t].items=r}))},showUserPosts:(e,t)=>{const r=Object.keys(e.data),n=t.payload;r.forEach((t=>{const r=e.data[t].items.map((e=>({...e,isHidden:(!e.isHidden||e.author.id!==n)&&e.isHidden})));e.data[t].items=r}))},clearList:(e,t)=>{const r=t.payload;e.data[r]&&(e.data[r].items=[])},clearAllLists:e=>{Object.keys(e.data).forEach((t=>{e.data[t].items=[]}))},updatePinPost:(e,t)=>{const r=Object.keys(e.data),{postId:n,pinned:a,isComment:o}=t.payload;r.forEach((t=>{var r,i;if(t.startsWith(yy)||t.startsWith(hC)||t.startsWith(vy)){const s=Zo(n,{id:"root-feed",replies:e.data[t].items},!0,o?e=>!(null!=e&&e.isHighlightCopy):void 0);if(s&&(s.pinned=a),o){const n=Zo(null==s?void 0:s.conversationId,{id:"root-feed",replies:e.data[t].items});if(n)if(a){const e={...s,isOpen:!1,isHighlightCopy:!0,replies:[]},t=n.replies||[];s&&e.path.length>1&&t.unshift(e),n.replies=t.sort(LQe)}else(null==(r=null==s?void 0:s.path)?void 0:r.length)&&1===s.path.length||(n.replies=(null==(i=n.replies)?void 0:i.filter((e=>(null==e?void 0:e.id)!==(null==s?void 0:s.id))))||[])}else if(a){const r=e.data[t].items.filter((e=>e.id!==n));s&&(e.data[t].items=[s,...r])}else e.data[t].items=e.data[t].items.sort(hj)}}))},deleteRepost:(e,t)=>{const r=Object.keys(e.data),{postId:n}=t.payload;e.deletedPosts.push(n),r.forEach((t=>{if(t.startsWith(wH)){const r=e=>{var t;const r=null==(t=e.replies)?void 0:t[0];r&&(r.reposted=!1,lo.isNumber(r.stats.reposts)&&(r.stats.reposts-=1))};uf(e.data[t].items,n,r)}else if(t.startsWith(vy)){const r=e=>{const t=e.originalPost;t&&(t.reposted=!1,lo.isNumber(t.stats.reposts)&&(t.stats.reposts-=1))};uf(e.data[t].items,n,r)}else{const r=e=>{e.reposted=!1,lo.isNumber(e.stats.reposts)&&(e.stats.reposts-=1)};uf(e.data[t].items,n,r)}}))}},selectors:{selectFeedState:(e,t)=>e.data[t]?{...e.data[t],items:e.data[t].items.filter((e=>!e.isHidden))}:{...mC}}}).injectInto(Tp),gC={size:20,color:"var(--gray-900)"},UQe=({user:e,relationship:t,isOwnProfile:r})=>{const n=Em(),[a,o,i,s]=S9({user:e,relationship:t}),{isMuted:l,mute:c,unmute:u,renderMuteDialog:f}=vH({user:e,relationship:t,onUnmute:()=>{n(FQe.actions.showUserPosts(e.id))}}),[d]=TWe(),{isDisabled:p,ActionTooltipWrapper:h}=hb();return[[{icon:E.jsx(a7,{...gC}),name:"Remove from followers",handler:()=>{d({username:ho(e)})},isHidden:!_Qe(t)||r,disabled:p},{icon:E.jsx(CA,{...gC}),name:l?"Unmute":"Mute",handler:l?u:c,isHidden:r||a,disabled:p,renderDialog:f},{icon:E.jsx(AX,{...gC,color:"var(--red-dark)"}),name:a?"Unblock":"Block",handler:a?i:o,className:"text-red-dark",isHidden:r,disabled:p,renderDialog:s}],h]},GQe="animate-slide-up bottom-0 left-0 right-0 top-[unset] max-w-full transform-none rounded-b-none rounded-t-lg pb-10 max-md:w-full",qQe=({className:e,childrenClassName:t,renderContent:r,renderToggler:n,defaultOpen:a=!1})=>{const[o,i]=g.useState(a);return g.useEffect((()=>{i(a)}),[a]),E.jsxs(E.Fragment,{children:[n&&n((()=>i((e=>!e))),o),E.jsx(e1,{open:o,showClose:!1,onCloseModal:()=>i(!1),childrenClassName:t,className:he(GQe,e),children:r({isOpen:o,setOpen:i})})]})};function gj(...e){return d7(UC(e))}const yj=({children:e,actions:t,adminActions:r,renderItemWrapper:n})=>{const{ActionTooltipWrapper:a}=hb();return E.jsxs(E.Fragment,{children:[e,t.map((e=>e.isHidden?null:E.jsxs("div",{children:[E.jsx(a,{triggerClassname:"w-full",children:n(e,E.jsx("div",{className:gj("flex min-h-[24px] items-center text-start text-base",{"opacity-50":e.disabled}),children:e.link?E.jsxs("a",{href:e.link,target:"_blank",rel:"noreferrer",className:"gap-xxs [&_svg]:size-xs flex items-center",children:[e.icon,e.name]}):E.jsxs("div",{className:"gap-xxs [&_svg]:size-xxs flex items-center",children:[e.icon,e.name]})}))}),e.isSeparator&&E.jsx("p",{className:"my-xxs border-t border-dashed border-gray-200"},"menu_separator")]},e.name))),!!r.length&&E.jsxs(E.Fragment,{children:[E.jsx("p",{className:"my-xxs border-t border-dashed border-gray-200"},"menu_separator"),E.jsxs(Yv,{children:[E.jsx(Kv,{className:"p-xxs w-full text-left hover:bg-[hsl(var(--accent))] focus-visible:outline-none",children:"Moderate"}),E.jsx(q0,{side:"right",className:"p-xxs min-w-[200px] text-base font-semibold text-gray-700",children:r.map((e=>e.isHidden?null:E.jsxs("div",{children:[E.jsx(dv,{onClick:e.handler,className:gj("h-m cursor-pointer",e.className,e.isSelected&&"font-semibold"),children:e.link?E.jsx("a",{href:e.link,target:"_blank",rel:"noreferrer",children:e.name}):e.name}),e.isSeparator&&E.jsx("p",{className:"my-xxxs border-t border-dashed border-gray-200"},"menu_separator")]},e.name)))})]})]})]})},WQe=({canCheck:e,onOpenChange:t})=>{const r=g.useRef(null),n=g.useRef(null),[a,o]=g.useState(!0),[i,s]=g.useState(!0);return zU("scroll",(()=>{if(r.current){const e=hD(r.current);s(e),!e&&t(!1)}n.current&&o(hD(n.current))})),g.useEffect((()=>{e&&(i||t(!1))}),[i]),[i||a,r,n]},HQe="flex size-10 items-center justify-center border-gray-700 p-0 focus-visible:ring-0 focus-visible:ring-transparent",_H=({align:e="end",actions:t,children:r,adminActions:n=[],mobileBehavior:a="modal",isPortal:o=!0,desktopModalBehavior:i=!1,triggerVariant:s="none",triggerClass:l=HQe,trigger:c,dropdownClassName:u,onOpenChange:f,triggerSize:d="none",sideOffset:p,alignOffset:h})=>{const[m,y]=g.useState(!1),v=[...t,...n].map((e=>{var t;return e.renderDialog?E.jsx("div",{className:"empty:hidden",children:null==(t=e.renderDialog)?void 0:t.call(e)},e.name):null})),b=MU(),w="modal"===a&&b,_=e=>{null==f||f(e),y(e)},[k,x,A]=WQe({canCheck:m&&!w,onOpenChange:_});return g.useEffect((()=>{k||y(!1)}),[k]),E.jsxs(E.Fragment,{children:[v,w?E.jsx(qQe,{childrenClassName:"flex flex-col p-xxs gap-xxxs",renderToggler:e=>E.jsx(Gn,{onClick:e,size:d,variant:s,className:he("size-m flex items-center justify-center border-gray-700 p-0 focus-visible:ring-0 focus-visible:ring-transparent",l),children:E.jsx($P,{})}),renderContent:({setOpen:e})=>E.jsx(yj,{actions:t,adminActions:n,renderItemWrapper:(t,r)=>E.jsx("div",{onClick:()=>{var r;t.disabled||(null==(r=t.handler)||r.call(t),e(!1))},className:he("mb-xxs p-xxs min-h-m flex cursor-pointer items-center text-sm font-semibold text-gray-700 last:mb-0",t.className),children:E.jsx(vm,{theme:"dark",tooltipText:t.tooltipText||"",size:"small",align:"start",triggerClassname:"w-full",children:r})}),children:r})}):E.jsxs(Yv,{open:m,modal:i,onOpenChange:_,children:[E.jsx(Kv,{asChild:!0,ref:A,"data-testid":"actionsDropdown_menu_trigger",className:"focus:outline-none",children:E.jsx(Gn,{size:d,variant:s,className:he(l),children:c||E.jsx($P,{color:m?"var(--blue_100)":"var(--gray-500)"})})}),E.jsx(q0,{align:e,sideOffset:p,alignOffset:h,isPortal:o,ref:x,"data-testid":"actionsDropdownMenu",avoidCollisions:!0,collisionPadding:8,sticky:"always",className:he("p-xxs min-w-[200px] text-base font-semibold text-gray-700",u),children:E.jsx(yj,{actions:t,adminActions:n,renderItemWrapper:(e,t)=>E.jsx(vm,{theme:"dark",tooltipText:e.tooltipText||"",size:"small",triggerClassname:"w-full",children:E.jsx(dv,{onClick:e.handler,disabled:e.disabled,className:he("p-xxs cursor-pointer text-base font-medium",e.className),children:t})})})})]})]})},QQe=e=>{const t=x9(e.user.id),[r]=UQe({...e,isOwnProfile:t});return t?null:E.jsx(E.Fragment,{children:E.jsxs("div",{className:"flex items-center gap-1",children:[E.jsx(gH,{...e,size:e.size||"s"}),E.jsx(_H,{actions:r,mobileBehavior:"dropdown",triggerVariant:"tertiary",triggerClass:"flex h-auto items-center justify-center border-gray-700 p-[6px] focus-visible:ring-0 focus-visible:ring-transparent"})]})})},by=e=>"username"in e,vj=({list:e,onClose:t,className:r,...n})=>{const{relationship:a,isLoading:o}=k9({userId:null==e?void 0:e.map((e=>by(e)?e.id:e.memberId))});return E.jsx("ul",{className:he("no-scrollbar overflow-y-auto overflow-x-hidden",r),"data-testid":"f_list",children:null==e?void 0:e.map((e=>{const r=by(e)?e.id:e.memberId,i=by(e)?e.displayName:e.userDisplayName,s=a[r],l=ho({username:by(e)?e.username:e.userName,domain:by(e)?e.domain:e.userDomain||""});return E.jsxs("li",{className:"mb-3 flex min-w-0 max-w-full items-center justify-between gap-2.5",children:[E.jsx(Wi,{to:"/:username",onClick:t,className:"min-w-0",props:{username:l},children:E.jsxs("div",{className:"flex",children:[E.jsx(zp,{size:40,name:i,imgUrl:t1({user:e,type:"avatar"})}),E.jsx("div",{className:"ml-2 min-w-0 text-gray-700",children:E.jsxs("div",{className:"cursor-pointer",children:[E.jsx("div",{className:"truncate text-base font-semibold",children:i}),E.jsx("div",{className:"truncate text-base font-medium",children:l})]})})]})}),E.jsx(QQe,{user:e,size:"m",relationship:s,isRelationshipPending:o,...n})]},r)}))})},YQe=()=>E.jsx("div",{className:"flex h-full items-center justify-center",children:E.jsx(vf,{className:"size-m animate-spin text-gray-400"})}),bj=({count:e=15,className:t})=>E.jsx("div",{"data-testid":"list-loader",className:he("gap-m ml-auto mr-auto flex max-w-[560px] flex-col",t),children:Array.from({length:e}).map(((e,t)=>E.jsxs("div",{className:"flex gap-2.5",children:[E.jsx(gf,{className:"size-m rounded-full"}),E.jsxs("div",{className:"flex flex-1 flex-col gap-2.5",children:[E.jsx(gf,{className:"h-xxxs w-full"}),E.jsx(gf,{className:"h-xxxs w-[116px]"})]})]},t)))}),KQe=e=>({label:"first"===e?"Followers":"Following",counter:0}),wj=(e,t)=>{var r,n;const a=KQe(e);return`${(null==(r=null==t?void 0:t[e])?void 0:r.label)||a.label} (${(null==(n=null==t?void 0:t[e])?void 0:n.counter)||a.counter})`},XQe=({activeTab:e,onTabChange:t,showLists:r=!0,firstList:n,secondList:a,user:o,isLoading:i,isOpen:s,onClose:l,tabs:c,searchQuery:u,onSearchQueryChange:f,listClassName:d,dialogClassName:p,hiddenListMessage:h,renderFooter:g,title:m=(o?`Connections @${o.username}`:void 0),...y})=>{const v=WR();return E.jsx(e1,{open:s,onCloseModal:l,title:m,className:he("content-baseline",p),childrenClassName:"p-none min-h-[500px] overflow-hidden max-h-[calc(90vh-65px)]",titleClassName:"!border-none",renderFooter:g,children:i?E.jsx(YQe,{}):E.jsxs(Jge,{className:"no-scrollbar h-full overflow-scroll",defaultValue:e,onValueChange:t,children:[E.jsx(t0e,{className:"!mt-0",items:[{value:Hl.first,label:wj("first",c)},{value:Hl.second,label:wj("second",c)}]}),r?E.jsxs("div",{children:[E.jsx("div",{className:"my-m mx-s relative flex",children:E.jsxs(PB,{...v,children:[E.jsx(Y0,{autoFocus:!1,placeholder:"Search",value:u,className:"flex-1 pl-11",onChange:e=>f(e.target.value)}),E.jsx(NZ,{className:"left-s absolute top-3.5 size-5 stroke-gray-300"})]})}),E.jsx(_I,{value:Hl.first,className:"px-s overflow-scroll [&::-webkit-scrollbar]:hidden",children:i?E.jsx(bj,{count:10,className:"mt-none gap-xs overflow-hidden"}):E.jsx(vj,{onClose:l,...y,list:n||[],className:he(d)})}),E.jsx(_I,{value:Hl.second,className:"px-s overflow-scroll [&::-webkit-scrollbar]:hidden",children:i?E.jsx(bj,{count:8,className:"mt-none gap-xs overflow-hidden"}):E.jsx(vj,{onClose:l,...y,list:a||[],className:he(d)})})]}):E.jsx("p",{className:"py-xxl px-m text-center text-sm font-medium text-gray-500",children:h})]})})},ZQe=({tab:e=Hl.first})=>{const[t,r]=g.useState(e),[n,a]=g.useState("");return{activeTab:t,setActiveTab:r,searchQuery:n,setSearchQuery:a}},JQe=({tab:e=Hl.first,user:t,isOpen:r,onClose:n})=>{var a,o;const{activeTab:i,setActiveTab:s,searchQuery:l,setSearchQuery:c}=ZQe({tab:e}),u=x9(t.id),f=!t.local,{data:d,isLoading:p,isHidden:h}=OQe({userId:t.id,skip:!r}),[g,m,y]=bH({user:t,skip:!r}),v=u||!h&&!y,b=m||p,{data:w}=SA({q:l,filter:["users"],followers:i===Hl.first,following:i===Hl.second},{skip:!l}),_=l?null==w?void 0:w.users:g,k=l?null==w?void 0:w.users:d;return E.jsx(XQe,{activeTab:i,user:t,onTabChange:e=>s(e),showLists:v,firstList:_||[],secondList:k||[],isLoading:b,isOpen:r,onClose:n,searchQuery:l,onSearchQueryChange:c,tabs:{first:{label:"Followers",counter:(null==g?void 0:g.length)||(null==(a=t.stats)?void 0:a.followers)||0},second:{label:"Following",counter:(null==d?void 0:d.length)||(null==(o=t.stats)?void 0:o.following)||0}},renderFooter:()=>f?E.jsx(NQe,{userUrl:DQe(t)}):null,listClassName:he(f&&"max-h-[360px] overflow-visible"),hiddenListMessage:"The Followers and Following lists can not be displayed due to the user's privacy configuration"})},eYe=({user:e,className:t,isOwnProfile:r,onFollow:n,onUnfollow:a,hideFollowButton:o=!1})=>{const i=en(J2.selectors.selectEmojis),{follow:s,unfollow:l,renderGuestFollowModal:c}=hH({user:e,onFollow:n,onUnfollow:a}),u=ho(e),{relationship:f,isLoading:d}=k9({userId:e.id}),{isDisabled:p,ActionTooltipWrapper:h}=hb(),{isMuted:g}=vH({user:e,relationship:f}),[m]=S9({user:e,relationship:f});return E.jsx("div",{className:he("z-[6] w-[360px] rounded-lg bg-white p-5 text-base shadow-[0px_4px_6px_0px_rgba(0,0,0,0.09)] outline outline-gray-200",t),"data-testid":"infoPopupContent",onClick:e=>{e.preventDefault(),e.stopPropagation()},children:E.jsxs("div",{children:[c(),E.jsx("div",{className:"mb-4",children:E.jsxs("div",{className:"flex justify-between",children:[E.jsx("div",{className:"max-w-[calc(100%-80px)]",children:E.jsxs(Wi,{to:"/:username",props:{username:u},className:"block",children:[E.jsxs("div",{className:"mb-1 flex items-center gap-2",children:[E.jsx("h2",{className:"truncate text-lg font-semibold text-gray-900",dangerouslySetInnerHTML:{__html:DI(e.displayName,i)}}),E.jsx(E.Fragment,{children:m?E.jsx(pj,{status:"blocked",iconOnly:!0}):g?E.jsx(pj,{status:"muted",iconOnly:!0}):null})]}),E.jsx(zQe,{children:u})]})}),E.jsx(zp,{className:"ml-2 shrink-0",size:48,name:e.displayName,imgUrl:t1({user:e})})]})}),e.summary&&E.jsx("div",{"data-testid":"user-summary",className:"my-3 line-clamp-2 overflow-hidden text-ellipsis leading-6 text-gray-900 empty:hidden",dangerouslySetInnerHTML:{__html:CQe(DI(e.summary||"",i))}}),E.jsx("div",{className:"my-3",children:E.jsx(MQe,{user:e,showEmpty:!1,renderModal:({user:e,tab:t,isOpen:r,onClose:n,...a})=>E.jsx(JQe,{user:e,tab:t,isOpen:r,onClose:n,...a})})}),E.jsx($Qe,{userId:e.id,note:f.note,className:"my-3"}),!r&&!o&&E.jsx("div",{className:"mt-[12px]",children:E.jsx(h,{triggerClassname:"w-full",children:E.jsx(mH,{user:e,relationship:f,follow:()=>{s()},unfollow:()=>{l()},disabled:p,isRelationshipPending:d})})})]})})},tYe=({className:e,canShow:t=!0,...r})=>{const[n,a]=g.useState(!1),o=t&&n;return E.jsxs(HF,{openDelay:1e3,open:n,onOpenChange:a,children:[E.jsx(QF,{"data-testid":"infoPopupWrapper",className:he("max-w-full cursor-default",e),children:r.children}),o&&E.jsx(nYe,{...r})]})},nYe=e=>{const[t,r,n]=SQe({userId:"userId"in e?e.userId:void 0,allowDeleted:"allowDeleted"in e?e.allowDeleted:void 0,username:"username"in e?e.username:void 0});return!t||n?null:E.jsx(cT,{side:"bottom",align:"start",className:"w-[366px] border-0 bg-transparent p-0 shadow-none outline-none",children:E.jsx(eYe,{user:t,isOwnProfile:r,...e})})},rYe=(e,t=!1)=>({displayName:t?14:28,userName:t?e?14:6:e?25:10}),zw=(e="",t)=>e.length>t?e.slice(0,t)+"...":e,aYe=e=>{const t=e.split(/(?=@)/);return 2===t.length?[t[0],t[1]]:[]},oYe=({user:e,maxShortenedInfo:t})=>{const r=e.local,n=rYe(r,t),a=ho(e),o=e.displayName.length<=n.displayName?e.displayName:zw(e.displayName,n.displayName),i=aYe(a);return{displayName:o,userName:a.length<=n.userName?a:r?zw(a,n.userName):`${zw(i[0],n.userName)}${zw(i[1],n.userName)}`}},sYe=({type:e,post:t})=>{var r,n;return"LIKE"===e&&null!=(r=null==t?void 0:t.path)&&r.length||"COMMENT"===e&&(null==t?void 0:t.path)&&t.path.length>1||"REPOST"===e&&(null==(n=null==t?void 0:t.originalPost)?void 0:n.path.length)?"reply":"post"},iYe=e=>{var t;const r=sYe(e);switch(e.type){case"COMMENT":return E.jsxs("span",{children:["Replied to your ",r]});case"FOLLOW":return E.jsx("span",{children:"Started following you"});case"FOLLOW_REQUEST":return E.jsx("span",{children:"Requested following you"});case"LIKE":return E.jsxs("span",{children:["liked your ",r]});case"MENTION":return E.jsx("span",{children:"Mentioned you"});case"EVENT_INVITE":return E.jsxs("span",{children:["Invited you to ",E.jsx(cYe,{notification:e})]});case"EVENT_JOIN":return E.jsx("span",{children:"Joined an event"});case"EVENT_CANCEL":return E.jsx("span",{children:"Canceled an event"});case"EVENT_UPDATE":return E.jsx("span",{children:"Updated an event"});case"REPOST":return null!=(t=e.post)&&t.text?E.jsxs("span",{children:["Quoted your ",r]}):E.jsxs("span",{children:["Reposted your ",r]});case"POLL_VOTE":return E.jsx("span",{children:"Voted on your poll"});default:return null}},cYe=({notification:e})=>{var t,r,n,a;const o=null==(t=e.event)?void 0:t.name,i=null==(r=e.event)?void 0:r.id,s=null!=(n=e.event)&&n.organizer?ho(null==(a=e.event)?void 0:a.organizer):null;return o&&i&&s?E.jsx(Wi,{to:"/:username/events/:eventId",className:"text-blue_120 hover:underline",props:{eventId:i,username:s},children:da.capitalize(o)}):null},lYe=({notification:e})=>{const t=iYe(e);return t?E.jsx("div",{className:"empty:hidden",children:t}):null},uYe=1e3,kH=6e4,C9=60*kH,Sk=24*C9,xH=7*Sk,fYe=29*Sk,dYe=e=>e<C9?"MINUTES":e<Sk?"HOURS":e<xH?"DAYS":e<fYe?"WEEKS":"EXACT_DATE",_j=e=>{const t=new Date,r=e.toLocaleString("en-US",{month:"short",timeZone:"UTC"}),n=e.getUTCDate(),a=e.getUTCFullYear();return a===t.getUTCFullYear()?`${r} ${n}`:`${r} ${n}, ${a}`},pYe=e=>{const t=Date.now(),r=new Date(e).getTime(),n=Math.max(0,t-r);switch(dYe(n)){case"MINUTES":return`${Math.floor(n/kH)}m`;case"HOURS":return`${Math.floor(n/C9)}h`;case"DAYS":return`${Math.floor(n/Sk)}d`;case"WEEKS":return`${Math.floor(n/xH)}w`;default:return _j(new Date(e))}},hYe="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='20'%20height='20'%20rx='10'%20fill='%23D577FF'/%3e%3cg%20clip-path='url(%23clip0_11263_28632)'%3e%3cpath%20d='M8%204.5V6.5M12%204.5V6.5M5.5%208.5H14.5M6.5%205.5H13.5C14.0523%205.5%2014.5%205.94772%2014.5%206.5V13.5C14.5%2014.0523%2014.0523%2014.5%2013.5%2014.5H6.5C5.94772%2014.5%205.5%2014.0523%205.5%2013.5V6.5C5.5%205.94772%205.94772%205.5%206.5%205.5Z'%20stroke='%23FAFAFA'%20stroke-width='1.3'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_11263_28632'%3e%3crect%20width='12'%20height='12'%20fill='white'%20transform='translate(4%203.5)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",mYe="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='20'%20height='20'%20rx='10'%20fill='%23262626'/%3e%3cg%20clip-path='url(%23clip0_11263_28633)'%3e%3cpath%20d='M5.5%2014C5.49996%2013.2301%205.72207%2012.4766%206.13967%2011.8299C6.55728%2011.1832%207.15264%2010.6707%207.8543%2010.354C8.55596%2010.0373%209.33412%209.92973%2010.0954%2010.0443C10.8566%2010.1589%2011.5687%2010.4907%2012.146%2011M14%2011.5V14.5M15.5%2013H12.5M12%207.5C12%208.88071%2010.8807%2010%209.5%2010C8.11929%2010%207%208.88071%207%207.5C7%206.11929%208.11929%205%209.5%205C10.8807%205%2012%206.11929%2012%207.5Z'%20stroke='%23FAFAFA'%20stroke-width='1.3'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_11263_28633'%3e%3crect%20width='12'%20height='12'%20fill='white'%20transform='translate(4.5%203.5)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",gYe="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='20'%20height='20'%20rx='10'%20fill='%23EE3D3D'/%3e%3cpath%20d='M13.5%2011.5C14.245%2010.77%2015%209.895%2015%208.75C15%208.02065%2014.7103%207.32118%2014.1945%206.80546C13.6788%206.28973%2012.9793%206%2012.25%206C11.37%206%2010.75%206.25%2010%207C9.25%206.25%208.63%206%207.75%206C7.02065%206%206.32118%206.28973%205.80546%206.80546C5.28973%207.32118%205%208.02065%205%208.75C5%209.9%205.75%2010.775%206.5%2011.5L10%2015L13.5%2011.5Z'%20stroke='%23FAFAFA'%20stroke-width='1.3'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",yYe="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='20'%20height='20'%20rx='10'%20fill='%234285F4'/%3e%3cg%20clip-path='url(%23clip0_11263_28630)'%3e%3cpath%20d='M12%208V10.5C12%2010.8978%2012.158%2011.2794%2012.4393%2011.5607C12.7206%2011.842%2013.1022%2012%2013.5%2012C13.8978%2012%2014.2794%2011.842%2014.5607%2011.5607C14.842%2011.2794%2015%2010.8978%2015%2010.5V10C15%208.87366%2014.6197%207.7803%2013.9207%206.89709C13.2217%206.01387%2012.245%205.39254%2011.1488%205.13376C10.0526%204.87498%208.90107%204.99391%207.88089%205.47128C6.86071%205.94865%206.03159%206.7565%205.52787%207.76394C5.02415%208.77137%204.87534%209.91937%205.10556%2011.0219C5.33577%2012.1245%205.93151%2013.1171%206.79627%2013.8388C7.66102%2014.5605%208.74413%2014.9691%209.87009%2014.9983C10.9961%2015.0276%2012.0989%2014.6758%2013%2014M12%2010C12%2011.1046%2011.1046%2012%2010%2012C8.89543%2012%208%2011.1046%208%2010C8%208.89543%208.89543%208%2010%208C11.1046%208%2012%208.89543%2012%2010Z'%20stroke='%23FAFAFA'%20stroke-width='1.3'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_11263_28630'%3e%3crect%20width='12'%20height='12'%20fill='white'%20transform='translate(4%204)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",vYe="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='20'%20height='20'%20rx='10'%20fill='%2328B236'/%3e%3cg%20clip-path='url(%23clip0_11263_28627)'%3e%3cpath%20d='M12.5%205L14.5%207M14.5%207L12.5%209M14.5%207H7.5C6.96957%207%206.46086%207.21071%206.08579%207.58579C5.71071%207.96086%205.5%208.46957%205.5%209V9.5M7.5%2015L5.5%2013M5.5%2013L7.5%2011M5.5%2013H12.5C13.0304%2013%2013.5391%2012.7893%2013.9142%2012.4142C14.2893%2012.0391%2014.5%2011.5304%2014.5%2011V10.5'%20stroke='%23FAFAFA'%20stroke-width='1.3'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_11263_28627'%3e%3crect%20width='12'%20height='12'%20fill='white'%20transform='translate(4%204)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",bYe="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='20'%20height='20'%20rx='10'%20fill='%238E54D8'/%3e%3cpath%20d='M15%2011.5C15%2011.7652%2014.8946%2012.0196%2014.7071%2012.2071C14.5196%2012.3946%2014.2652%2012.5%2014%2012.5H8L6%2014.5V6.5C6%206.23478%206.10536%205.98043%206.29289%205.79289C6.48043%205.60536%206.73478%205.5%207%205.5H14C14.2652%205.5%2014.5196%205.60536%2014.7071%205.79289C14.8946%205.98043%2015%206.23478%2015%206.5V11.5Z'%20stroke='%23FAFAFA'%20stroke-width='1.3'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",wYe="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='20'%20height='20'%20rx='10'%20fill='%23F87373'/%3e%3cpath%20d='M13%2014C13%2012.9391%2012.5786%2011.9217%2011.8284%2011.1716C11.0783%2010.4214%2010.0609%2010%209%2010M9%2010C7.93913%2010%206.92172%2010.4214%206.17157%2011.1716C5.42143%2011.9217%205%2012.9391%205%2014M9%2010C10.3807%2010%2011.5%208.88071%2011.5%207.5C11.5%206.11929%2010.3807%205%209%205C7.61929%205%206.5%206.11929%206.5%207.5C6.5%208.88071%207.61929%2010%209%2010ZM15%2013.5001C15%2011.8151%2014%2010.2501%2013%209.5001C13.3287%209.25348%2013.5916%208.92964%2013.7653%208.55723C13.939%208.18482%2014.0183%207.77533%2013.996%207.365C13.9738%206.95466%2013.8507%206.55614%2013.6378%206.2047C13.4248%205.85325%2013.1285%205.55973%2012.775%205.3501'%20stroke='%23FAFAFA'%20stroke-width='1.3'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",_Ye="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='20'%20height='20'%20rx='10'%20fill='%23F47F1F'/%3e%3cg%20clip-path='url(%23clip0_11325_41225)'%3e%3cpath%20d='M11%206H14.5M11%208.5H14.5M11%2011.5H14.5M11%2014H14.5M6%205.5H8.5C8.77614%205.5%209%205.72386%209%206V8.5C9%208.77614%208.77614%209%208.5%209H6C5.72386%209%205.5%208.77614%205.5%208.5V6C5.5%205.72386%205.72386%205.5%206%205.5ZM6%2011H8.5C8.77614%2011%209%2011.2239%209%2011.5V14C9%2014.2761%208.77614%2014.5%208.5%2014.5H6C5.72386%2014.5%205.5%2014.2761%205.5%2014V11.5C5.5%2011.2239%205.72386%2011%206%2011Z'%20stroke='%23FAFAFA'%20stroke-width='1.3'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_11325_41225'%3e%3crect%20width='12'%20height='12'%20fill='white'%20transform='translate(4%204)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",kYe=e=>{switch(e.type){case"COMMENT":return bYe;case"FOLLOW":case"FOLLOW_REQUEST":return mYe;case"LIKE":return gYe;case"MENTION":return yYe;case"REPOST":return vYe;case"EVENT_INVITE":case"EVENT_JOIN":case"EVENT_CANCEL":case"EVENT_UPDATE":return hYe;case"GROUP_INVITE":return wYe;case"POLL":case"LIST_POST_CREATE":case"POST_UPDATE":case"POLL_VOTE":return _Ye}};var pf=(e=>(e.CURRENT_USER="CURRENT_USER",e.USER="USER",e.MY_GROUP="MY_GROUP",e.DISCOVER="DISCOVER",e.NOTIFICATIONS="NOTIFICATIONS",e))(pf||{});function X_(e,t){return e.findIndex((e=>e.id===t))}function SH(e,t){return e.startTime<t.startTime?-1:e.startTime>t.startTime?1:e.id<t.id?-1:e.id>t.id?1:0}const xYe=e=>`${e.startTime}|${e.id}`;function EH(e,t){return da.sortedIndexBy(xYe,t,e)}function kj(e,t,r){if(-1!==X_(e.items,t.id))return;if(0===e.items.length)return void e.items.push(t);const n=SH(t,e.items.at(-1))>0;if(e.items.length%r==0&&n)return void(e.enableNextPageFetch=!0);const a=EH(e.items,t);e.items.splice(a,0,t),(e.items.length-1)%r==0&&(e.items.pop(),e.enableNextPageFetch=!0)}function xj(e,t,r){const{id:n,patch:a,override:o}=t,i=X_(e.items,n);if(-1===i)return;const s=e.items.length,l=e.items[i],c=o?a:da.merge(l,a);if(1===s)return void(e.items[i]=c);if(l.startTime===c.startTime)return void(e.items[i]=c);e.items.splice(i,1);if(SH(c,e.items.at(-1))>0&&s%r==0)return void(e.enableNextPageFetch=!0);const u=EH(e.items,c);e.items.splice(u,0,c)}const SYe={configs:{scope:null,scopeProps:null,queryArgs:null},items:[],filters:null,enableNextPageFetch:!1},Mw=25,$y=ur({name:"events",initialState:SYe,reducers:{setConfigs:(e,t)=>{e.configs=t.payload,e.filters=null,e.items=[]},resetConfigs:e=>{e.configs={scope:null,scopeProps:null,queryArgs:null},e.filters=null,e.items=[]},setFilters:(e,t)=>{e.filters=t.payload},toggleFilters:(e,t)=>{const{filterKey:r}=t.payload;e.filters={...e.filters,[r]:!lo.get(e.filters,r)}},setEnableNextPageFetch:(e,t)=>{e.enableNextPageFetch=t.payload},addEvents:(e,t)=>{const{scope:r,events:n,isNewList:a}=t.payload;e.configs.scope===r&&(a?e.items=n:e.items.push(...n))},addEvent:(e,t)=>{const{event:r}=t.payload;kj(e,r,25)},updateEvent:(e,t)=>{xj(e,t.payload,25)},syncEvent:(e,t)=>{const{event:r}=t.payload;-1===X_(e.items,r.id)?kj(e,r,25):xj(e,{id:r.id,patch:r,override:!0},25)},deleteEvent:(e,t)=>{const{eventId:r}=t.payload,n=X_(e.items,r);-1!==n&&e.items.splice(n,1)}},selectors:{selectConfigs:e=>e.configs,selectScope:e=>e.configs.scope,selectItems:e=>e.items,selectFilters:e=>e.filters,selectEnableNextPageFetch:e=>e.enableNextPageFetch}}).injectInto(Tp),EYe=(e,t)=>{kT().dispatch(CH.util.updateQueryData("getApiV1EventsByEventId",{eventId:e},(r=>{if(e===(null==r?void 0:r.id)){const e="function"==typeof t?t(r):t;return da.merge(r,e)}})))},CH=lr.enhanceEndpoints({endpoints:{getApiV1Events:{forceRefetch:()=>!0,async onQueryStarted(e,{dispatch:t,getState:r,queryFulfilled:n}){const a=r().events.configs.scope;try{const r=await n;a&&t($y.actions.addEvents({scope:a,events:r.data,isNewList:0===e.offset}))}catch(e){Lt.error(`Failed to fetch events ${wr(e)}`)}}},getApiV1EventsMy:{forceRefetch:()=>!0,async onQueryStarted(e,{dispatch:t,getState:r,queryFulfilled:n}){const a=r().events.configs.scope;try{const r=await n;a&&t($y.actions.addEvents({scope:a,events:r.data,isNewList:0===e.offset}))}catch(e){Lt.error(`Failed to fetch events ${wr(e)}`)}}},getApiV1EventsFollowing:{forceRefetch:()=>!0,async onQueryStarted(e,{dispatch:t,queryFulfilled:r}){try{const n=await r;t($y.actions.addEvents({scope:pf.DISCOVER,events:n.data,isNewList:0===e.offset}))}catch(e){Lt.error(`Failed to fetch events ${wr(e)}`)}}},getApiV1EventsByEventId:{providesTags:(e,t,{eventId:r})=>[{type:"Event",id:r}],extraOptions:{maxRetries:1},serializeQueryArgs:({endpointName:e,queryArgs:t})=>({endpointName:e,eventId:t.eventId}),async onQueryStarted(e,{queryFulfilled:t}){await mt(t)}},postApiV1Events:{async onQueryStarted(e,{queryFulfilled:t}){await mt(t,"Event created")}},putApiV1EventsByEventId:{async onQueryStarted(e,{queryFulfilled:t}){await mt(t,"Event updated")}},deleteApiV1EventsByEventId:{async onQueryStarted(e,{queryFulfilled:t}){await mt(t,"Event deleted")}},postApiV1EventsByEventIdCancel:{async onQueryStarted(e,{queryFulfilled:t}){await mt(t,"Event cancelled")}},postApiV1EventsByEventIdAccept:{async onQueryStarted(e,{queryFulfilled:t}){await mt(t)}},postApiV1EventsByEventIdReject:{async onQueryStarted(e,{queryFulfilled:t}){await mt(t)}},postApiV1EventsByEventIdMaybe:{async onQueryStarted(e,{queryFulfilled:t}){await mt(t)}},postApiV1EventsByEventIdJoin:{async onQueryStarted(e,{queryFulfilled:t}){await mt(t)}},postApiV1EventsByEventIdInterested:{async onQueryStarted(e,{queryFulfilled:t}){await mt(t)}},deleteApiV1EventsByEventIdJoinOrInterested:{async onQueryStarted(e,{queryFulfilled:t}){await mt(t)}},postApiV1EventsByEventIdTranslate:{async onQueryStarted(e,{dispatch:t,queryFulfilled:r}){const n=await mt(r),a=null==n?void 0:n.data;if(a){const r={translation:a};t($y.actions.updateEvent({id:e.eventId,patch:r})),EYe(e.eventId,r)}}},getApiV1EventsByEventIdAttendees:{providesTags:(e,t,{eventId:r})=>[{type:"EventAttendees",id:r}],async onQueryStarted(e,{queryFulfilled:t}){await mt(t)}},getApiV1EventsByEventIdMutual:{providesTags:(e,t,{eventId:r})=>[{type:"EventMutualAttendees",id:r}],async onQueryStarted(e,{queryFulfilled:t}){await mt(t)}},getApiV1EventsSettings:{async onQueryStarted(e,{queryFulfilled:t}){await mt(t)}},postApiV1EventsSettingsUpdate:{async onQueryStarted(e,{dispatch:t,queryFulfilled:r}){try{const n=await r;t(lr.util.updateQueryData("getApiV1EventsSettings",lo.omit(e,"updateEventsSettings"),(e=>{Object.assign(e,da.merge(e,n.data))})))}catch(e){Lt.error(`Failed to update settings ${wr(e)}`)}}},postApiV1EventsSettingsRegeneratePrivateId:{async onQueryStarted(e,{dispatch:t,queryFulfilled:r}){try{const n=await r;t(lr.util.updateQueryData("getApiV1EventsSettings",e,(e=>{var t;e.exportPrivateCalendarUniqueId=null==(t=null==n?void 0:n.data)?void 0:t.slice(1,-1)})))}catch(e){Lt.error(`Failed to regenerate URL ${wr(e)}`)}}}}}),{useLazyGetApiV1EventsQuery:Sj,useLazyGetApiV1EventsMyQuery:Ej,useLazyGetApiV1EventsFollowingQuery:CYe,useGetApiV1EventsByEventIdQuery:sit,usePostApiV1EventsMutation:iit,usePutApiV1EventsByEventIdMutation:cit,useDeleteApiV1EventsByEventIdMutation:lit,usePostApiV1EventsByEventIdCancelMutation:uit,usePostApiV1EventsByEventIdAcceptMutation:IH,usePostApiV1EventsByEventIdRejectMutation:AH,usePostApiV1EventsByEventIdMaybeMutation:RH,usePostApiV1EventsByEventIdJoinMutation:IYe,usePostApiV1EventsByEventIdInterestedMutation:AYe,useDeleteApiV1EventsByEventIdJoinOrInterestedMutation:RYe,usePostApiV1EventsByEventIdTranslateMutation:TYe,useGetApiV1EventsByEventIdAttendeesQuery:PYe,useGetApiV1EventsByEventIdMutualQuery:$Ye,useGetApiV1EventsSettingsQuery:fit,usePostApiV1EventsSettingsUpdateMutation:dit,usePostApiV1EventsSettingsRegeneratePrivateIdMutation:pit}=CH,zYe=Ki("flex items-center py-xxs px-xs rounded-m text-sm font-medium gap-xxxs",{variants:{color:{red:"bg-red_100 text-white",default:"bg-white text-gray-900"}},defaultVariants:{color:"default"}}),MYe=({color:e,className:t,children:r})=>E.jsx("span",{className:he(zYe({color:e}),t),children:r}),I9=Object.freeze({PUBLIC:{key:"PUBLIC",title:"Public",description:"Anyone can attend",icon:iZ},UNLISTED:{key:"UNLISTED",title:"Unlisted",description:"Only followers can attend",icon:bZ},DIRECT:{key:"DIRECT",title:"Invite-only",description:"Only invited attendees can attend",icon:kZ}}),OYe=Object.freeze(Object.keys(I9)),NYe=Object.freeze(Object.values(I9)),DYe=()=>E.jsx("svg",{className:"size-[16px] text-gray-400",viewBox:"0 0 24 24",children:E.jsx("circle",{cx:"12",cy:"12",r:"9",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"butt",strokeLinejoin:"miter",strokeDasharray:"3.5 3.5"})}),jYe={JOINED:{color:"--green_100",icon:tv,label:"Going"},JOINED_TENTATIVELY:{color:"--yellow_100",icon:IA,label:"Maybe going"},REJECTED:{color:"--red-dark",icon:nv,label:"Not going"},INVITED:{color:"--gray-400",icon:DYe,label:"Not responded"}},Cj={joins:{label:"Going",icon:LC},interests:{label:"Interested",icon:n7}};function LYe(e){if(!e)throw new Error("Missing uri");const t=new URL(e),r=t.pathname.split("/").filter(Boolean);if(0===r.length)throw new Error("No username found");return{domain:t.hostname,username:r.at(-1)}}function VYe(e,{delay:t}={}){const r=g.useRef(e);g.useLayoutEffect((()=>{r.current=e}),[e]),g.useEffect((()=>{if("number"!=typeof t)return;const e=setInterval((()=>{r.current()}),t);return()=>{clearInterval(e)}}),[t])}const Ij=(e,t)=>{const r=1e3*(60*(new Date).getTimezoneOffset()+t);return new Date(e.getTime()+r)};function Ow(e,t){return new Intl.DateTimeFormat("en-US",t).format(e)}function Aj(e){return new Intl.DateTimeFormat("en-US",{hour:"numeric",minute:"numeric"}).format(e)}function BYe(e){const t=e/3600;return`GMT${t>=0?"+":"-"}${Math.abs(Math.trunc(t))}`}function Rj(e,t){const[r,n]=t.split(":").map(Number),a=new Date(e);return a.setHours(r,n,0,0),a}function yC(e){const t=new Date(e),r=new Date,n=t.getTime()-r.getTime();if(n<=0)return;const a=Math.ceil(n/6e4),o=Math.floor(a/1440),i=Math.floor(a%1440/60),s=a%60;return o>=4||o>=1&&0===i?`${o}d`:o>=1?`${o}d ${i}h`:i>=1&&0===s?`${i}h`:i>=1?`${i}h ${s}m`:`${s}m`}function FYe(){const e=new Date;return e.setDate(e.getDate()+1),e.setHours(0,0,0,0),e}const Tj=da.memoize((({startDate:e,endDate:t,monthFormat:r="short"})=>{const n=new Date,a=new Intl.DateTimeFormat("en-US",{year:"numeric"}).format(n),o=Ow(e,{year:"numeric"}),i=Ow(e,{day:"numeric",month:r,...a!==o&&{year:"numeric"}}),s=Aj(e);if(!t)return{startDateStr:i,startTimeStr:s,endDateStr:void 0,endTimeStr:void 0};const l=Ow(t,{year:"numeric"}),c=Ow(t,{day:"numeric",month:r,...a!==l&&{year:"numeric"}});return{startDateStr:i,startTimeStr:s,endDateStr:i!==c?c:void 0,endTimeStr:Aj(t)}})),UYe=da.memoize((({startTime:e,endTime:t,timeZoneOffsetSeconds:r,monthFormat:n="short"})=>{const a=r!==60*-(new Date).getTimezoneOffset(),o=a?BYe(r):void 0,i=new Date(e),s=t?new Date(t):null;let l;return a&&(l={gmtStr:o,...Tj({startDate:Ij(i,r),endDate:s&&Ij(s,r),monthFormat:n})}),[Tj({startDate:i,endDate:s,monthFormat:n}),l]})),GYe=e=>g.useMemo((()=>UYe(e)),[e]),qYe=({startTime:e,enabled:t})=>{const[r,n]=g.useState(yC(e));return g.useEffect((()=>{n(yC(e))}),[e]),VYe((()=>{0===(new Date).getUTCSeconds()&&n(yC(e))}),{delay:t&&r?1e3:null}),r},WYe=({event:e,withActiveTimer:t,openEventDialog:r,openCancelDialog:n})=>{const{user:a}=Lm(),[o,{isLoading:i}]=IH(),[s,{isLoading:l}]=AH(),[c,{isLoading:u}]=RH(),[f,{isLoading:d}]=IYe(),[p,{isLoading:h}]=AYe(),[g,{isLoading:m}]=RYe(),{id:y,organizer:v,privacy:b,status:w,startTime:_,attendeeStatus:k}=e,x=(null==a?void 0:a.id)===v.id,A="PUBLIC"===b,S="DIRECT"===b,C="CANCELLED"===w,{icon:z,title:I}=I9[b],j=qYe({startTime:_,enabled:t}),P=!j,T=!x&&S&&!C&&!P,R=!x&&A&&!C&&!P;let N=[],O=[];if(x&&(N=[{name:"Edit",icon:E.jsx(TZ,{}),handler:()=>r({event:e}),isHidden:C||P},{name:"Cancel",icon:E.jsx(WZ,{}),handler:()=>n({event:e}),isHidden:C||P},{name:"Copy as new",icon:E.jsx(nZ,{}),handler:()=>r({event:e,copyAsNew:!0})}].filter((e=>!e.isHidden))),T){const e=i||l||u;O=[{name:"Yes",value:"JOINED",icon:tv,isSelected:"JOINED"===k,handler:()=>{"JOINED"!==k&&o({eventId:y})},disabled:e},{name:"No",value:"REJECTED",icon:nv,isSelected:"REJECTED"===k,handler:()=>{"REJECTED"!==k&&s({eventId:y})},disabled:e},{name:"Maybe",value:"JOINED_TENTATIVELY",icon:IA,isSelected:"JOINED_TENTATIVELY"===k,handler:()=>{"JOINED_TENTATIVELY"!==k&&c({eventId:y})},disabled:e}]}if(R){const e=d||h||m,t={JOINED:"Not going",JOINED_TENTATIVELY:"Not interested"};O=[{name:"Interested",value:"JOINED_TENTATIVELY",icon:n7,isSelected:"JOINED_TENTATIVELY"===k,handler:()=>{"JOINED_TENTATIVELY"!==k&&p({eventId:y})},disabled:e},{name:"Going",value:"JOINED",icon:tv,isSelected:"JOINED"===k,handler:()=>{"JOINED"!==k&&f({eventId:y})},disabled:e}],k&&O.push({name:t[k],icon:nv,handler:()=>{k&&g({eventId:y})},disabled:e})}return{isOrganizer:x,isInviteOnly:S,isPublic:A,isCancelled:C,startingIn:j,isInPast:P,organizerActions:N,attendeeActions:O,coverBadges:E.jsx("div",{className:"absolute bottom-xs left-xs",children:S&&E.jsxs(MYe,{children:[E.jsx(z,{size:16})," ",I]})})}},HYe=({className:e,isShowingTranslation:t,isLoading:r,onTranslate:n,onShowOriginal:a})=>{const o=xT();return E.jsx("div",{className:he("text-base text-gray-500",e),children:t?E.jsxs("div",{className:"flex content-center items-center gap-[2px]",children:[E.jsx("button",{onClick:a,"data-prevent":"true",className:"hover:text-gray-700",children:"See the original"}),E.jsx(r_,{size:14}),E.jsx("button",{"aria-label":"Settings","data-prevent":"true","data-testid":"settings-button",className:"hover:text-gray-700",onClick:()=>{o("/settings/languages")},children:E.jsx(jZ,{size:18,className:"pointer-events-none"})})]}):E.jsx("button",{"data-prevent":"true",onClick:()=>{n()},children:r?"Translating...":"Translate"})})},QYe=e=>{const[t,r]=g.useState(!1),{preferredLanguage:n,checkIfTranslatable:a}=dH(),o=null==e?void 0:e.lang,i=null==e?void 0:e.translation,s=a(o),[l,{isLoading:c}]=TYe();g.useEffect((()=>{i||r(!1)}),[i]);return{name:t&&(null==i?void 0:i.name)||e.name,descriptionHtml:t&&(null==i?void 0:i.descriptionHtml)||e.descriptionHtml,TranslationControls:s&&E.jsx(HYe,{isShowingTranslation:t,isLoading:c,onTranslate:async()=>{if(i)r(!0);else try{await l({eventId:e.id,lang:n}).unwrap()&&r(!0)}catch{Aa.error("Failed to translate event")}},onShowOriginal:()=>r(!1)})}},YYe=g.createContext({}),KYe=()=>{const e=g.useContext(YYe);if(!e)throw new Error("useEventsContext must be used within an EventsContextProvider");return e},mb="/:username/events",A9="/g/:groupname/events",XYe=mb,ZYe=`${mb}/settings`,JYe=`${mb}/discover`,eKe=`${mb}/notifications`,tKe=`${mb}/:eventId`,nKe=A9,rKe=`${A9}/settings`,aKe=`${A9}/:eventId`,Pj={user:{event:tKe,list:XYe,settings:ZYe,discover:JYe,notifications:eKe},group:{event:aKe,list:nKe,settings:rKe}},oKe=()=>{const{scope:e,scopeProps:t}=en($y.selectors.selectConfigs),{user:r}=Lm(),n=r?ho(r):"";return g.useCallback((r=>{const{to:a,useFromScope:o,routeProps:i}=r;if(null!=o&&o.includes("group")&&e===pf.MY_GROUP)return k5(Pj.group[a],{groupname:t.group.groupName,...i&&{...lo.omit(i,"username")}});let s=n;return null!=o&&o.includes("user")&&e===pf.USER&&(s=`@${t.username}`),k5(Pj.user[a],{username:s,...i&&{...lo.omit(i,"groupname")}})}),[e,t,n])};function sKe(e,t){let r,n="";try{if(e)null!=e&&e.displayName?(n=e.displayName,r=ho(e).toLowerCase()):n=e.username.toLowerCase();else{const e=LYe(t);n=e.username,r=`@${e.username}@${e.domain}`.toLowerCase()}return{name:n,fullUsername:r}}catch{return{name:"Unknown user"}}}const sA=({uri:e,user:t,status:r,size:n,isAvatar:a})=>{const{user:o}=Lm(),i=en(J2.selectors.selectEmojis),{name:s,fullUsername:l}=g.useMemo((()=>sKe(t,e)),[t,e]),{icon:c,color:u,label:f}=r?jYe[r]:{},d=E.jsx(zp,{size:n,name:DI(s,i),imgUrl:t1({user:t,type:"avatar"})});return a?d:E.jsxs("div",{className:"flex flex-1 items-center gap-xs overflow-hidden",children:[E.jsx(vm,{theme:"dark",size:"small",triggerClassname:"cursor-pointer",tooltipText:f||"",triggerProps:{asChild:!0},children:E.jsxs("div",{className:"relative",children:[d,c&&E.jsx("div",{className:"absolute bottom-none right-none rounded-full bg-white [transform:translate(12%,12%)]",children:E.jsx(c,{size:16,fill:`var(${u})`,color:"var(--base_white_100)",className:"[&>circle]:stroke-0"})})]})}),E.jsxs("div",{className:"flex flex-col items-start gap-xxxs overflow-hidden text-base",children:[E.jsxs("p",{className:"max-w-full overflow-hidden text-ellipsis font-medium text-gray-900",children:[s," ",(null==o?void 0:o.id)===(null==t?void 0:t.id)?"(You)":""]}),l&&E.jsx("p",{className:"max-w-full overflow-hidden text-ellipsis whitespace-nowrap font-normal text-gray-500",children:l})]})]})},iKe=(e,t)=>{const r=g.useRef(t);g.useEffect((()=>{r.current=t}),[t]);zU(null!==document.ontouchstart?"mousedown":"touchstart",(({target:t})=>{!e.current||e.current.contains(t)||r.current(t)}),document.body)};function cKe({value:e,inputValue:t,onChange:r,onBlur:n,onInputChange:a=lo.noop,name:o,icon:i,placeholder:s="Search...",options:l=[],minChars:c=3,debounceMs:u=300,disabled:f,isLoading:d=!1,getOptionKey:p,getOptionLabel:h,renderOption:m,className:y="",inputClassName:v="",disableClearable:b,...w},_){const k=g.useRef(null),[x,A]=g.useState(!1),[S,C]=g.useState(!1),z=g.useMemo((()=>t||(e?h(e):"")),[e,t,h]),[I,j]=g.useState(z);iKe(k,(function(){A(!1),j(z)})),g.useEffect((()=>{j(z)}),[z]);const P=g.useMemo((()=>Nhe(u)(a)),[u,a]);function T(){j(""),A(!1),r&&r(null)}return E.jsxs(hR,{className:he("relative h-auto overflow-visible",y),shouldFilter:!1,ref:k,children:[E.jsxs("div",{children:[E.jsx(Y0,{ref:_,"data-testid":`search-${o}`,value:I,disabled:f,placeholder:s,className:he(v,!!i&&"pl-11"),onChange:e=>{const t=e.target.value;j(t),t.length>=c?(A(!0),P(t)):""===t&&(b||T())},onFocus:()=>C(!0),onBlur:e=>{null==n||n(e),C(!1)},...w}),E.jsx(zUe,{icon:i,disabled:f,isFocused:S,isFilled:!!e}),!b&&(e||t)&&E.jsx(Gn,{variant:"none",size:"none",type:"button",className:"px-xs absolute right-0 top-1/2 h-full -translate-y-1/2 text-gray-500 hover:text-gray-700",onClick:()=>T(),"data-testid":"autocomplete-clear-button",children:E.jsx(jv,{className:"size-5 rounded-full bg-white p-[2px]"})})]}),E.jsx(mR,{className:he("z-100 p-xxs rounded-m absolute top-full max-h-48 w-full border bg-white",{hidden:!x}),children:x&&E.jsxs(E.Fragment,{children:[E.jsx(ZL,{children:d?E.jsx(vf,{size:20,className:"mx-auto flex-shrink-0 animate-spin"}):I&&"No results found"}),!d&&(null==l?void 0:l.map((e=>E.jsx(gR,{className:"!rounded-m max-w-full cursor-pointer",onSelect:()=>(e=>{const t=h(e);j(t),A(!1),r&&r(e)})(e),value:p(e),children:m?m(e):h(e)},p(e)))))]})})]})}const lKe=g.forwardRef(cKe),uKe=(e,t)=>{if(!t||t.length<3)return e;const r=e.toLowerCase().indexOf(t.trim().toLowerCase());if(-1===r)return e;const n=e.substring(0,r),a=e.substring(r,r+t.length),o=e.substring(r+t.length);return E.jsxs(E.Fragment,{children:[n,E.jsx("span",{className:"bg-amber-300",children:a}),o]})},fKe=g.forwardRef((({value:e,onChange:t,name:r,...n},a)=>{const[o,i]=g.useState((null==e?void 0:e.formatted)||(null==e?void 0:e.name)||""),{isEnabled:s,isSettingsReady:l,preferredLanguage:c}=dH(),{data:u=[],isLoading:f,isFetching:d}=cX({text:o,...s&&{lang:null==c?void 0:c.toUpperCase()}},{skip:!o||o.length<3||s&&!l});return E.jsxs(Jv,{className:"mt-none space-y-xxs",children:[E.jsx(B2,{children:"Location"}),E.jsx(JR,{children:E.jsx(lKe,{ref:a,name:r,value:e||void 0,onChange:e=>{t(e)},onInputChange:e=>{i(e)},placeholder:"Add event location","data-testid":"address-field",icon:E.jsx(J8,{size:20}),options:u,isLoading:f||d,getOptionKey:e=>e.placeId+e.formatted,getOptionLabel:e=>e.formatted,renderOption:e=>E.jsx("div",{className:"p-xxs",children:E.jsx("span",{className:"text-sm font-medium",children:uKe(e.formatted,o)})}),...n})}),E.jsx(eb,{})]})}));fKe.displayName="AddressField";const dKe=g.forwardRef((({isEdit:e,onChange:t,...r},n)=>E.jsxs(Jv,{className:"mt-none space-y-xxs",children:[E.jsx(B2,{children:"Who can join?"}),E.jsx(vm,{theme:"dark",size:"small",triggerClassname:"w-full",tooltipText:e?"Event visibility can not be changed":"",triggerProps:{asChild:!0},children:E.jsx("div",{children:E.jsxs(eT,{onValueChange:t||lo.noop,...r,children:[E.jsx(tT,{ref:n,className:"w-full text-base",children:E.jsx(EF,{placeholder:"Select visibility"})}),E.jsx(nT,{children:NYe.map((({icon:e,...t})=>E.jsx(xF,{value:t.key,children:E.jsxs("div",{className:"flex items-center gap-xxs px-xxs",children:[E.jsx(e,{size:20}),E.jsxs("div",{className:"flex flex-col items-start",children:[E.jsx("span",{className:"font-medium text-gray-900",children:t.title}),E.jsx("span",{className:" text-gray-500",children:t.description})]})]})},t.key)))})]})})}),E.jsx(eb,{})]})));dKe.displayName="PrivacyField";const pKe=(e,t)=>{const r=g.useRef(!1);g.useEffect((()=>{r.current?e():r.current=!0}),t)},hKe=(e,t,r)=>{const n=g.useRef(e);n.current=e;const a=g.useRef(lo.debounce(((...e)=>n.current(...e)),t,r));return g.useEffect((()=>()=>{a.current.cancel()}),[]),a.current},mKe=(e,t)=>{const[r,n]=g.useState(e),a=hKe(n,t);return pKe((()=>{a(e)}),[e]),r},$j=({attendees:e,loading:t,disabled:r,onRemove:n,loadingAttendeeId:a,hideStatusIcons:o,className:i})=>{const s=!r&&!!n;return t?E.jsx(vf,{className:"m-auto animate-spin",size:"24"}):E.jsx(E.Fragment,{children:e.length?E.jsx("div",{className:he("flex w-full flex-col gap-xs",i),children:e.map((e=>E.jsx("div",{className:"flex items-center gap-xxs overflow-hidden",children:e.user?E.jsxs(E.Fragment,{children:[E.jsx(sA,{user:e.user,status:o?void 0:e.status}),e.user.id===a?E.jsx(vf,{size:16,className:"flex-shrink-0 animate-spin"}):s&&E.jsx(nv,{className:"flex-shrink-0 cursor-pointer",size:16,onPointerDown:e=>e.stopPropagation(),onClick:t=>{t.stopPropagation(),n(e.user)}})]}):E.jsx(sA,{uri:e.uri,status:o?void 0:e.status})},e.uri)))}):E.jsx("span",{className:"text-base font-normal text-muted-foreground",children:r?"No attendees":"Select attendees"})})},zj="!h-auto min-h-xxxl w-full [&>div]:max-w-full",TH=g.forwardRef((({readOnly:e,isEdit:t,eventId:r,onChange:n,className:a,hasAttendees:o,...i},s)=>{const l=g.useRef(null),[c,u]=g.useState(""),f=mKe(c,300),[d,p]=g.useState([]),h=g.useMemo((()=>d.reduce(((e,t)=>null!=t&&t.user?[...e,t.user.id]:e),[])),[d]),{user:m}=Lm(),{data:y,isLoading:v,isFetching:b}=SA({q:f,filter:["users"]},{skip:!f}),w=v||b,_=(null==y?void 0:y.users)||[],{data:k,isLoading:x}=PYe({eventId:r||""},{skip:!(e||r&&o)}),A=x,[S,{isLoading:C,originalArgs:z}]=dX(),[I,{isLoading:j,originalArgs:P}]=fX(),T=g.useMemo((()=>C?null==z?void 0:z.userId:j?null==P?void 0:P.userId:void 0),[C,j,null==z?void 0:z.userId,null==P?void 0:P.userId]);g.useEffect((()=>{!function(){if(k&&(p(k),n)){const e=k.filter((e=>!!e.user)).map((e=>e.user.id));n(e)}}()}),[k]);const R=async e=>{const a=h.includes(e.id);t&&(a?await I({eventId:r,userId:e.id}):S({eventId:r,userId:e.id}));const o=a?d.filter((t=>{var r;return(null==(r=null==t?void 0:t.user)?void 0:r.id)!==e.id})):[...d,{uri:e.uri,user:e,status:"INVITED"}];if(p(o),!t){const e=o.map((e=>e.user.id));null==n||n(e)}};return e?E.jsx("div",{className:he("flex items-center justify-between",zj,a),children:E.jsx($j,{attendees:d,loading:A,disabled:!0})}):E.jsxs(eT,{...i,onOpenChange:e=>{e&&l.current&&setTimeout((()=>{var e;null==(e=l.current)||e.focus()}),0)},children:[E.jsx(tT,{ref:s,className:he(zj,a),children:E.jsx($j,{attendees:d,loading:A,disabled:null==i?void 0:i.disabled,onRemove:e=>{R(e)},loadingAttendeeId:T,hideStatusIcons:!t,className:"p-xs"})}),E.jsxs(nT,{className:"h-[350px] p-none",children:[E.jsx(yF,{className:"px-none",children:E.jsx("div",{className:"flex items-center gap-2",children:E.jsx(Y0,{ref:l,placeholder:"Search...",value:c,onChange:e=>u(e.target.value)})})}),E.jsx(SF,{className:"flex-1",children:w?E.jsx("div",{className:"flex h-full items-center justify-center",children:E.jsx(vf,{size:20,className:"animate-spin"})}):E.jsxs(E.Fragment,{children:[!(null!=_&&_.length)&&c&&E.jsx("div",{className:"flex h-full items-center justify-center",children:E.jsx("span",{className:"text-sm",children:"No users found"})}),_.map((e=>{if(e.id===(null==m?void 0:m.id))return null;const t=h.includes(e.id);return E.jsx(gF,{value:e.id,isSelected:t,isLoading:e.id===T,onSelect:()=>{R(e)},className:he({"pointer-events-none":T}),children:E.jsx(sA,{user:e})},e.id)}))]})}),E.jsx(vF,{className:"flex justify-end",children:E.jsxs("span",{className:"text-sm text-gray-600",children:[d.length," selected"]})})]})]})}));TH.displayName="AttendeesField";const PH=({src:e,alt:t,ratio:r=1,className:n,children:a,...o})=>E.jsxs("div",{className:he("width-full relative",n),style:{paddingBottom:100/r+"%"},...o,children:[E.jsx("div",{className:"inset-none absolute rounded-[inherit]",children:e&&E.jsx("img",{className:"h-full w-full rounded-[inherit] object-cover",src:e,alt:t})}),a]}),$H=g.forwardRef((({accept:e,children:t,className:r,onDelete:n,onChange:a,disabled:o},i)=>{const s=null!=t&&t.toString().includes("Cover")?"changeCover":"changeAvatar",l={variant:"secondary",size:"s",...o?{disabled:!0}:{as:"label"}};return E.jsxs("div",{"data-testid":s,className:he("my-xxs flex cursor-pointer items-center gap-xxs md:my-none",r),children:[E.jsxs(Gn,{...l,className:"cursor-pointer",children:[t,E.jsx(vv,{ref:i,accept:e,onChange:a})]}),n&&E.jsx(Gn,{type:"button","data-testid":"delete",variant:"secondary",size:"icon_m",className:"rounded-m",onClick:n,disabled:o,children:E.jsx(r7,{size:20})})]})}));$H.displayName="ChangeEventImg";const gKe=e=>{var t,r;return{preview:(null==(r=null==(t=null==e?void 0:e.files)?void 0:t[0])?void 0:r.uri)||void 0,uploadId:null==e?void 0:e.uploadId}},yKe=g.forwardRef((({value:e,onChange:t},r)=>{const[n,a]=g.useState((()=>gKe(e))),[o,i]=g.useState(!1),s=async([e])=>{const r=n.preview;i(!0),a((t=>({...t,preview:e.objectUrl})));try{const r=(async e=>{const t=await d({media:e,tag:Qq.post});if(!t)throw new Error("Upload failed");return t})(e);t(r);const n=await r;t(n),a((e=>({...e,uploadId:n})))}catch(e){a((e=>({...e,preview:r}))),Aa.error("Error uploading image:",e)}finally{i(!1)}},{sizes:l,preview:c,acceptList:u,isModalOpen:f,uploadFile:d,handleSave:p,handleClose:h,handleUpload:m,handleFileChange:y}=YBe((e=>{s(e)})),v=!!n.preview;return E.jsxs(E.Fragment,{children:[E.jsxs(Jv,{className:"mt-none space-y-xxs",children:[E.jsxs(PH,{src:n.preview,"data-testid":"event-image-preview",className:he("rounded-xl",{"opacity-50":o}),children:[!v&&E.jsx("svg",{className:"pointer-events-none absolute inset-0 size-full text-gray-300",children:E.jsx("rect",{x:"1%",y:"1%",width:"98%",height:"98%",rx:"20",ry:"20",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeDasharray:"8 8"})}),E.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center gap-s",children:[!v&&E.jsx(Z8,{size:40,className:"text-gray-700"}),E.jsxs($H,{ref:r,accept:u,disabled:o,onChange:e=>{m(e)},...v&&{onDelete:()=>(a({preview:"",uploadId:void 0}),void t(null))},children:[v?"Change":"Upload"," image"]})]}),o&&E.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:E.jsx(vf,{size:24,className:"animate-spin"})})]}),E.jsx(eb,{})]}),E.jsx(mFe,{title:"Crop image",sizes:l,open:f,accept:u,preview:c,onSave:p,onChange:e=>{y(e)},onClose:h,aspect:1,children:"Change cover"})]})}));yKe.displayName="EventImageField";const vKe=["CONFIRMED","CANCELLED"],zH="Pick a date",Mj=/^\d{2}:\d{2}$/,Xw="Pick a time",Oj=512,Nj=5e3,MH=Ke.object({name:Ke.string().min(1,{message:"Event name is required"}).max(Oj,{message:"Event name must be at most 512 characters"}),description:Ke.string().max(Nj,{message:"Description must be at most 5000 characters"}).nullable().optional(),startDate:Ke.preprocess((e=>e||void 0),Ke.date({required_error:zH})),startTime:Ke.preprocess((e=>e||void 0),Ke.string({required_error:Xw}).regex(Mj,{message:Xw})),endDate:Ke.date().nullable(),endTime:Ke.string().regex(Mj,{message:Xw}).nullable(),_includeEndDate:Ke.boolean(),ianaTimeZone:Ke.string().min(1,{message:"Time zone must be selected"}),url:Ke.string().url().or(Ke.literal("")).nullable().optional(),imageId:Ke.union([Ke.string(),Ke.promise(Ke.string())]).nullable().optional(),address:Ke.object({formatted:Ke.string(),name:Ke.string().nullable().optional(),country:Ke.string().nullable().optional(),countryCode:Ke.string().nullable().optional(),region:Ke.string().nullable().optional(),regionCode:Ke.string().nullable().optional(),subRegion:Ke.string().nullable().optional(),locality:Ke.string().nullable().optional(),street:Ke.string().nullable().optional(),postalCode:Ke.string().nullable().optional(),houseNumber:Ke.string().nullable().optional(),longitude:Ke.number().nullable().optional(),latitude:Ke.number().nullable().optional(),timeZone:Ke.string().nullable().optional(),plusCode:Ke.string().nullable().optional(),serviceId:Ke.string().nullable().optional(),placeId:Ke.string().nullable().optional()}).nullable().optional()}),OH=(e,t)=>{const r=Date.now(),n=Rj(e.startDate,e.startTime).getTime();if((isNaN(n)||n<=r)&&(t.addIssue({code:Ke.ZodIssueCode.custom,path:["startDate"],message:"Must be in the future"}),t.addIssue({code:Ke.ZodIssueCode.custom,path:["startTime"],message:""})),e._includeEndDate)if(e.endDate)if(e.endTime){const r=Rj(e.endDate,e.endTime).getTime();(isNaN(r)||r<=n)&&(t.addIssue({code:Ke.ZodIssueCode.custom,path:["endDate"],message:"End time must be later than start time"}),t.addIssue({code:Ke.ZodIssueCode.custom,path:["endTime"],message:""}))}else t.addIssue({code:Ke.ZodIssueCode.custom,path:["endTime"],message:Xw});else t.addIssue({code:Ke.ZodIssueCode.custom,path:["endDate"],message:zH})};MH.extend({groupId:Ke.string().optional(),status:Ke.enum(vKe,{required_error:"Status is required",invalid_type_error:"Invalid status selected"}),privacy:Ke.enum(OYe,{required_error:"Privacy setting is required",invalid_type_error:"Invalid privacy choice"}),invitees:Ke.array(Ke.string()).optional()}).superRefine(OH),MH.superRefine(OH),FYe(),Intl.DateTimeFormat().resolvedOptions().timeZone;const bKe=({address:e})=>{const t=(null==e?void 0:e.formatted)||(null==e?void 0:e.name)||"Unnamed address";return null!=e&&e.latitude&&null!=e&&e.longitude?E.jsx(Wi,{to:`https://www.google.com/maps/place/${e.latitude},${e.longitude}`,target:"_blank",rel:"noopener noreferrer",className:"hover:underline",children:t}):E.jsx("span",{children:t})},Dj=({startDateStr:e,startTimeStr:t,endDateStr:r,endTimeStr:n,gmtStr:a})=>E.jsxs("span",{className:"[&_svg]:inline [&_svg]:align-sub",children:[a&&E.jsx(E.Fragment,{children:"Time at location "}),E.jsxs(E.Fragment,{children:[e,E.jsx(r_,{size:16}),t]}),n&&E.jsxs(E.Fragment,{children:[E.jsx(e7,{size:16,className:"mx-xxxs"}),r,r&&E.jsx(r_,{size:16}),n]}),a&&E.jsxs(E.Fragment,{children:[" (",a,")"]})]}),NH=({className:e,...t})=>{const[r,n]=GYe(t);return E.jsxs("span",{className:e,children:[E.jsx(Dj,{...r}),n&&E.jsx(vm,{theme:"dark",size:"small",tooltipText:E.jsx(Dj,{...n}),triggerClassname:"inline ml-xxxs align-sub",side:"bottom",children:E.jsx(UX,{size:16})})]})};NH.displayName="DateTimeDisplay";const wKe=(e,t)=>{const[r,n]=g.useState(void 0);return g.useLayoutEffect((()=>{const{current:t}=e;t&&(()=>{if(!t)return;const e=t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth;n(e)})()}),[t,e]),r},_Ke="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUgAAAFICAYAAAAyFGczAABSw0lEQVR4Ae29Z3vkOpImGmAyJZVUdarOmZ7ent1r/v/vuZ/2GdM9u9s93cfUKSuXmcRFwJAgGAGATKOUFG89qiRhAobAi4BXf/nbVw0aBij/q6NnyJgdA7oQjxq/c/ylbkN+qAp7Kq6Ue8WEy4VDfROokFGDOfFTlTJK7mtl5NxwYcJMOdR7jdtDl3+uHFFx4Pznyuic9EEUF87/K6z/bXiYoNbsGFDM8xy/c/ypPd5VRdhqQbi18V/yTZbGr2S39FvVutknzNo059weuvyrijCP4b/GrdR/iwYEAoFAQEIIUiAQCBgIQQoEAgEDIUiBQCBgIAQpEAgEDIQgBQKBgEGrTjZ3LxAIBM8LokEKBAIBAyFIgUAgYCAEKRAIBAyEIAUCgYBBK3M0AoFAQ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TKjkLPLQ5HvmjQdf0xN+kt/h8K9HGOZS/3P9TG0YHT+0umPbdVIBi0nzaf58aTlcvLGpMvpDqn/mjJIx4DSIShZ42+U5ocmvwP/baZy+fTGLjUhW8E0PpQZAF1mxukf2ynI13Wp/4gWRh+vpr3i3FGtLyWDap24j0+1+ZQ9p1UB8HHNhZfGXTPPaXxq3EPiLxe3Gvepv1KbnpPDVb5UzjQPFOknnvTg8jY2S+UqJn7cc+6XS0sOpfzO1QMuH1MzRdipjD31S8UpVx+p+Ej9p+p/655rCksa0ZJ5jTtVaQaVfqBgNjcOMMOuVKhzcdjHvNa+Vn4p/ym7qb4ayxkXsaXfrzafa9KxLznm7JeGX1vuoTJONfWx5ltzfkrmL6P+y5ULgtNAg0BwGFCK+ZEgWw0FAsHzwgkbWyFIgUAgYCAEKRAIBAyEIAUCgYCBEKRAIBAwEIIUCAQCBkKQAoFAwKCVBWqCp8echcoCwenQCj0Knh5SCl8jnkOzeLydNKWtwwKB4FXjOTSLxyNIbj86AL1VqGb7UCyTM0v3vkPmHSrlpG4A5sc/t79+TnzT/fWxu9RtLi5pOLV5D5BPO/Xdc997n7iUzl/IhcXlHwB9lgFA/TdP0y2KwrPF8fdic3vP5+4vn+O3FNaSfew5ssyZlWRT/mrf98nD1C1O19U26TXhzj2zIZcfc+JRik/8POc8Bc79nDMVBM8Ox5vFXlIwDlmYDinrNQyRyTDg+eM5ke0Lqf/NYo1jrhsFZf/7aDAlWftm2Nx8mqMRLY3bHA2KMqe0rBp/qdXc9C5xs7DCqacilQXhqpzWeyxI/c/i/wfq9UNPlIcNFQAAAABJRU5ErkJggg==",kKe=({src:e,children:t,className:r,...n})=>E.jsx(PH,{src:e||_Ke,alt:"Event cover","data-testid":"event-cover",className:he(r,"bg-gray-900_10 [&_img]:[mask-image:linear-gradient(to_bottom,black_70%,transparent_120%)]"),...n,children:t}),vC=({icon:e,name:t,isSelected:r})=>E.jsxs(E.Fragment,{children:[e&&E.jsx(e,{className:he("size-xxs flex-shrink-0",r&&"[&:has(circle)_path]:text-gray-100 [&_circle]:text-gray-700"),fill:r?"var(--gray-700)":"transparent"}),t]}),xKe=({attendeeStatus:e,actions:t})=>{if(null==t||!t.length)return null;const r=t.find((e=>e.isSelected));return e&&"INVITED"!==e?E.jsx("div",{className:"grid grid-cols-[1fr_1fr_48px] gap-xs","data-testid":"attendee-actions-dropdown",children:E.jsxs(Yv,{children:[E.jsx(Kv,{className:"\n [&>svg]:flex-shrink-0 [&>svg]:transform [&>svg]:transition-transform [&>svg]:duration-200\n [&[data-state=open]>svg:last-child]:rotate-180\n ",asChild:!0,children:r&&E.jsxs(Gn,{variant:"secondary",disabled:r.disabled,"data-testid":"dropdown-trigger",children:[E.jsx(vC,{...r}),E.jsx(i2,{className:"-mx-xxxs",size:18})]})}),E.jsx(q0,{className:"min-w-[240px]",children:E.jsx(hue,{value:null==r?void 0:r.value,children:t.map((e=>E.jsx(CB,{value:e.value||"",onSelect:e.handler,disabled:e.disabled,className:"cursor-pointer","data-testid":`dropdown-item-${e.name.toLowerCase()}`,children:E.jsx(vC,{...e})},e.name)))})})]})}):E.jsx("div",{className:he("grid gap-xs",{"grid-cols-3":"INVITED"===e,"grid-cols-[1fr_1fr_48px]":!e}),"data-testid":"attendee-actions-grid",children:t.map((e=>E.jsx(Gn,{size:"m",className:"min-w-0",variant:"secondary",onClick:e.handler,disabled:(null==e?void 0:e.disabled)||!1,"data-testid":`action-button-${e.name.toLowerCase()}`,children:E.jsx(vC,{...e})},e.name)))})},SKe=({actions:e})=>{if(null==e||!e.length)return null;const t=e.slice(0,2),r=e.slice(2);return E.jsxs("div",{className:"grid grid-cols-[1fr_1fr_48px] gap-xs","data-testid":"organizer-actions",children:[t.map((e=>E.jsxs(Gn,{size:"m",variant:"secondary",onClick:e.handler,disabled:(null==e?void 0:e.disabled)||!1,children:[e.icon,e.name]},e.name))),!(null==r||!r.length)&&E.jsx(_H,{actions:r,mobileBehavior:"modal",triggerVariant:"secondary",triggerClass:"rounded-m px-xs"})]})},Hh=({icon:e,children:t,testId:r})=>E.jsxs("div",{"data-testid":r,className:"flex items-center gap-xxs text-gray-500",children:[e&&g.cloneElement(e,{size:20,className:"flex-shrink-0"}),E.jsx("div",{className:"overflow-hidden overflow-ellipsis whitespace-nowrap text-base",children:t})]}),EKe=g.memo((e=>{const t=oKe(),r=KYe(),n=g.useRef(null),a=wKe(n),{id:o,startTime:i,endTime:s,timeZoneOffsetSeconds:l,organizer:c,url:u,address:f,stats:d,cover:p,attendeeStatus:h}=e,{isOrganizer:m,isInviteOnly:y,isPublic:v,isCancelled:b,organizerActions:w,attendeeActions:_,coverBadges:k}=WYe({event:e,...r}),x=ho(c),{name:A,TranslationControls:S}=QYe(e);return E.jsx("div",{className:"space-y-xs border-b py-l",children:E.jsxs("div",{className:"flex items-start space-x-xl",children:[E.jsxs("div",{className:"flex-1 space-y-xxs overflow-hidden",children:[E.jsx(NH,{className:"text-sm font-medium text-gray-500",startTime:i,endTime:s,timeZoneOffsetSeconds:l}),E.jsx(Hh,{children:E.jsx(vm,{theme:"dark",size:"small",tooltipText:a?A:"",triggerProps:{asChild:!0},className:"max-w-80 whitespace-normal break-words",side:"bottom",children:E.jsx("h5",{ref:n,className:he("overflow-hidden text-ellipsis whitespace-nowrap text-lg font-semibold text-gray-900 hover:text-blue_100",b&&"line-through"),children:E.jsx(Wi,{to:t({to:"event",useFromScope:["group"],routeProps:{eventId:o,username:x}}),children:A})})})}),S,b&&E.jsx(Hh,{icon:E.jsx(c2,{color:"var(--red-dark)"}),testId:"event-cancelled",children:E.jsx("span",{className:"text-red-dark",children:"This event has been cancelled"})}),E.jsx(Hh,{icon:E.jsx(zp,{name:c.displayName||"",imgUrl:t1({user:c,type:"avatar"})}),testId:"event-organizer",children:E.jsxs(Wi,{to:"/:username",props:{username:x},className:"hover:underline",children:["By ",c.displayName||""," ",m&&"(You)"]})}),u&&E.jsx(Hh,{icon:E.jsx(eJ,{}),testId:"event-url",children:E.jsx(Wi,{to:u,target:"_blank",className:"hover:underline",children:u})}),f&&E.jsx(Hh,{icon:E.jsx(J8,{}),testId:"event-address",children:E.jsx(bKe,{address:f})}),y&&E.jsxs(HF,{children:[E.jsx(Hh,{icon:E.jsx(LC,{}),testId:"event-attendees-invite-only",children:E.jsx(QF,{className:"cursor-pointer",children:E.jsx("span",{className:"hover:underline",children:"Attendees"})})}),E.jsx(ape,{children:E.jsx(cT,{align:"start",className:"relative max-h-80 w-[400px] overflow-auto p-s",children:E.jsx(TH,{eventId:null==e?void 0:e.id,readOnly:!0})})})]}),v&&E.jsx(Hh,{icon:E.jsx(LC,{}),testId:"event-stats-public",children:E.jsxs("span",{className:"inline-flex",children:[(null==d?void 0:d.joins)||0," ",Cj.joins.label,E.jsx(r_,{className:"size-xxs"}),(null==d?void 0:d.interests)||0," ",Cj.interests.label]})}),!(null==w||!w.length)&&E.jsx("div",{className:"pt-xs",children:E.jsx(SKe,{actions:w})}),!(null==_||!_.length)&&E.jsx("div",{className:"pt-xs",children:E.jsx(xKe,{attendeeStatus:h,actions:_})})]}),E.jsx("div",{className:"flex-shrink-0",children:E.jsx(kKe,{className:"w-[164px] rounded-lg",src:null==p?void 0:p.files[0].uri,children:k})})]})})}));function CKe(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}EKe.displayName="EventCard",pf.CURRENT_USER,pf.USER,pf.MY_GROUP,pf.DISCOVER,pf.NOTIFICATIONS;var jj,Zw={exports:{}},IKe=Zw.exports;function AKe(){return jj||(jj=1,e=IKe,t=function(){var e=[],t=[],r={},n={},a={};function o(e){return"string"==typeof e?new RegExp("^"+e+"$","i"):e}function i(e,t){return e===t?t:e===e.toLowerCase()?t.toLowerCase():e===e.toUpperCase()?t.toUpperCase():e[0]===e[0].toUpperCase()?t.charAt(0).toUpperCase()+t.substr(1).toLowerCase():t.toLowerCase()}function s(e,t){return e.replace(t[0],(function(r,n){var a=function(e,t){return e.replace(/\$(\d{1,2})/g,(function(e,r){return t[r]||""}))}(t[1],arguments);return i(""===r?e[n-1]:r,a)}))}function l(e,t,n){if(!e.length||r.hasOwnProperty(e))return t;for(var a=n.length;a--;){var o=n[a];if(o[0].test(t))return s(t,o)}return t}function c(e,t,r){return function(n){var a=n.toLowerCase();return t.hasOwnProperty(a)?i(n,a):e.hasOwnProperty(a)?i(n,e[a]):l(a,n,r)}}function u(e,t,r,n){return function(n){var a=n.toLowerCase();return!!t.hasOwnProperty(a)||!e.hasOwnProperty(a)&&l(a,a,r)===a}}function f(e,t,r){return(r?t+" ":"")+(1===t?f.singular(e):f.plural(e))}return f.plural=c(a,n,e),f.isPlural=u(a,n,e),f.singular=c(n,a,t),f.isSingular=u(n,a,t),f.addPluralRule=function(t,r){e.push([o(t),r])},f.addSingularRule=function(e,r){t.push([o(e),r])},f.addUncountableRule=function(e){"string"!=typeof e?(f.addPluralRule(e,"$0"),f.addSingularRule(e,"$0")):r[e.toLowerCase()]=!0},f.addIrregularRule=function(e,t){t=t.toLowerCase(),e=e.toLowerCase(),a[e]=t,n[t]=e},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach((function(e){return f.addIrregularRule(e[0],e[1])})),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach((function(e){return f.addPluralRule(e[0],e[1])})),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach((function(e){return f.addSingularRule(e[0],e[1])})),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(f.addUncountableRule),f},"function"==typeof CKe?Zw.exports=t():e.pluralize=t()),Zw.exports;var e,t}var RKe=AKe();const Lj=Qc(RKe),bC=4,TKe=({count:e=5,size:t=24})=>E.jsx("div",{"data-testid":"users-preview-skeleton",style:{width:e*(t-4)+4,height:t},className:"relative flex flex-col",children:Array.from({length:e}).map(((e,r)=>E.jsx(gf,{style:{left:r*(t-4),width:t,height:t},className:"absolute top-0 rounded-full"},r)))}),Vj=40,Bj=5,wC=2,PKe=g.memo((({eventId:e})=>{const{isLoading:t,data:r}=$Ye({eventId:e}),n=r||[],a=(null==n?void 0:n.slice(0,5))||[],o=(null==n?void 0:n.length)||0;return E.jsx("div",{className:"space-y-s",children:t?E.jsxs(E.Fragment,{children:[E.jsx("div",{className:"py-xxxs",children:E.jsx(TKe,{count:5,size:40})}),E.jsxs("div",{children:[E.jsx(gf,{className:"mb-xs h-5 w-1/2"}),E.jsx(gf,{className:"h-10 w-full"})]})]}):!!o&&E.jsxs(E.Fragment,{children:[E.jsx(mQe,{users:a,avatarSize:40}),E.jsxs("div",{children:[E.jsx("span",{className:"mb-xxxs block text-base font-semibold",children:Lj("mutual friend",o,!0)}),E.jsx("span",{children:E.jsxs("span",{children:[n.slice(0,2).map((({displayName:e})=>e)).join(", "),o>2&&` and ${Lj("other",o-2,!0)}`," interested in this event"]})})]})]})})}));PKe.displayName="MutualAttendees";const $Ke=({notification:e})=>{var t,r;const n=Em(),[a]=IH(),[o]=AH(),[i]=RH(),s=e.eventResponse||(null==(r=null==(t=e.meta)?void 0:t.actionsTaken)?void 0:r[0].text),l=s?`You said: ${s}`:"",c=t=>{n(A0.actions.updateNotification({...e,eventResponse:t}))};return E.jsx("div",{className:"gap-xs flex items-center",children:s?E.jsx("span",{className:"text-s font-medium uppercase text-gray-500",children:l}):E.jsxs(E.Fragment,{children:[E.jsxs(Gn,{size:"s",className:"min-w-0",variant:"secondary",onClick:()=>{try{if(!e.activityId)return;a({eventId:e.activityId}).unwrap(),c("Yes")}catch(e){Aa.error(`Error accepting event: ${JSON.stringify(e)}`)}},children:[E.jsx(tv,{size:16})," Yes"]}),E.jsxs(Gn,{size:"s",className:"min-w-0",variant:"secondary",onClick:()=>{if(e.activityId)try{i({eventId:e.activityId}).unwrap(),c("Maybe")}catch(e){Aa.error(`Error maybe event: ${JSON.stringify(e)}`)}},children:[E.jsx(IA,{size:16})," Maybe"]}),E.jsxs(Gn,{size:"s",className:"min-w-0",variant:"secondary",onClick:()=>{if(e.activityId)try{o({eventId:e.activityId}).unwrap(),c("No")}catch(e){Aa.error(`Error rejecting event: ${JSON.stringify(e)}`)}},children:[E.jsx(nv,{size:16})," No"]})]})})},Fj=({notification:e,isPopup:t})=>{const{isEventRelated:r,isFollowingRelated:n}=E9(e);switch(!0){case r:return E.jsx($Ke,{notification:e});case n:return E.jsx(xQe,{notification:e,isPopup:t});default:return null}},hit=({notification:e,isPopup:t=!1})=>{var r,n,a,o,i;const s=en(Dc.selectors.selectSupportedExtensions).IMAGE,l=e.fromUser,c=null!=l&&l.avatar?cD({upload:l.avatar,imgExtension:s}):null,u=l?ho(l):"",{isQuote:f,isReply:d,isLike:p,isFollowRequest:h,isUnread:g}=E9(e),m=(f||d)&&null!=(r=e.post)&&r.originalPost?null==(n=e.post)?void 0:n.originalPost.text:"",y=f||p?e.post:(null==(a=e.post)?void 0:a.originalPost)||e.post,v=null==y?void 0:y.uploads[0],b=v?cD({upload:v,imgExtension:s}):null,w=!(null!=l&&l.domain),_=!(null==(o=e.post)||!o.uploads.length),k=l?oYe({user:l,maxShortenedInfo:h||_&&!w}):{displayName:"",userName:""},x=(null==b?void 0:b.uri)&&y,A=!(null==(i=e.post)||!i.summary||!e.post.settings.sensitive),[S]=T0e();return E.jsx("div",{className:"py-xs px-xs rounded-m w-full text-sm hover:bg-gray-100",children:E.jsxs("div",{className:"gap-s flex w-full min-w-0 items-start",children:[l&&E.jsxs("div",{className:"relative shrink-0",children:[E.jsx(zp,{size:40,name:l.displayName||"",imgUrl:(null==c?void 0:c.uri)||""}),E.jsx("img",{src:kYe(e),className:"size-xxs -right-xxs absolute bottom-0.5",alt:e.type})]}),E.jsxs("div",{className:"gap-xs flex min-w-0 grow items-center",children:[E.jsxs("div",{className:"min-w-0 flex-1 overflow-hidden",children:[l&&E.jsx(Wi,{to:"/:username",props:{username:u},className:"block min-w-0",children:E.jsx(tYe,{canShow:!t,username:u,children:E.jsxs("div",{className:"gap-xxxs mb-xxxs flex min-w-0 cursor-pointer items-center text-sm","data-testid":"notificationAuthor",children:[E.jsx("div",{className:"shrink-0 whitespace-nowrap font-semibold text-gray-900",children:k.displayName}),E.jsx("div",{className:"min-w-0 overflow-hidden text-ellipsis whitespace-nowrap font-medium text-gray-500",children:k.userName})]})})}),E.jsxs("div",{className:"gap-xxxs mb-xxxs flex min-w-0 items-center",children:[E.jsx("div",{className:"shrink-0 whitespace-nowrap text-sm font-semibold text-gray-900","data-testid":"notificationTitle",children:E.jsx(lYe,{notification:e})}),E.jsx("div",{className:"min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-gray-500",children:m})]}),y&&E.jsx(Wi,{to:"/:username/posts/:postId",props:{postId:y.id,username:ho(y.author)},className:"mb-xxxs block min-w-0",children:E.jsx("div",{className:he("notificationBody mt-1 overflow-hidden text-ellipsis whitespace-nowrap text-gray-900"),"data-testid":"mentionedFeed",dangerouslySetInnerHTML:{__html:y.text}})}),E.jsx("div",{className:"my-xxxs",children:t&&E.jsx(Fj,{notification:e,isPopup:!0})}),E.jsxs("div",{className:"gap-xxxs inline-flex cursor-pointer items-center text-gray-500 outline-none",onClick:()=>{(async()=>{try{await S({id:e.id,status:g?"READ":"UNREAD"}).unwrap()}catch(e){console.error("Mark notification error: ",e)}})()},children:[E.jsx("div",{"data-testid":"status-indicator",className:he("size-2 rounded-full",g?"bg-blue_100":"border border-gray-300")}),pYe(e.createdAt)]})]}),E.jsxs("div",{className:"relative shrink-0 empty:hidden",children:[x&&E.jsxs(Wi,{to:"/:username/posts/:postId",props:{postId:y.id,username:ho(y.author)},children:[A&&E.jsx("div",{className:"absolute z-[1] size-full backdrop-blur-[5px]"}),E.jsx("img",{className:"border-gray-900_20 block size-12 shrink-0 rounded-[6px] border",src:b.uri,alt:""})]}),!t&&E.jsx(Fj,{notification:e,isPopup:!1})]})]})]})})},zKe=e=>"NOTIFICATION_UNDO"===e.type,MKe=20,mit=({limit:e=20})=>{const[t,r]=g.useState(1),n=Em(),a=en(Qi.selectors.selectIsAuthenticated),o=en(Ql.selectors.selectCurrentUser),i=en(A0.selectors.selectNotificationsOwner),{refetch:s,isUninitialized:l,isLoading:c,isFetching:u,isSuccess:f}=R0e({limit:e,offset:(t-1)*e},{skip:!a});return g.useEffect((()=>{i&&o&&i!==o.id&&(l||c||u||!f||(n(P8()),s()))}),[null==o?void 0:o.id,i]),{loadMore:()=>r((e=>e+1)),isLoading:c}},git=({status:e})=>{const t=en(Qi.selectors.selectIsAuthenticated),{refetch:r,isUninitialized:n,isFetching:a,isSuccess:o}=P0e({...e&&{status:e}},{skip:!t});sH({onChange:()=>{!t||n||a||!o||r()}})},Uj="notification",yit=()=>{const e=Em(),t=en(A0.selectors.selectNotifications),{user:r}=Lm(),n=`${Uj}#${null==r?void 0:r.id}`,a=en((e=>zWe.selectors.selectLastUpdateFor(e,{subscriptionName:n,mode:"equals"})));g.useEffect((()=>{if(null!=r&&r.id)return e(w8({id:n,topics:[Uj]})),()=>{e(_8(n))}}),[null==r?void 0:r.id]),g.useEffect((()=>{null!=a&&a.data&&(zKe(a)?e($8(a.data)):"LIKE"===(null==a?void 0:a.data.type)&&null!=t&&t.find((e=>{var t,r;return e.activityId===(null==a?void 0:a.data.activityId)&&(null==(t=e.fromUser)?void 0:t.id)===(null==(r=a.data.fromUser)?void 0:r.id)}))||null!=t&&t.find((e=>e.id===a.data.id))||e(C8(a.data)))}),[null==a?void 0:a.data,!1])};export{Pst as CustomToastContainer,xQe as Following,hit as NotificationBody,oYe as cutUserInfo,zKe as isUndoNotification,A0e as notificationsApi,A0 as notificationsSlice,$st as notify,mit as useFetchNotifications,P0e as useGetApiV1NotificationsCountQuery,R0e as useGetApiV1NotificationsQuery,git as useGetNotificationsCount,yit as useNotifications,T0e as usePostApiV1NotificationsByIdMarkMutation,Tst as usePostApiV1NotificationsMarkAllMutation};
|